bpo-32117: Updated Simpsons names in docs by kingbuzzman · Pull Request #19737 · python/cpython (original) (raw)

kingbuzzman

@kingbuzzman

@gvanrossum gvanrossum changed the titlebpo-32117 Updated Simpsons names in docs bpo-32117: Updated Simpsons names in docs

Apr 30, 2020

gvanrossum

serhiy-storchaka added a commit that referenced this pull request

May 15, 2020

Move signals_pending from _PyRuntime.ceval to PyInterpreterState.ceval.

Move gil_drop_request member from _PyRuntimeState.ceval to PyInterpreterState.ceval.

Add --with-experimental-isolated-subinterpreters build option to configure: better isolate subinterpreters, experimental build mode.

When used, force the usage of the libc malloc() memory allocator, since pymalloc relies on the unique global interpreter lock (GIL).

sally is not a Simpsons character

Automerge-Triggered-By: @gvanrossum

Move recursion_limit member from _PyRuntimeState.ceval to PyInterpreterState.ceval.

_PyErr_ChainExceptions() now ensures that the first parameter is an exception type, as done by _PyErr_SetObject().

Automerge-Triggered-By: @corona10

This reverts commit 4e01946.

When Python is built in the experimental isolated subinterpreters mode, disable Unicode singletons and Unicode interned strings since they are shared by all interpreters.

Temporary workaround until these caches are made per-interpreter.

When Python is built with experimental isolated interpreters, disable tuple, dict and free free lists.

Temporary workaround until these caches are made per-interpreter.

Add frame_alloc() and frame_get_builtins() subfunctions to simplify _PyFrame_New_NoTrack().

In the experimental isolated subinterpreters build mode, _PyThreadState_GET() gets the autoTSSkey variable and _PyThreadState_Swap() sets the autoTSSkey variable.

Fix also code to handle init_interp_main() failure.

In the experimental isolated subinterpreters build mode, the GIL is now per-interpreter.

Move gil from _PyRuntimeState.ceval to PyInterpreterState.ceval.

new_interpreter() always get the config from the main interpreter.

In the experimental isolated subinterpreters build mode, _xxsubinterpreters.run_string() now releases the GIL.

Co-authored-by: Pablo Galindo Pablogsal@gmail.com

bpo-40480: create different regexps in the presence of multiple * patterns to prevent fnmatch() from taking exponential time.

This reverts commit d60040b.

When Python is built with experimental isolated interpreters, disable the type method cache.

Temporary workaround until the cache is made per-interpreter.

When Python is built with experimental isolated interpreters, a garbage collection now does nothing in an isolated interpreter.

Temporary workaround until subinterpreters stop sharing Python objects.

When Python is built with experimental isolated interpreters, disable the list free list.

Temporary workaround until this cache is made per-interpreter.

first is repeated twice.

Make the design more object-oriented. Split _GenericAlias on two almost independent classes: for special generic aliases like List and for parametrized generic aliases like List[int]. Add specialized subclasses for Callable, Callable[...], Tuple and Union[...].

When parsing a string with an invalid escape, the old parser used to point to the beginning of the invalid string. This commit changes the new parser to match that behaviour, since it's currently pointing to the end of the string (or to be more precise, to the beginning of the next token).

When parsing something like f(g()=2), where the name of a default arg is not a NAME, but an arbitrary expression, a specialised error message is emitted.

Module C state is now accessible from C-defined heap type methods (PEP 573). Patch by Marcel Plch and Petr Viktorin.

Co-authored-by: Marcel Plch mplch@redhat.com Co-authored-by: Victor Stinner vstinner@python.org

Declare _PyErr_GetTopmostException() with PyAPI_FUNC() to properly export the function in the C API. The function remains private ("_Py") prefix.

Co-Authored-By: Julien Danjou julien@danjou.info

(Note: PEP 554 is not accepted and the implementation in the code base is a private one for use in the test suite.)

If code running in a subinterpreter raises an uncaught exception then the "run" call in the calling interpreter fails. A RunFailedError is raised there that summarizes the original exception as a string. The actual exception type, cause, context, state, etc. are all discarded. This turned out to be functionally insufficient in practice. There is a more helpful solution (and PEP 554 has been updated appropriately).

