Commit Graph

27863 Commits

Author SHA1 Message Date
Yilei "Dolee" Yang 69ef1b5998
Fix a typo in the message from make_ssl_certs. (GH-30152)
The file is utils.py not util.py.

Automerge-Triggered-By: GH:gpshead
2021-12-16 21:08:18 -08:00
Jason R. Coombs 04deaee4c8
bpo-44893: Implement EntryPoint as simple class with attributes. (GH-30150)
* bpo-44893: Implement EntryPoint as simple class and deprecate tuple access in favor of attribute access. Syncs with importlib_metadata 4.8.1.

* Apply refactorings found in importlib_metadata 4.8.2.
2021-12-16 15:49:42 -05:00
Jason R. Coombs 109d966021
bpo-46105: Honor spec when generating requirement specs with urls and extras. (GH-30151) 2021-12-16 15:48:35 -05:00
Irit Katriel 30322c497e
bpo-22047: [argparse] deprecate nested argument groups and mutually exclusive groups (GH-30098) 2021-12-16 15:31:08 +00:00
Ken Jin d6e1374716
bpo-45755: [typing] Reveal class attributes of generic in generic aliases in `dir()` (GH-29962) 2021-12-16 22:29:59 +08:00
AN Long f62420c3d3
Remove spaces in empty lines (GH-30121) 2021-12-16 01:35:21 +09:00
Irit Katriel 86de99588d
bpo-26952: [argparse] clearer error when formatting an empty mutually… (GH-30099) 2021-12-15 10:08:26 +00:00
Mark Shannon 9f8f45144b
bpo-44525: Split calls into PRECALL and CALL (GH-30011)
* Add 3 new opcodes for calls: PRECALL_METHOD, CALL_NO_KW, CALL_KW.

* Update specialization to handle new CALL opcodes.

* Specialize call to method descriptors.

* Remove old CALL opcodes: CALL_FUNCTION, CALL_METHOD, CALL_METHOD_KW, CALL_FUNCTION_KW.
2021-12-14 18:22:44 +00:00
Irit Katriel d60457a667
bpo-45292: [PEP-654] add except* (GH-29581) 2021-12-14 16:48:15 +00:00
Vinay Sajip 850aefc2c6
bpo-46063: Add 'delay=True' to file handler initialization. (GH-30103) 2021-12-14 16:46:07 +00:00
Vinay Sajip cb589d1b6b
bpo-46063: Improve algorithm for computing which rolled-over log file… (GH-30093) 2021-12-14 00:53:37 +00:00
Serhiy Storchaka e08c0d8eec
bpo-27718: Fix help for the signal module (GH-30063)
Functions signal(), getsignal(), pthread_sigmask(), sigpending(),
sigwait() and valid_signals() were omitted.

