GithubHelp home page GithubHelp logo

Comments (14)

inducer avatar inducer commented on August 25, 2024

Hi Aaron, I'm not sure how pudb factors into any of this. Wrong bug tracker? :) If I missed something, feel free to reopen. Also, happy new year! Andreas

from pudb.

asmeurer avatar asmeurer commented on August 25, 2024

Sorry if it wasn't clear. I got this using pudb ("if I type ! to go to IPython..."). Or do you think it's an IPython bug?

I don't have the permissions to reopen issues.

from pudb.

inducer avatar inducer commented on August 25, 2024

Ah, never mind. Still sleepy apparently. Can you check if 14c076b fixes this? (Just adds a catch-and-ignore for this specific error.)

from pudb.

asmeurer avatar asmeurer commented on August 25, 2024

Well, yeah, it fixes the problem. I'm not so sure that it's the correct way, though...

Perhaps we should ask the @ipython guys to take a look.

from pudb.

inducer avatar inducer commented on August 25, 2024

Agree.d

from pudb.

asmeurer avatar asmeurer commented on August 25, 2024

I asked about it on their mailing list: http://mail.scipy.org/pipermail/ipython-dev/2012-January/008530.html.

from pudb.

asmeurer avatar asmeurer commented on August 25, 2024

See that discussion for the solution.

from pudb.

inducer avatar inducer commented on August 25, 2024

I'm not sure I fully understand what a solution might be. The following questions remain:

  • What about backward compatibility? Can we detect at what version this changed, and transparently work with both the pre- and post-change versions? If so, how?
  • Do they really want a module in user_module? I.e.
>>> from types import ModuleType
>>> x = ModuleType("yo")
>>> x.__dict__["zzz"] = 1
>>> ipy_thing.user_module = x

from pudb.

takluyver avatar takluyver commented on August 25, 2024

Hi, I made the change in IPython - apologies for breaking the API. We did try to see what projects might have been affected, but I didn't know about PuDB.

  • Detecting the change: It changed only for version 0.12. Three options spring to mind: 1) catch the error setting user_global_ns and set user_module instead, 2) check if the shell object has the user_module attribute, and 3) check the IPython version number.
  • AFAIK, it doesn't strictly have to be a module - in certain situations, we set it to a custom object. Its __dict__ attribute is taken as the global namespace. Have a look at the code that initialises it: https://github.com/ipython/ipython/blob/master/IPython/core/interactiveshell.py#L973

from pudb.

inducer avatar inducer commented on August 25, 2024

Hi Thomas,

thanks for your input. I've implemented what I think is a fix in 07bfee0. Does that look reasonable to you? Aaron, can you please try this? Looking forward to hearing from both of you. Thanks.

Andreas

from pudb.

takluyver avatar takluyver commented on August 25, 2024

I think that will work (though I haven't tried it).

from pudb.

asmeurer avatar asmeurer commented on August 25, 2024

Yes, it fixes it.

By the way, for some reason, pudb has gotten painfully slow all of a sudden. Every operation, from starting up to stepping one line, takes several seconds to several minutes to complete. It's nothing from PuDB, as the same commit in the git history that used to work fine has the problem. Any idea what could be going on? I don't think it's urwid related, as just moving around with the arrow keys works fine.

from pudb.

asmeurer avatar asmeurer commented on August 25, 2024

I'm closing the issue.

from pudb.

inducer avatar inducer commented on August 25, 2024

No idea about the slowness. If it persists, please open a new bug.

from pudb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.