| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…tring` from `typing.__all__` and `collections.abc.__all__`
|
🤖 New build scheduled with the buildbot fleet by @AlexWaygood for commit fc787a5 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F139127%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again. |
Sorry, something went wrong.
| if attr == "ByteString": | ||
| import warnings | ||
| warnings._deprecated("collections.abc.ByteString", remove=(3, 17)) | ||
| globals()["ByteString"] = _deprecated_ByteString |
There was a problem hiding this comment.
This means only the first time anyone does from collections.abc import ByteString in a program will trigger a warning, right? That seems potentially problematic: maybe the first time is in some dependency you don't control, so you ignore the warning, and then it happens again in your code and you miss it.
Sorry, something went wrong.
There was a problem hiding this comment.
That's correct. I did that deliberately so that the warning wouldn't be too noisy, and since it's what we previously did for other modules such as ast:
Lines 1897 to 1905 in d065edf
But I'm happy to switch to it emitting the deprecation warning even on subsequent imports, if you prefer! It would simplify the implementation a little
Sorry, something went wrong.
There was a problem hiding this comment.
Probably OK to stick with the standard format here, hopefully it's enough to get people to notice...
Sorry, something went wrong.
|
The buildbots report a number of reference leaks on this branch, but I can reproduce them all locally on main, and none of them look related to this PR. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
📚 Documentation preview 📚: https://cpython-previews--139127.org.readthedocs.build/