The getpath.py file is frozen at build time and executed as code over a namespace. It is never imported, nor is it meant to be importable or reusable. However, it should be easier to read, modify, and patch than the previous code.
This commit attempts to preserve every previously tested quirk, but these may be changed in the future to better align platforms.
Modify the ``EnumType.__dir__()`` and ``Enum.__dir__()`` to ensure
that user-defined methods and methods inherited from mixin classes always
show up in the output of `help()`. This change also makes it easier for
IDEs to provide auto-completion.
Rename PyConfig.no_debug_ranges to PyConfig.code_debug_ranges and
invert the value.
Document -X no_debug_ranges and PYTHONNODEBUGRANGES env var in
PyConfig.code_debug_ranges documentation.
This does two changes that are quite related.
0. it add that variable binding can occur in pattern matching, an update of 3.10
which seems to have been omitted from the list of bindings
1. Given how long the sentence already was, with even subcases in the middle of
the sentence, the commit breaks the sentence into an actual list.
Document the `port` parameter to `loop.create_server` in `asyncio`. In
particular, note that if `host` resolves to multiple network interfaces,
passing in `port=0` will result in a different random unused port being
used for each interface.
Automerge-Triggered-By: GH:ericvsmith
* bpo-45514: Apply changes from importlib_resources@a3ef4128c6
* Mark legacy functions as deprecated in the docs and link to the migration docs in importlib_resources docs.
* Apply changes from importlib_resources@329ae9d5f2c.
* Indicate importlib.resources as a module.
Co-authored-by: Filipe Laíns <lains@riseup.net>
* Make internal APIs that take PyFrameConstructor take a PyFunctionObject instead.
* Add reference to function to frame, borrow references to builtins and globals.
* Add COPY_FREE_VARS instruction to allow specialization of calls to inner functions.
It is now considered a historical accident that e.g. `for` loops and the `iter()` built-in function do not require the iterators they work with to define `__iter__`, only `__next__`.
The documentation explaining Python's data model does not adequately explain
the differences between ``__getitem__`` and ``__class_getitem__``, nor does it
explain when each is called. There is an attempt at explaining
``__class_getitem__`` in the documentation for ``GenericAlias`` objects, but
this does not give sufficient clarity into how the method works. Moreover, it
is the wrong place for that information to be found; the explanation of
``__class_getitem__`` should be in the documentation explaining the data model.
This PR has been split off from GH-29335.
Continue with the improvement of the library netrc
Original work and report Xiang Zhang <angwerzx@126.com>
* 📜🤖 Added by blurb_it.
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Remove the asyncore and asynchat modules, deprecated in Python
3.6: use the asyncio module instead.
Remove the smtpd module, deprecated in Python 3.6: the aiosmtpd
module can be used instead, it is based on asyncio.
* Remove asyncore, asynchat and smtpd documentation
* Remove test_asyncore, test_asynchat and test_smtpd
* Rename Lib/asynchat.py to Lib/test/support/_asynchat.py
* Rename Lib/asyncore.py to Lib/test/support/_asyncore.py
* Rename Lib/smtpd.py to Lib/test/support/_smtpd.py
* Remove DeprecationWarning from private _asyncore, _asynchat and
_smtpd modules
* _smtpd: remove deprecated properties
* Add missing value returned by methods on cookiejar
Documentation say that return something but don't specific with what
value is return, and that can be confuse. This patch add that information.
* Update Doc/library/http.cookiejar.rst
Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
* Update Doc/library/http.cookiejar.rst
Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
* bpo-25381: Update explanation of exception globals
This paragraph in extending/extending.rst was unchanged (except for
NULL markup) since committed in 2007 Aug 15 for 2.6 alpha.
* Respond to reviews and remove duplication.
* Update Doc/extending/extending.rst
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>