This change adds the exception propagation behavior described in PEP 554 to the _xxsubinterpreters module. With this change a copy of the original exception is set to cause on the RunFailedError. For now we are using "pickle", which preserves the exception's state. We also preserve the original cause, context, and traceback (since "pickle" does not preserve those).

https://bugs.python.org/issue32604

Always run GitHub action jobs, even on documentation-only pull requests. So it will be possible to make a GitHub action job, like the Windows (64-bit) job, mandatory.

This fixes a possible memory leak in the C implementation of asyncio.Task.

Co-authored-by: nanjekyejoannah joannah.nanjekye@ibm.com Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>

This is for the C generator:

Exceptions:

Convert posixmodule.c ("posix" or "nt" module) to the multiphase initialization (PEP 489).

Co-authored-by: Mark Dickinson dickinsm@gmail.com

With the new parser, the error message contains always the trailing newlines, causing the comparison of the repr of the error messages in codeop to fail. This commit makes the new parser mirror the old parser's behaviour regarding trailing newlines.

Avoid unnecessary overhead in _PyDict_GetItemIdWithError() by calling _PyDict_GetItem_KnownHash() instead of the more generic PyDict_GetItemWithError(), since we already know the hash of interned strings.

Co-authored-by: Victor Stinner vstinner@python.org

Co-authored-by: Brad Solomon brsolomon@deloitte.com Co-authored-by: Terry Jan Reedy tjreedy@udel.edu

_Py_hashtable_new() now uses PyMem_Malloc/PyMem_Free allocator by default, rather than PyMem_RawMalloc/PyMem_RawFree.

PyMem_Malloc is faster than PyMem_RawMalloc for memory blocks smaller than or equal to 512 bytes.

In translate(), generate unique group names across calls.

The restores the undocumented ability to get a valid regexp by joining multiple translate() results via |.

