| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| try: | ||
| os.remove(raw_path) | ||
| except (FileNotFoundError, PermissionError): | ||
| except FileNotFoundError: |
There was a problem hiding this comment.
Why this part though? IIRC it was added because for some reason Windows will set high permissions on temporary files sometimes.
Sorry, something went wrong.
There was a problem hiding this comment.
I believe this exception was masking the underlying issue that the file descriptor wasn't being closed. Windows won't allow deletion of files in use, so when we encountered the issue, we suppressed the exception, allowing the file descriptor to remain unclosed and on Windows leaving the file undeleted. Now that the file descriptor is unconditionally closed, there's no longer any need to suppress this exception and as you can see, tests still pass on Windows.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
As reported in python/cpython#27436 (comment), merging the latest importlib_resources into CPython revealed a refleak. It appears the refleak has long been a part of the implementation but was previously uncovered by the tests. This change fixes that refleak.