bpo-33399: Handle when module __cache__ is None in site.abs_path()#6675
bpo-33399: Handle when module __cache__ is None in site.abs_path()#6675demianbrecht wants to merge 1 commit into
Conversation
| try: | ||
| m.__cached__ = os.path.abspath(m.__cached__) | ||
| except (AttributeError, OSError): | ||
| except (AttributeError, OSError, TypeError): |
There was a problem hiding this comment.
I would change the whole try block to:
if getattr(m, '__cached__', None) is not None:
try:
m.__cached__ = os.path.abspath(m.__cached__)
except OSError:
pass|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase And if you don't make the requested changes, you will be put in the comfy chair! |
|
@demianbrecht, please address the code review from @brettcannon. Thanks! |
|
Since this PR seems to be abandoned, I am going to close it. It can be reopened if the original author is interested in working on it again or a new PR can be created to replace it. |
I'll look at adding tests if this approach isn't just wrong. https://bugs.python.org/issue33399
https://bugs.python.org/issue33399