If __all__ is not defined all non-builtin functions should have
correct __module__.
2021-12-13 11:21:55 +02:00
Pablo Galindo Salgado c6d1c52c16
bpo-46054: Correct non-utf8 character tests in test_exceptions (GH-30074) 2021-12-12 16:53:00 +00:00
Christian Sattler e6fe10d340
bpo-45874: Handle empty query string correctly in urllib.parse.parse_qsl (#29716) 2021-12-12 10:41:12 +02:00
Pablo Galindo Salgado 4325a766f5
bpo-46054: Fix parsing error when parsing non-utf8 characters in source files (GH-30068) 2021-12-12 07:06:50 +00:00
Pablo Galindo Salgado 59435eea08
bpo-46042: Improve SyntaxError locations in the symbol table (GH-30059) 2021-12-11 21:28:24 +00:00
Eric V. Smith e029c53e1a
bpo-44674: Use unhashability as a proxy for mutability for default dataclass __init__ arguments. (GH-29867)
`@dataclass` in 3.10 prohibits using list, dict, or set as default values. It does this to avoid the mutable default problem. This test is both too strict, and not strict enough. Too strict, because some immutable subclasses should be safe, and not strict enough, because other mutable types should be prohibited. With this change applied, `@dataclass` now uses unhashability as a proxy for mutability: if objects aren't hashable, they're assumed to be mutable.
2021-12-11 16:12:17 -05:00
Steve Dower bfc59ed0a0
bpo-46049: Fixes ._pth support on non-Windows (GH-30051) 2021-12-11 15:06:17 +00:00
Steve Dower 971ece8e17
bpo-46048: Fix parsing of single character lines in getpath readlines() (GH-30048) 2021-12-11 13:43:40 +00:00
Carl Friedrich Bolz-Tereick b593bdc780
bpo-37971: fix the position of decorator application (GH-30027)
The line numbers of actually calling the decorator functions of
functions and classes was wrong (as opposed to loading them, were they
have been correct previously too).

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-12-11 00:45:02 +01:00
Weipeng Hong 28179aac79
bpo-42918: Improve build-in function compile() in mode 'single' (GH-29934)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2021-12-11 00:44:26 +01:00
Yurii Karabas 3cb357a2e6
bpo-46014: Add ability to use typing.Union with singledispatch (GH-30017) 2021-12-11 00:27:55 +01:00
Kumar Aditya 810c1769f1
bpo-27062: add `__all__` to inspect module (GH-30003) 2021-12-11 00:05:23 +01:00
neonene 3f398a77d3
bpo-45582: Fix test_embed failure during a PGO build on Windows (GH-30014)
This defines VPATH differently in PGO instrumentation builds, to account for a different default output directory. It also adds sys._vpath on Windows to make the value available to sysconfig so that it can be used in tests.
2021-12-10 17:13:55 +00:00
Raymond Hettinger 3fee7776e6
Move error test to the function that needs it. Improve error message. (GH-30008) 2021-12-09 20:24:50 -06:00
Gabriele N. Tornetta 50669083fe
bpo-43931: Export Python version as API data (GH-25577)
When Python is embedded in other applications, it is not easy to determine which version of Python is being used. This change exposes the Python version as part of the API data. Tools like Austin (https://github.com/P403n1x87/austin) can benefit from this data when targeting applications like uWSGI, as the Python version can then be inferred systematically by looking at the exported symbols rather than relying on unreliable pattern matching or other hacks (like remote code execution etc...).

Automerge-Triggered-By: GH:pablogsal
2021-12-09 17:52:05 -08:00
Pablo Galindo Salgado f0d290d25c
bpo-46025: Fix a crash in the atexit module for auto-unregistering functions (GH-30002) 2021-12-09 13:53:44 +00:00
Kumar Aditya af6b406885
bpo-25066: Added repr for multiprocessing.Event (GH-29749)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-12-09 13:16:45 +00:00
Steve Dower 7778116c2f
bpo-46015: Fixes calculation of sys.path in a venv on Windows (GH-29992)
Also ensures that pybuilddir.txt is written early enough in the build to be picked up by later steps.
2021-12-08 19:25:58 +00:00
Jacob Hayes 3cb9731b7e
bpo-45359: Support TopologicalSorter type subscript (GH-28714)
* Support TopologicalSorter type subscript

* 📜🤖 Added by blurb_it.

* Add TopologicalSorter to GenericAlias tests

* Update Misc/NEWS.d/next/Library/2021-10-03-22-27-35.bpo-45359.LX_uxe.rst

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
2021-12-08 20:52:57 +02:00
Andrew Svetlov d4363d2140
bpo-45813: Drop redundant assertion from frame.clear() (GH-29990)
* bpo-45813: Drop redundant assertion from frame.clear()

* Move assertion to frame_dealloc()
2021-12-08 16:05:00 +00:00
Mark Shannon 69806b9516
bpo-46009: Do not exhaust generator when send() method raises (GH-29986) 2021-12-08 12:09:26 +00:00
Mark Shannon 8319114fee
bpo-45947: Place dict and values pointer at fixed (negative) offset just before GC header. (GH-29879)
* Place __dict__ immediately before GC header for plain Python objects.

* Fix up lazy dict creation logic to use managed dict pointers.

* Manage values pointer, placing them directly before managed dict pointers.

* Convert hint-based load/store attr specialization target managed dict classes.

* Specialize LOAD_METHOD for managed dict objects.

* Remove unsafe _PyObject_GC_Calloc function.

* Remove unsafe _PyObject_GC_Malloc() function.

* Add comment explaning use of Py_TPFLAGS_MANAGED_DICT.
2021-12-07 16:02:53 +00:00
Pablo Galindo Salgado 1c7a1c3be0
bpo-46004: Fix error location for loops with invalid targets (GH-29959) 2021-12-07 13:02:15 +00:00
Victor Stinner cf7eaa4617
Revert "bpo-28533: Remove asyncore, asynchat, smtpd modules (GH-29521)" (GH-29951)
This reverts commit 9bf2cbc4c4.
2021-12-07 12:31:04 +01:00
Irit Katriel a310fd83a0
bpo-45890: Add tests for tracing try-except-finally blocks (GH-29746) 2021-12-07 10:50:37 +00:00
Steve Dower b7ef27bc08
bpo-45582: Ensure PYTHONHOME still overrides detected build prefixes (GH-29948) 2021-12-07 00:07:35 +00:00
Kumar Aditya 265918bb1d
bpo-23819: asyncio: Replace AssertionError with TypeError where it makes sense (GH-29894) 2021-12-07 01:40:35 +02:00
neonene af1db4eb55
bpo-45582: Fix getpath_isxfile() and test_embed on Windows (GH-29930) 2021-12-06 17:25:19 +00:00
Mark Shannon 299483c95d
bpo-45963: Make space for the InterpreterFrame of a generator in that generator. (GH-29891)
* Make generator, coroutine and async gen structs all the same size.

* Store interpreter frame in generator (and coroutine). Reduces the number of allocations neeeded for a generator from two to one.
2021-12-06 10:13:49 +00:00
Serhiy Storchaka 2b318ce1c9
bpo-45664: Fix resolve_bases() and new_class() for GenericAlias instance as a base (GH-29298) 2021-12-05 22:44:01 +02:00
Serhiy Storchaka 446be16686
bpo-45663: Fix is_dataclass() for dataclasses which are subclasses of types.GenericAlias (GH-29294) 2021-12-05 22:42:50 +02:00
Serhiy Storchaka 1fd4de5bdd
bpo-45662: Fix the repr of InitVar with a type alias to the built-in class (GH-29291)
For example, InitVar[list[int]].
2021-12-05 22:41:58 +02:00
Serhiy Storchaka d15cdb2f32
bpo-27946: Fix possible crash in ElementTree.Element (GH-29915)
Getting an attribute via attrib.get() simultaneously with replacing
the attrib dict can lead to access to deallocated dict.
2021-12-05 14:22:54 +02:00
Irit Katriel 5bb7ef2768
bpo-45607: Make it possible to enrich exception displays via setting their __note__ field (GH-29880) 2021-12-03 22:01:15 +00:00
Steve Dower 99fcf15052
bpo-45582: Port getpath[p].c to Python (GH-29041)
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.
2021-12-03 00:08:42 +00:00
Alex Waygood b2afdc95cc
bpo-45535: Improve output of Enum ``dir()`` (GH-29316)
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.
2021-12-02 08:49:52 -08:00
Victor Stinner a6c3b0faa1
bpo-45954: Rename PyConfig.no_debug_ranges to code_debug_ranges (GH-29886)
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.
2021-12-02 11:43:37 +01:00
Raymond Hettinger a39f46afde
bpo-45876: Correctly rounded stdev() and pstdev() for the Decimal case (GH-29828) 2021-11-30 18:20:08 -06:00
Weipeng Hong af8c8caaf5
bpo-30533:Add function inspect.getmembers_static that does not call properties or dynamic properties. (#20911)
* Add function inspect.getmembers_static that does not call properties or dynamic
properties.

* update _getmembers args

* Update Misc/NEWS.d/next/Library/2020-06-16-18-00-56.bpo-30533.StL57t.rst

Co-authored-by: Itamar Ostricher <itamarost@gmail.com>

* Update Lib/inspect.py

Co-authored-by: Itamar Ostricher <itamarost@gmail.com>

* Removes the copy pasted doc string

Co-authored-by: Itamar Ostricher <itamarost@gmail.com>
Co-authored-by: Dino Viehland <dinoviehland@gmail.com>
2021-11-30 10:23:13 -08:00
Adrian Garcia Badaracco bd9342ddde
no-issue: remove unused import from test_graphlib.py (GH-29853) 2021-11-30 11:27:37 +09:00
Kumar Aditya 02b5ac6091
bpo-45653: fix test_embed on windows (GH-29814) 2021-11-29 12:27:34 -08:00
Gideon 6266e4af87
bpo-45917: Add math.exp2() method - return 2 raised to the power of x (GH-29829)
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
2021-11-29 18:55:43 +00:00
Erlend Egeberg Aasland c4a69a4ad0
bpo-45828: Use unraisable exceptions within sqlite3 callbacks (FH-29591) 2021-11-29 15:22:32 +00:00
Mark Shannon 60929576e4
bpo-45786: Allocate space for frame in frame object. (GH-29729) 2021-11-29 12:34:59 +00:00
Sam Bull 934a826237
bpo-37658: Actually return result in race condition (GH-29202) 2021-11-29 10:12:57 +02:00
180909 46c8d91571
bpo-19460: Add test for MIMENonMultipart (GH-29817) 2021-11-28 11:24:41 +02:00
Irit Katriel 4dfae6f38e
bpo-45614: Fix traceback display for exceptions with invalid module name (GH-29726) 2021-11-27 22:00:10 +00:00
Raymond Hettinger af9ee57b96
bpo-45876: Improve accuracy for stdev() and pstdev() in statistics (GH-29736)
* Inlined code from variance functions

* Added helper functions for the float square root of a fraction

* Call helper functions

* Add blurb

* Fix over-specified test

* Add a test for the _sqrt_frac() helper function

* Increase the tested range

* Add type hints to the internal function.

* Fix test for correct rounding

* Simplify ⌊√(n/m)⌋ calculation

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

* Add comment and beef-up tests

* Test for zero denominator

* Add algorithmic references

* Add test for the _isqrt_frac_rto() helper function.

* Compute the 109 instead of hard-wiring it

* Stronger test for _isqrt_frac_rto()

* Bigger range

* Bigger range

* Replace float() call with int/int division to be parallel with the other code path.

* Factor out division. Update proof link. Remove internal type declaration

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
2021-11-26 22:54:50 -07:00
Pablo Galindo Salgado 24c10d2943
bpo-45727: Only trigger the 'did you forgot a comma' error suggestion if inside parentheses (GH-29757) 2021-11-24 22:21:23 +00:00
Pablo Galindo Salgado abfc794bbf
bpo-45822: Minor cleanups to the test_Py_CompileString test (GH-29750) 2021-11-24 18:30:03 +00:00
Jason R. Coombs d5cd2effa6
bpo-45514: Deprecate importlib resources legacy functions. (GH-29036)
* 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>
2021-11-24 02:51:37 -05:00
Miro Hrončok ae1965ccb4
bpo-45703: Invalidate _NamespacePath cache on importlib.invalidate_ca… (GH-29384)
Consider the following directory structure:

    .
    └── PATH1
        └── namespace
            └── sub1
                └── __init__.py

And both PATH1 and PATH2 in sys path:

    $ PYTHONPATH=PATH1:PATH2 python3.11
    >>> import namespace
    >>> import namespace.sub1
    >>> namespace.__path__
    _NamespacePath(['.../PATH1/namespace'])
    >>> ...

While this interpreter still runs, PATH2/namespace/sub2 is created:

    .
    ├── PATH1
    │   └── namespace
    │       └── sub1
    │           └── __init__.py
    └── PATH2
        └── namespace
            └── sub2
                └── __init__.py

The newly created module cannot be imported:

    >>> ...
    >>> namespace.__path__
    _NamespacePath(['.../PATH1/namespace'])
    >>> import namespace.sub2
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ModuleNotFoundError: No module named 'namespace.sub2'

Calling importlib.invalidate_caches() now newly allows to import it:

    >>> import importlib
    >>> importlib.invalidate_caches()
    >>> namespace.__path__
    _NamespacePath(['.../PATH1/namespace'])
    >>> import namespace.sub2
    >>> namespace.__path__
    _NamespacePath(['.../PATH1/namespace', '.../PATH2/namespace'])

This was not previously possible.
2021-11-23 07:38:02 -08:00
Eric Snow 8ed1495ad9
bpo-45783: Preserve file moves and deletions in the tests for the freeze tool. (GH-29527)
Use shutil.copytree rather than Git, which might be missing (or configured
differently) when testing Python built from a source release.
2021-11-23 14:43:40 +01:00
Mark Shannon 135cabd328
bpo-44525: Copy free variables in bytecode to allow calls to inner functions to be specialized (GH-29595)
* 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.
2021-11-23 09:53:24 +00:00
Irit Katriel 4d6c0c0cce
bpo-45871: Refactor except matcher validation into a separate function so that it can be reused. Add missing unit test. (GH-29711) 2021-11-22 16:56:23 +00:00
Carl Friedrich Bolz-Tereick 4fad314246
bpo-45859: Mark test_field_descriptor in test_collections as CPython-only (GH-29691) 2021-11-22 08:44:57 -06:00
Mark Shannon 7fd92a8b7e
bpo-45813: Make sure that frame->generator is NULLed when generator is deallocated. (GH-29700) 2021-11-22 14:01:23 +00:00
Eric V. Smith d3062f672c
bpo-44649: Fix dataclasses(slots=True) with a field with a default, but init=False (GH-29692)
Special handling is needed, because for non-slots dataclasses the instance attributes are not set: reading from a field just references the class's attribute of the same name, which contains the default value. But this doesn't work for classes using __slots__: they don't read the class's attribute. So in that case (and that case only), initialize the instance attribute. Handle this for both normal defaults, and for fields using default_factory.
2021-11-22 08:26:12 -05:00
Raymond Hettinger d2b55b07d2
bpo-45766: Add direct proportion option to linear_regression(). (#29490)
* bpo-45766: Add direct proportion option to linear_regression().

* Update 2021-11-09-09-18-06.bpo-45766.dvbcMf.rst

* Use ellipsis to avoid round-off issues.

* Update Misc/NEWS.d/next/Library/2021-11-09-09-18-06.bpo-45766.dvbcMf.rst

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>

* Update signature in main docs

* Fix missing comma

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-11-21 08:39:26 -06:00
Eric V. Smith f7638dd0f9
Added kw_only parameter to make_dataclasses. (GH-29679) 2021-11-20 18:25:56 -05:00
Logan Jones fdc0e09c33
bpo-44733: Add max_tasks_per_child to ProcessPoolExecutor (GH-27373)
Co-authored-by: Antoine Pitrou <antoine@python.org>
2021-11-20 21:19:41 +01:00
Pablo Galindo Salgado 81f4e116ef
bpo-45811: Improve error message when source code contains invisible control characters (GH-29654) 2021-11-20 18:28:28 +00:00
Pablo Galindo Salgado 7a1d932528
bpo-45450: Improve syntax error for parenthesized arguments (GH-28906) 2021-11-20 18:27:40 +00:00
Raymond Hettinger 48744db70e
bpo-45852: Fix the Counter/iter test for statistics.mode() (GH-29667)
Suggested by Stefan Pochmann.
2021-11-20 11:01:09 -06:00
Pablo Galindo Salgado fdcc46d955
bpo-45848: Allow the parser to get error lines from encoded files (GH-29646) 2021-11-20 15:36:07 +01:00
Steve Dower 4c616911b6
bpo-45506: Fix test_embed expecting to not find stdlib in source tree build when stdlib has been installed. (GH-29649) 2021-11-20 00:11:40 +00:00
Pablo Galindo Salgado 546cefcda7
bpo-45727: Make the syntax error for missing comma more consistent (GH-29427) 2021-11-19 23:11:57 +00:00
Ruben Vorderman 0ff3d95b98
bpo-45507: EOFErrors should be thrown for truncated gzip members (GH-29029) 2021-11-19 19:07:05 +01:00
Mark Shannon 337cb480e9
bpo-45709: Fix tracing when exception is handled. (GH-29638) 2021-11-19 15:16:49 +00:00
Dennis Sweeney 036fead695
bpo-45609: Specialize STORE_SUBSCR (GH-29242)
* Specialize STORE_SUBSCR for list[int], and dict[object]

* Adds _PyDict_SetItem_Take2 which consumes references to the key and values.
2021-11-19 10:30:37 +00:00
Sam Gross df3e53d86b
bpo-45835: Fix race condition in test_queue (#29601)
Some of the tests in test_queue had a race condition in which a
non-sentinel value could be enqueued after the final sentinel value
leading to not all the inputs being processed (and test failures).

This changes feed() to enqueue a sentinel once the inputs are exhausted,
which guarantees that the final queued object is a sentinel. This
requires the number of feeder threads to match the number of consumer
threads, but that's already the case in the relevant tests.
2021-11-18 09:51:30 +01:00
Dennis Sweeney 5d90c467c0
bpo-45826: Fix a crash in suggestions.c by checking for `traceback is None` (GH-29590) 2021-11-18 00:03:52 +01:00
Sam Gross 736684b1bb
bpo-42540: reallocation of id_mutex should not force default allocator (GH-29564)
Unlike the other locks reinitialized by _PyRuntimeState_ReInitThreads,
the "interpreters.main->id_mutex" is not freed by _PyRuntimeState_Fini
and should not force the default raw allocator.
2021-11-17 21:51:03 +01:00
Erlend Egeberg Aasland 5f9247e36a
bpo-45512: Extend `sqlite3` test suite regarding isolation levels (GH-29576) 2021-11-17 19:01:54 +09:00
Emmanuel Arias 15409c720b
bpo-28806: Continue work: improve the netrc library (GH-26330)
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>
2021-11-17 11:07:54 +02:00
Pablo Galindo Salgado da20d7401d
bpo-45822: Respect PEP 263's coding cookies in the parser even if flags are not provided (GH-29582) 2021-11-16 12:30:47 -08:00
Erlend Egeberg Aasland 9d6215a54c
bpo-45126: Harden `sqlite3` connection initialisation (GH-28227) 2021-11-16 15:53:35 +01:00
Irit Katriel 8b06d01507
bpo-45292: Use raw strings for regex in tests (GH-29545) 2021-11-16 17:28:21 +05:30
Victor Stinner 9bf2cbc4c4
bpo-28533: Remove asyncore, asynchat, smtpd modules (GH-29521)
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
2021-11-16 00:29:17 +01:00
Erlend Egeberg Aasland 822c3dcce3
bpo-45512: Raise exception if sqlite3.Connection.__init__ is called with bad isolation level (#29561)
* bpo-45512: Raise sqlite3.Connection.__init__ is called with bad isolation level

* Also explicitly test allowed isolation levels

* Use subTest for better error messages if something goes wrong

* Update Lib/test/test_sqlite3/test_dbapi.py

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2021-11-15 21:55:38 +09:00
Pablo Galindo Salgado 25835c518a
bpo-45738: Fix computation of error location for invalid continuation (GH-29550)
characters in the parser
2021-11-14 01:06:41 +00:00
Victor Stinner 9d32714384
bpo-45745: Remove regrtest --findleaks options (GH-29514)
Remove the --findleaks command line option of regrtest: use the
--fail-env-changed option instead. Since Python 3.7, it was a
deprecated alias to the --fail-env-changed option.
2021-11-12 16:19:09 +01:00
Raymond Hettinger 807f839bbf
bpo-45235: Revert an argparse bugfix that caused a regression (GH-29525)
* Revert "bpo-45235: Fix argparse overrides namespace with subparser defaults (GH-28420) (GH-28443)"

This reverts commit a18d52269a.
2021-11-11 21:53:23 -06:00
Brandt Bucher 27b69e60da
bpo-45773: Stop "optimizing" certain jump patterns (GH-29505) 2021-11-11 11:44:34 -08:00
Brandt Bucher 9178f533ff
bpo-45636: Merge all numeric operators (GH-29482) 2021-11-10 22:56:22 -08:00
Erlend Egeberg Aasland c1323d4b8c
bpo-45754: Use correct SQLite limit when checking statement length (GH-29489) 2021-11-10 18:46:11 +00:00
Irit Katriel 4cdeee5978
bpo-45711: remove unnecessary DUP_TOP and POP in exception handling (GH-29495) 2021-11-10 18:08:28 +00:00
Irit Katriel cb414cf0e2
bpo-45757: Fix bug where dis produced an incorrect oparg on EXTENDED_ARG before a no-arg opcode (GH-29480) 2021-11-09 20:07:38 +00:00
Carl Friedrich Bolz-Tereick 2819e98d10
bpo-45764: improve error message when missing '(' after 'def' (GH-29484)
to achieve this, change the grammar to expect the '(' token after 'def' NAME.

Automerge-Triggered-By: GH:pablogsal
2021-11-09 06:03:32 -08:00