pytypes breaks @autoreload in a somewhat dangerous way
See original GitHub issueIf I decorate a class method with @typechecked
, it works, but breaks autoreload, generating this error:
[autoreload of pytypes.typechecker failed: Traceback (most recent call last):
File "/Users/srinivas/opt/anaconda3/lib/python3.8/site-packages/IPython/extensions/autoreload.py", line 245, in check
superreload(m, reload, self.old_objects)
File "/Users/srinivas/opt/anaconda3/lib/python3.8/site-packages/IPython/extensions/autoreload.py", line 394, in superreload
module = reload(module)
File "/Users/srinivas/opt/anaconda3/lib/python3.8/imp.py", line 314, in reload
return importlib.reload(module)
File "/Users/srinivas/opt/anaconda3/lib/python3.8/importlib/__init__.py", line 148, in reload
raise ImportError(msg.format(name), name=name)
ImportError: module MYCLASS not in sys.modules
]
where MYCLASS is the name of the class i’m working on
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
autoreload magic doesn't reload objects · Issue #11588 - GitHub
update: the problem appears to be with any object, unrelated to pickle. pickle was just exposing it in a forceful way.
Read more >Release Notes — Airflow Documentation
Here is the list of breaking changes in dependencies that comes together with FAB 4: Flask from 1.X to 2.X breaking changes. flask-jwt-extended ......
Read more >How To Style React Components | DigitalOcean
In this tutorial, you'll learn three different ways to style React components: plain Cascading Style Sheets (CSS), inline styles with ...
Read more >Application reload - Unity Forum
The application.reload sometimes appear while hitting play mode and this is more dangerous it never goes away till I end task as I...
Read more >NEWS
2.1 has updated its {fontawesome} requirement to >=0.4.0. shiny 1.7.2. Full changelog. Breaking changes. Closed #3626: renderPlot() (and ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I too don’t have the capacity to research this, but once the root cause is understood and pytypes/typeguard found to do something wrong, I will of course fix typeguard if possible.
Another thing to try is to check whether the order of decorators makes a difference. Since typeguard is affected similarly, it is worth a try to ask @agronholm whether he happens to know the cause.