These were added by mistake (see https://bugs.python.org/issue39481#msg366288).

Optimize _Py_hashtable_get() and _Py_hashtable_get_entry() for pointer keys:

Changes:

… now that we allow subtypes of PyCFunction.

Also add PyCMethod_CheckExact() and PyCMethod_Check() for checks against the PyCMethod subtype.

Add a new _Py_HashPointerRaw() function which avoids replacing -1 with -2 to micro-optimize hash table using pointer keys: using _Py_hashtable_hash_ptr() hash function.

Rewrite how the _tracemalloc module stores traces of other domains. Rather than storing the domain inside the key, it now uses a new hash table with the domain as the key, and the data is a per-domain traces hash table.

Rewrite _Py_hashtable_t type to always store the key as a "const void *" pointer. Add an explicit "key" member to _Py_hashtable_entry_t.

Remove _Py_hashtable_t.key_size member.

hash and compare functions drop their hash table parameter, and their 'key' parameter type becomes "const void *".

Add key_destroy_func and value_destroy_func parameters to _Py_hashtable_new_full().

marshal.c and _tracemalloc.c use these destroy functions.

Rewrite _tracemalloc to store "trace_t*" rather than directly "trace_t" in traces hash tables. Traces are now allocated on the heap memory, outside the hash table.

Add tracemalloc_copy_traces() and tracemalloc_copy_domains() helper functions.

Remove _Py_hashtable_copy() function since there is no API to copy a key or a value.

Remove also _Py_hashtable_delete() function which was commented.

_Py_hashtable_t values become regular "void *" pointers.

_Py_hashtable_get_entry_ptr() avoids comparing the entry hash: compare directly keys.

Move _Py_hashtable_get_entry_ptr() just after _Py_hashtable_get_entry_generic().

This commit fixes SyntaxError locations when the caret is not displayed, by doing the following:

Don't hardcode defining_class parameter name to "cls":

The crash that this fixes occurs when using traceback and other modules from multiple threads; del cache[filename] can raise a KeyError.

Remove the _PyUnicode_ClearStaticStrings() function from the C API. Make the function fully private (declare it with "static").

The previous commits on bpo-29587 got exception chaining working with gen.throw() in the yield case. This patch also gets the yield from case working.

As a consequence, implicit exception chaining now also works in the asyncio scenario of awaiting on a task when an exception is already active.

Tests are included for both the asyncio case and the pure generator-only case.

Move PyInterpreterState.fs_codec into a new PyInterpreterState.unicode structure.

Give a name to the fs_codec structure and use this structure in unicodeobject.c.

raw_data_manager (default for EmailPolicy, EmailMessage) does correct wrapping of 'text' parts as long as the message contains characters outside of 7bit US-ASCII set: base64 or qp Content-Transfer-Encoding is applied if the lines would be too long without it. It did not, however, do this for ascii-only text, which could result in lines that were longer than policy.max_line_length or even the rfc 998 maximum.

This changeset fixes the heuristic so that if lines are longer than policy.max_line_length, it will always apply a content-transfer-encoding so that the lines are wrapped correctly.

compileall is now able to use hardlinks to prevent duplicates in a case when .pyc files for different optimization levels have the same content.

Co-authored-by: Miro Hrončok miro@hroncok.cz Co-authored-by: Victor Stinner vstinner@python.org

Pass PEP 573 defining_class to os.DirEntry methods. The module state is now retrieve from defining_class rather than Py_TYPE(self), to support subclasses (even if DirEntry doesn't support subclasses yet).

This reverts commit fa0a66e.

This reverts commit a1d9e0a.

Cleanup also hashtable.c. Rename _Py_hashtable_t members:

This commit fixes the new parser to disallow invalid targets in the following scenarios:

Co-authored-by: Pablo Galindo Pablogsal@gmail.com

If _Py_hashtable_set() fails to grow the hash table (rehash), it now fails rather than ignoring the error.

Signed-off-by: Filipe Laíns lains@archlinux.org

Replace ztest with ztext.

Co-authored-by: nanjekyejoannah joannah.nanjekye@ibm.com

Co-authored-by: Lysandros Nikolaou lisandrosnik@gmail.com

Signed-off-by: Filipe Laíns lains@archlinux.org

This fixes both the traceback.py module and the C code for formatting syntax errors (in Python/pythonrun.c). They now both consistently do the following:

The syntax error formatting code in traceback.py was mostly rewritten; small, subtle changes were applied to the C code in pythonrun.c.

There's still a difference when the text contains embedded newlines. Neither handles these very well, and I don't think the case occurs in practice.

Automerge-Triggered-By: @gvanrossum

Change spelling of a #define in _tkinter.c from HAVE_LIBTOMMAMTH to HAVE_LIBTOMMATH, since this is used to keep track of tclTomMath.h, not tclTomMamth.h. No other file seems to refer to this variable.

distutils.tests now saves/restores warnings filters to leave them unchanged. Importing tests imports docutils which imports pkg_resources which adds a warnings filter.

OpenSSL 3.0.0-alpha2 was released today. The FIPS_mode() function has been deprecated and removed. It no longer makes sense with the new provider and context system in OpenSSL 3.0.0.

EVP_default_properties_is_fips_enabled() is good enough for our needs in unit tests. It's an internal API, too.

Signed-off-by: Christian Heimes christian@python.org

Build the FIPS provider and create a FIPS configuration file for OpenSSL 3.0.0.

Signed-off-by: Christian Heimes christian@python.org

Automerge-Triggered-By: @tiran

Co-authored-by: Victor Stinner vstinner@python.org Co-authored-by: Javier Buzzi buzzi.javier@gmail.com Co-authored-by: Hai Shi shihai1992@gmail.com Co-authored-by: Steve Dower steve.dower@python.org Co-authored-by: Curtis Bucher cpbucher5@gmail.com Co-authored-by: Pablo Galindo Pablogsal@gmail.com Co-authored-by: Dennis Sweeney 36520290+sweeneyde@users.noreply.github.com Co-authored-by: Tim Peters tim.peters@gmail.com Co-authored-by: Batuhan Taskaya batuhanosmantaskaya@gmail.com Co-authored-by: Raymond Hettinger rhettinger@users.noreply.github.com Co-authored-by: Lysandros Nikolaou lisandrosnik@gmail.com Co-authored-by: Naglis naglis@users.noreply.github.com Co-authored-by: Dong-hee Na donghee.na92@gmail.com Co-authored-by: Petr Viktorin encukou@gmail.com Co-authored-by: Marcel Plch mplch@redhat.com Co-authored-by: Julien Danjou julien@danjou.info Co-authored-by: Eric Snow ericsnowcurrently@gmail.com Co-authored-by: Zackery Spytz zspytz@gmail.com Co-authored-by: Chris Jerdonek chris.jerdonek@gmail.com Co-authored-by: Ned Batchelder ned@nedbatchelder.com Co-authored-by: Joannah Nanjekye 33177550+nanjekyejoannah@users.noreply.github.com Co-authored-by: nanjekyejoannah joannah.nanjekye@ibm.com Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Jason R. Coombs jaraco@jaraco.com Co-authored-by: Andre Delfino adelfino@gmail.com Co-authored-by: Sergey Fedoseev fedoseev.sergey@gmail.com Co-authored-by: Mark Dickinson dickinsm@gmail.com Co-authored-by: scoder stefan_ml@behnel.de Co-authored-by: Inada Naoki songofacandy@gmail.com Co-authored-by: Brad Solomon brad.solomon.1124@gmail.com Co-authored-by: Brad Solomon brsolomon@deloitte.com Co-authored-by: Terry Jan Reedy tjreedy@udel.edu Co-authored-by: Shantanu hauntsaninja@users.noreply.github.com Co-authored-by: Allen Guo guoguo12@gmail.com Co-authored-by: Tzanetos Balitsaris tbalitsaris@gmail.com Co-authored-by: jack1142 6032823+jack1142@users.noreply.github.com Co-authored-by: Michael Graczyk mgraczyk@users.noreply.github.com Co-authored-by: Arkadiusz Hiler arek.l1@gmail.com Co-authored-by: Lumír 'Frenzy' Balhar lbalhar@redhat.com Co-authored-by: Miro Hrončok miro@hroncok.cz Co-authored-by: Filipe Laíns filipe.lains@gmail.com Co-authored-by: Filipe Laíns lains@archlinux.org Co-authored-by: Guido van Rossum guido@python.org Co-authored-by: Andrew York andrew.g.york+github@gmail.com Co-authored-by: Christian Heimes christian@python.org

serhiy-storchaka added a commit that referenced this pull request

May 15, 2020

Move signals_pending from _PyRuntime.ceval to PyInterpreterState.ceval.

Move gil_drop_request member from _PyRuntimeState.ceval to PyInterpreterState.ceval.

Add --with-experimental-isolated-subinterpreters build option to configure: better isolate subinterpreters, experimental build mode.

When used, force the usage of the libc malloc() memory allocator, since pymalloc relies on the unique global interpreter lock (GIL).

sally is not a Simpsons character

Automerge-Triggered-By: @gvanrossum

Move recursion_limit member from _PyRuntimeState.ceval to PyInterpreterState.ceval.

_PyErr_ChainExceptions() now ensures that the first parameter is an exception type, as done by _PyErr_SetObject().

Automerge-Triggered-By: @corona10

This reverts commit 4e01946.

When Python is built in the experimental isolated subinterpreters mode, disable Unicode singletons and Unicode interned strings since they are shared by all interpreters.

Temporary workaround until these caches are made per-interpreter.

When Python is built with experimental isolated interpreters, disable tuple, dict and free free lists.

Temporary workaround until these caches are made per-interpreter.

Add frame_alloc() and frame_get_builtins() subfunctions to simplify _PyFrame_New_NoTrack().

In the experimental isolated subinterpreters build mode, _PyThreadState_GET() gets the autoTSSkey variable and _PyThreadState_Swap() sets the autoTSSkey variable.

Fix also code to handle init_interp_main() failure.

In the experimental isolated subinterpreters build mode, the GIL is now per-interpreter.

Move gil from _PyRuntimeState.ceval to PyInterpreterState.ceval.

new_interpreter() always get the config from the main interpreter.

In the experimental isolated subinterpreters build mode, _xxsubinterpreters.run_string() now releases the GIL.

Co-authored-by: Pablo Galindo Pablogsal@gmail.com

bpo-40480: create different regexps in the presence of multiple * patterns to prevent fnmatch() from taking exponential time.

This reverts commit d60040b.

When Python is built with experimental isolated interpreters, disable the type method cache.

Temporary workaround until the cache is made per-interpreter.

When Python is built with experimental isolated interpreters, a garbage collection now does nothing in an isolated interpreter.

Temporary workaround until subinterpreters stop sharing Python objects.

When Python is built with experimental isolated interpreters, disable the list free list.

Temporary workaround until this cache is made per-interpreter.

first is repeated twice.

Make the design more object-oriented. Split _GenericAlias on two almost independent classes: for special generic aliases like List and for parametrized generic aliases like List[int]. Add specialized subclasses for Callable, Callable[...], Tuple and Union[...].

When parsing a string with an invalid escape, the old parser used to point to the beginning of the invalid string. This commit changes the new parser to match that behaviour, since it's currently pointing to the end of the string (or to be more precise, to the beginning of the next token).

When parsing something like f(g()=2), where the name of a default arg is not a NAME, but an arbitrary expression, a specialised error message is emitted.

Module C state is now accessible from C-defined heap type methods (PEP 573). Patch by Marcel Plch and Petr Viktorin.

Co-authored-by: Marcel Plch mplch@redhat.com Co-authored-by: Victor Stinner vstinner@python.org

Declare _PyErr_GetTopmostException() with PyAPI_FUNC() to properly export the function in the C API. The function remains private ("_Py") prefix.

Co-Authored-By: Julien Danjou julien@danjou.info

(Note: PEP 554 is not accepted and the implementation in the code base is a private one for use in the test suite.)

If code running in a subinterpreter raises an uncaught exception then the "run" call in the calling interpreter fails. A RunFailedError is raised there that summarizes the original exception as a string. The actual exception type, cause, context, state, etc. are all discarded. This turned out to be functionally insufficient in practice. There is a more helpful solution (and PEP 554 has been updated appropriately).

This change adds the exception propagation behavior described in PEP 554 to the _xxsubinterpreters module. With this change a copy of the original exception is set to cause on the RunFailedError. For now we are using "pickle", which preserves the exception's state. We also preserve the original cause, context, and traceback (since "pickle" does not preserve those).

https://bugs.python.org/issue32604

Always run GitHub action jobs, even on documentation-only pull requests. So it will be possible to make a GitHub action job, like the Windows (64-bit) job, mandatory.

This fixes a possible memory leak in the C implementation of asyncio.Task.

Co-authored-by: nanjekyejoannah joannah.nanjekye@ibm.com Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>

This is for the C generator:

Exceptions:

Convert posixmodule.c ("posix" or "nt" module) to the multiphase initialization (PEP 489).

Co-authored-by: Mark Dickinson dickinsm@gmail.com

With the new parser, the error message contains always the trailing newlines, causing the comparison of the repr of the error messages in codeop to fail. This commit makes the new parser mirror the old parser's behaviour regarding trailing newlines.

Avoid unnecessary overhead in _PyDict_GetItemIdWithError() by calling _PyDict_GetItem_KnownHash() instead of the more generic PyDict_GetItemWithError(), since we already know the hash of interned strings.

Co-authored-by: Victor Stinner vstinner@python.org

Co-authored-by: Brad Solomon brsolomon@deloitte.com Co-authored-by: Terry Jan Reedy tjreedy@udel.edu

_Py_hashtable_new() now uses PyMem_Malloc/PyMem_Free allocator by default, rather than PyMem_RawMalloc/PyMem_RawFree.

PyMem_Malloc is faster than PyMem_RawMalloc for memory blocks smaller than or equal to 512 bytes.

In translate(), generate unique group names across calls.

The restores the undocumented ability to get a valid regexp by joining multiple translate() results via |.

These were added by mistake (see https://bugs.python.org/issue39481#msg366288).

Optimize _Py_hashtable_get() and _Py_hashtable_get_entry() for pointer keys:

Changes:

… now that we allow subtypes of PyCFunction.

Also add PyCMethod_CheckExact() and PyCMethod_Check() for checks against the PyCMethod subtype.

Add a new _Py_HashPointerRaw() function which avoids replacing -1 with -2 to micro-optimize hash table using pointer keys: using _Py_hashtable_hash_ptr() hash function.

Rewrite how the _tracemalloc module stores traces of other domains. Rather than storing the domain inside the key, it now uses a new hash table with the domain as the key, and the data is a per-domain traces hash table.

Rewrite _Py_hashtable_t type to always store the key as a "const void *" pointer. Add an explicit "key" member to _Py_hashtable_entry_t.

Remove _Py_hashtable_t.key_size member.

hash and compare functions drop their hash table parameter, and their 'key' parameter type becomes "const void *".

Add key_destroy_func and value_destroy_func parameters to _Py_hashtable_new_full().

marshal.c and _tracemalloc.c use these destroy functions.

Rewrite _tracemalloc to store "trace_t*" rather than directly "trace_t" in traces hash tables. Traces are now allocated on the heap memory, outside the hash table.

Add tracemalloc_copy_traces() and tracemalloc_copy_domains() helper functions.

Remove _Py_hashtable_copy() function since there is no API to copy a key or a value.

Remove also _Py_hashtable_delete() function which was commented.

_Py_hashtable_t values become regular "void *" pointers.

_Py_hashtable_get_entry_ptr() avoids comparing the entry hash: compare directly keys.

Move _Py_hashtable_get_entry_ptr() just after _Py_hashtable_get_entry_generic().

This commit fixes SyntaxError locations when the caret is not displayed, by doing the following:

Don't hardcode defining_class parameter name to "cls":

The crash that this fixes occurs when using traceback and other modules from multiple threads; del cache[filename] can raise a KeyError.

Remove the _PyUnicode_ClearStaticStrings() function from the C API. Make the function fully private (declare it with "static").

The previous commits on bpo-29587 got exception chaining working with gen.throw() in the yield case. This patch also gets the yield from case working.

As a consequence, implicit exception chaining now also works in the asyncio scenario of awaiting on a task when an exception is already active.

Tests are included for both the asyncio case and the pure generator-only case.

Move PyInterpreterState.fs_codec into a new PyInterpreterState.unicode structure.

Give a name to the fs_codec structure and use this structure in unicodeobject.c.

raw_data_manager (default for EmailPolicy, EmailMessage) does correct wrapping of 'text' parts as long as the message contains characters outside of 7bit US-ASCII set: base64 or qp Content-Transfer-Encoding is applied if the lines would be too long without it. It did not, however, do this for ascii-only text, which could result in lines that were longer than policy.max_line_length or even the rfc 998 maximum.

This changeset fixes the heuristic so that if lines are longer than policy.max_line_length, it will always apply a content-transfer-encoding so that the lines are wrapped correctly.

compileall is now able to use hardlinks to prevent duplicates in a case when .pyc files for different optimization levels have the same content.

Co-authored-by: Miro Hrončok miro@hroncok.cz Co-authored-by: Victor Stinner vstinner@python.org

Pass PEP 573 defining_class to os.DirEntry methods. The module state is now retrieve from defining_class rather than Py_TYPE(self), to support subclasses (even if DirEntry doesn't support subclasses yet).

This reverts commit fa0a66e.

This reverts commit a1d9e0a.

Cleanup also hashtable.c. Rename _Py_hashtable_t members:

This commit fixes the new parser to disallow invalid targets in the following scenarios:

Co-authored-by: Pablo Galindo Pablogsal@gmail.com

If _Py_hashtable_set() fails to grow the hash table (rehash), it now fails rather than ignoring the error.

Signed-off-by: Filipe Laíns lains@archlinux.org

Replace ztest with ztext.

Co-authored-by: nanjekyejoannah joannah.nanjekye@ibm.com

Co-authored-by: Lysandros Nikolaou lisandrosnik@gmail.com

Signed-off-by: Filipe Laíns lains@archlinux.org

This fixes both the traceback.py module and the C code for formatting syntax errors (in Python/pythonrun.c). They now both consistently do the following:

The syntax error formatting code in traceback.py was mostly rewritten; small, subtle changes were applied to the C code in pythonrun.c.

There's still a difference when the text contains embedded newlines. Neither handles these very well, and I don't think the case occurs in practice.

Automerge-Triggered-By: @gvanrossum

Change spelling of a #define in _tkinter.c from HAVE_LIBTOMMAMTH to HAVE_LIBTOMMATH, since this is used to keep track of tclTomMath.h, not tclTomMamth.h. No other file seems to refer to this variable.

distutils.tests now saves/restores warnings filters to leave them unchanged. Importing tests imports docutils which imports pkg_resources which adds a warnings filter.

OpenSSL 3.0.0-alpha2 was released today. The FIPS_mode() function has been deprecated and removed. It no longer makes sense with the new provider and context system in OpenSSL 3.0.0.

EVP_default_properties_is_fips_enabled() is good enough for our needs in unit tests. It's an internal API, too.

Signed-off-by: Christian Heimes christian@python.org

Build the FIPS provider and create a FIPS configuration file for OpenSSL 3.0.0.

Signed-off-by: Christian Heimes christian@python.org

Automerge-Triggered-By: @tiran

Co-authored-by: Victor Stinner vstinner@python.org Co-authored-by: Javier Buzzi buzzi.javier@gmail.com Co-authored-by: Hai Shi shihai1992@gmail.com Co-authored-by: Steve Dower steve.dower@python.org Co-authored-by: Curtis Bucher cpbucher5@gmail.com Co-authored-by: Pablo Galindo Pablogsal@gmail.com Co-authored-by: Dennis Sweeney 36520290+sweeneyde@users.noreply.github.com Co-authored-by: Tim Peters tim.peters@gmail.com Co-authored-by: Batuhan Taskaya batuhanosmantaskaya@gmail.com Co-authored-by: Raymond Hettinger rhettinger@users.noreply.github.com Co-authored-by: Lysandros Nikolaou lisandrosnik@gmail.com Co-authored-by: Naglis naglis@users.noreply.github.com Co-authored-by: Dong-hee Na donghee.na92@gmail.com Co-authored-by: Petr Viktorin encukou@gmail.com Co-authored-by: Marcel Plch mplch@redhat.com Co-authored-by: Julien Danjou julien@danjou.info Co-authored-by: Eric Snow ericsnowcurrently@gmail.com Co-authored-by: Zackery Spytz zspytz@gmail.com Co-authored-by: Chris Jerdonek chris.jerdonek@gmail.com Co-authored-by: Ned Batchelder ned@nedbatchelder.com Co-authored-by: Joannah Nanjekye 33177550+nanjekyejoannah@users.noreply.github.com Co-authored-by: nanjekyejoannah joannah.nanjekye@ibm.com Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Jason R. Coombs jaraco@jaraco.com Co-authored-by: Andre Delfino adelfino@gmail.com Co-authored-by: Sergey Fedoseev fedoseev.sergey@gmail.com Co-authored-by: Mark Dickinson dickinsm@gmail.com Co-authored-by: scoder stefan_ml@behnel.de Co-authored-by: Inada Naoki songofacandy@gmail.com Co-authored-by: Brad Solomon brad.solomon.1124@gmail.com Co-authored-by: Brad Solomon brsolomon@deloitte.com Co-authored-by: Terry Jan Reedy tjreedy@udel.edu Co-authored-by: Shantanu hauntsaninja@users.noreply.github.com Co-authored-by: Allen Guo guoguo12@gmail.com Co-authored-by: Tzanetos Balitsaris tbalitsaris@gmail.com Co-authored-by: jack1142 6032823+jack1142@users.noreply.github.com Co-authored-by: Michael Graczyk mgraczyk@users.noreply.github.com Co-authored-by: Arkadiusz Hiler arek.l1@gmail.com Co-authored-by: Lumír 'Frenzy' Balhar lbalhar@redhat.com Co-authored-by: Miro Hrončok miro@hroncok.cz Co-authored-by: Filipe Laíns filipe.lains@gmail.com Co-authored-by: Filipe Laíns lains@archlinux.org Co-authored-by: Guido van Rossum guido@python.org Co-authored-by: Andrew York andrew.g.york+github@gmail.com Co-authored-by: Christian Heimes christian@python.org