Since the <Configure> event may occur after the
completion window is gone, catch potential
TclError exceptions when accessing acw.
(cherry picked from commit 4e2e5c1c4f)
* [bpo-44246](): Update What's New for importlib.metadata.
Bump version of importlib_metadata included.
Add note about compatibility notice and fix link to entry_points documentation.
Add note about removal of access by index on Distribution.entry_points.
* Fix syntax mistake in issue reference.
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
* Fix broken reference in entry-points.
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 28f12c9f4f)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Automerge-Triggered-By: GH:jaraco
The fix only applies to ``isinstance``. ``issubclass`` isn't affected (because it was always working to begin with). So I also fixed the news to reflect that.
(cherry picked from commit 8450e8a81f)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
* Add deprecated-removed loop labels for all reelvant functions/classes in asyncio
(cherry picked from commit d8fd8c8568)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Automerge-Triggered-By: GH:gpshead
Automerge-Triggered-By: GH:jaraco
(cherry picked from commit f6fbdb90ee)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Fix a regression in type() when a metaclass raises an exception. The
C function type_new() must properly report the exception when a
metaclass constructor raises an exception and the winner class is not
the metaclass.
(cherry picked from commit bd199e72fb)
Co-authored-by: Victor Stinner <vstinner@python.org>
Py_FrozenMain was added to the Limited C API in [bpo-42591]() (3.10.0a4);
but to fix that issue it would be enough to add it to the regular C API.
The function is undocumented, tests were added very recently ([bpo-44131]()),
and most importantly, it is not present in all builds of Python, as
the linker sometimes omits it as unused.
It should be added back when these issues are fixed.
Note that this does not affect Python's regular C API.
(cherry picked from commit d16856960e)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Allow --with-lto configure option to work with Apple-supplied Xcode or
Command Line Tools which do not provide llvm-ar.
(cherry picked from commit 59acfd4a09)
Co-authored-by: Ned Deily <nad@python.org>
A previous commit broke a check in sysconfig when building cpython itself.
This caused builds of the standard library modules to search a wrong
location (the installed location rather than the source directory) for
header files with the net effect that a ``make install``
incorrectly caused all extension modules to be rebuilt again and
with incorrect include file paths.
When building Python, we need two distinct "include" directories:
- source .h files
- install target for .h files
Note that this doesn't matter except when building Python from source.
Historically:
- source .h files were in the distutils scheme under 'include'
- the install directory was in the distutils.command.install scheme
under 'headers'
GH-24549 merged these; sysconfig is now the single source of truth and
distutils is derived from it.
This commit introduces a "secret" scheme path, 'headers', which contains
the install target. It is only present when building Python.
The distutils code uses it if present, and falls back to 'include'.
Co-authored-by: Ned Deily <nad@python.org>
(cherry picked from commit 563bd5a4dc)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Making the description of `InspectLoader.is_package` aligned with the current implementation.
Automerge-Triggered-By: GH:jaraco
(cherry picked from commit 8b9310d902)
Co-authored-by: Junnosuke Kuroda <Isa-rentacs@users.noreply.github.com>
Signed-off-by: Filipe Laíns <lains@riseup.net>
Automerge-Triggered-By: GH:jaraco
(cherry picked from commit df7eeacd83)
Co-authored-by: Filipe Laíns <lains@riseup.net>
When the parser does a second pass to check for errors, these rules can
have some small side-effects as they may advance the parser more than
the point reached in the first pass. This can cause the tokenizer to ask
for extra tokens in interactive mode causing the tokenizer to show the
prompt instead of failing instantly.
To avoid this, add a new mode to the tokenizer that is activated in the
second pass and deactivates asking for new tokens when the interactive
line is finished. As the parsing should have reached the last line in
the first pass, the second pass should not need to ask for more tokens.
(cherry picked from commit bd7476dae3)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Fix a crash at Python exit when a deallocator function removes the
last strong reference to a heap type.
Don't read type memory after calling basedealloc() since
basedealloc() can deallocate the type and free its memory.
_PyMem_IsPtrFreed() argument is now constant.
(cherry picked from commit 615069eb08)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
The invalid assignment rules are very delicate since the parser can
easily raise an invalid assignment when a keyword argument is provided.
As they are very deep into the grammar tree, is very difficult to
specify in which contexts these rules can be used and in which don't.
For that, we need to use a different version of the rule that doesn't do
error checking in those situations where we don't want the rule to raise
(keyword arguments and generator expressions).
We also need to check if we are in left-recursive rule, as those can try
to eagerly advance the parser even if the parse will fail at the end of
the expression. Failing to do this allows the parser to start parsing a
call as a tuple and incorrectly identify a keyword argument as an
invalid assignment, before it realizes that it was not a tuple after all.
(cherry picked from commit c878a97968)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
This is the last remaining instance, at least for this chapter, in 3.10 & 3.11.
(cherry picked from commit 2f47d8dcc7)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.10] bpo-43882 - Mention urllib.parse changes in Whats new section.
* escape the \n chars, ReSTify :rfc:, urllib.parse is a :mod:
* minor formatting.
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Issue should be fixed in [bpo-43757]()
Co-Authored-by: Tzu-ping Chung <uranusjr@gmail.com>
(cherry picked from commit 18f41c04ff)
Co-authored-by: Barney Gale <barney.gale@gmail.com>
Automerge-Triggered-By: GH:encukou