summaryrefslogtreecommitdiff
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-39991: Enhance uuid parser for MAC address (GH-19045)Victor Stinner2020-03-172-31/+93
| | | | Reject valid IPv6 addresses which doesn't contain "::" but have a length of 17 characters.
* bpo-39824: module_traverse() don't call m_traverse if md_state=NULL (GH-18738)Victor Stinner2020-03-171-23/+0
| | | | | | | | | | | | | Extension modules: m_traverse, m_clear and m_free functions of PyModuleDef are no longer called if the module state was requested but is not allocated yet. This is the case immediately after the module is created and before the module is executed (Py_mod_exec function). More precisely, these functions are not called if m_size is greater than 0 and the module state (as returned by PyModule_GetState()) is NULL. Extension modules without module state (m_size <= 0) are not affected. Co-Authored-By: Petr Viktorin <encukou@gmail.com>
* bpo-26067: Do not fail test_shutil / chown when gid/uid cannot be resolved ↵Matthias Braun2020-03-171-6/+11
| | | | | | | | | | | | | | | | | | | (#19032) * bpo-26067: Do not fail test_shutil.chown when gid/uid cannot be resolved There is no guarantee that the users primary uid or gid can be resolved in the unix group/account databases. Skip the last part of the chown test if we cannot resolve the gid or uid to a name. * 📜🤖 Added by blurb_it. * Address review feedback * address review feedback correctly * fix typo Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* bpo-39991: uuid._netstat_getnode() ignores IPv6 addresses (GH-19043)Victor Stinner2020-03-172-10/+49
| | | | uuid.getnode() now skips IPv6 addresses with the same string length than a MAC address (17 characters): only use MAC addresses.
* bpo-39656: Ensure `bin/python3.#` is always present in virtual environments ↵Anthony Sottile2020-03-171-1/+1
| | | | on POSIX (GH-19030)
* bpo-39638: Keep ASDL signatures in the AST nodes (GH-18515)Batuhan Taşkaya2020-03-162-4/+14
|
* bpo-38870: Implement support for ast.FunctionType in ast.unparse (GH-19016)Batuhan Taşkaya2020-03-152-3/+20
|
* bpo-39360: Ensure all workers exit when finalizing a multiprocessing Pool ↵Batuhan Taşkaya2020-03-152-2/+23
| | | | | | | | | (GH-19009) When the pull is not used via the context manager or terminate() is called, there is a system in multiprocessing.util that handles finalization of all pools via an atexit handler (the Finalize) class. This class registers the _terminate_pool handler in the registry of finalizers of the module, and that registry is called on interpreter exit via _exit_function. The problem is that the "happy" path with the context manager or manual call to finalize() does some extra steps that _terminate_pool does not. The step that is not executed when the atexit() handler calls _terminate_pool is pinging the _change_notifier queue to unblock the maintenance threads. This commit moves the notification to the _terminate_pool function so is called from both code paths. Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-39507: Add HTTP status 418 "I'm a Teapot" (GH-18291)Ross2020-03-152-0/+4
|
* bpo-39965: Correctly raise SyntaxError if await is used outside async ↵Pablo Galindo2020-03-151-0/+38
| | | | functions when PyCF_ALLOW_TOP_LEVEL_AWAIT is set (GH-19010)
* bpo-38576: Disallow control characters in hostnames in http.client (GH-18995)Ashwin Ramaswami2020-03-143-3/+56
| | | | Add host validation for control characters for more CVE-2019-18348 protection.
* bpo-39509: Update HTTP status code to follow IANA (GH-18294)Dong-hee Na2020-03-142-0/+6
| | | Add status codes 103 EARLY_HINTS and 425 TOO_EARLY.
* bpo-39871: Fix possible SystemError in atan2, copysign and remainder (GH-18806)Zackery Spytz2020-03-141-0/+16
| | | | | | In math_2(), the first PyFloat_AsDouble() call should be checked for failure before the second call. Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* Revert "bpo-39087: Add _PyUnicode_GetUTF8Buffer()" (GH-18985)Inada Naoki2020-03-141-22/+0
| | | | | | | * Revert "bpo-39087: Add _PyUnicode_GetUTF8Buffer() (GH-17659)" This reverts commit c7ad974d341d3edb6b9d2a2dcae4d3d4794ada6b. * Update unicodeobject.h
* bpo-39087: Add _PyUnicode_GetUTF8Buffer() (GH-17659)Inada Naoki2020-03-141-0/+22
| | | Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-36144: OrderedDict Union (PEP 584) (#18967)Brandt Bucher2020-03-132-0/+61
|
* bpo-36144: Update os.environ and os.environb for PEP 584 (#18911)Charles Burkland2020-03-132-1/+109
|
* bpo-39947: Move get_recursion_depth() to _testinternalcapi (GH-18974)Victor Stinner2020-03-132-2/+2
| | | | | Move get_recursion_depth() function from _testcapi to _testinternalcapi to avoid accessing PyThreadState attributes directly in _testcapi.
* bpo-39936: _aix_support uses _bootsubprocess (GH-18970)Victor Stinner2020-03-121-35/+25
| | | | | | | | AIX: Fix _aix_support module when the subprocess is not available, when building Python from scratch. It now uses new private _bootsubprocess module, rather than having two implementations depending if subprocess is available or not. So _aix_support.aix_platform() result is now the same if subprocess is available or not.
* bpo-39689: Do not test undefined casts to _Bool (GH-18964)Stefan Krah2020-03-121-0/+4
| | | - When casting to _Bool, arrays should only contain zeros or ones.
* Fix syntax error in an example in the ast documentation and sync docstrings ↵Pablo Galindo2020-03-121-2/+2
| | | | (GH-18946)
* bpo-38080: Added "getproxies" to urllib fixes in the 2to3 tool (GH-16167)José Roberto Meza Cabrera2020-03-112-1/+5
|
* bpo-39916: Use os.scandir() as context manager in Path.glob(). (GH-18880)Serhiy Storchaka2020-03-111-2/+4
|
* bpo-39915: Ensure await_args_list is updated according to the order in which ↵Karthikeyan Singaravelan2020-03-112-1/+12
| | | | | coroutines were awaited (GH-18924) Create call objects with awaited arguments instead of using call_args which has only last call value.
* bpo-39926: Update unicodedata checksum tests for Unicode 13.0 update. (GH-18913)Benjamin Peterson2020-03-101-2/+2
| | | I forget these tests required the cpu resource.
* Update some www.unicode.org URLs to use HTTPS. (GH-18912)Benjamin Peterson2020-03-102-2/+2
|
* closes bpo-39926: Update Unicode to 13.0.0. (GH-18910)Benjamin Peterson2020-03-101-0/+1
|
* Updates functools.py with consistent quotes (GH-18825)Nikita Sobolev2020-03-101-1/+1
| | | | | | I have noticed that `'` quotes are used everywhere except this particular case, which was introduced in https://github.com/python/cpython/pull/18726 So, this is a trivial fix to enforce better consistency.
* bpo-38662: ensurepip invokes pip via runpy (GH-18901)Miro Hrončok2020-03-101-3/+13
| | | | | | | | | | | | | The ensurepip module now invokes pip via the runpy module. Hence it is no longer tightly coupled with the internal API of the bundled pip version, allowing easier updates to a newer pip version both internally and for distributors. This way, any changes to the internal pip API won't mean ensurepip needs to be changed as well. Also, distributors can update their pip wheels independent on CPython release schedule. Co-Authored-By: Pradyun Gedam <pradyunsg@gmail.com> Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
* bpo-34822: Simplify AST for subscription. (GH-9605)Serhiy Storchaka2020-03-103-23/+36
| | | | | | | | | * Remove the slice type. * Make Slice a kind of the expr type instead of the slice type. * Replace ExtSlice(slices) with Tuple(slices, Load()). * Replace Index(value) with a value itself. All non-terminal nodes in AST for expressions are now of the expr type.
* bpo-38075: Fix random_seed(): use PyObject_CallOneArg() (GH-18897)Victor Stinner2020-03-101-1/+1
| | | | | | Fix the random.Random.seed() method when a bool is passed as the seed. PyObject_Vectorcall() was misused: use PyObject_CallOneArg() instead.
* bpo-1294959: Add sys.platlibdir attribute (GH-18381)Victor Stinner2020-03-107-21/+47
| | | | | | | | | | | | | Add --with-platlibdir option to the configure script: name of the platform-specific library directory, stored in the new sys.platlitdir attribute. It is used to build the path of platform-specific dynamic libraries and the path of the standard library. It is equal to "lib" on most platforms. On Fedora and SuSE, it is equal to "lib64" on 64-bit systems. Co-Authored-By: Jan Matějek <jmatejek@suse.com> Co-Authored-By: Matěj Cepl <mcepl@cepl.eu> Co-Authored-By: Charalampos Stratakis <cstratak@redhat.com>
* bpo-39828: Fix json.tool to catch BrokenPipeError (GH-18779)Dong-hee Na2020-03-102-1/+17
|
* bpo-39763: Add _bootsubprocess to build Python on AIX (GH-18872)Victor Stinner2020-03-091-0/+102
| | | | | | | | Add _bootsubprocess module to bootstrap Python: subprocess implementation which only uses the os module. On AIX, distutils.util uses _aix_support which calls subprocess.check_output(), before the _posixsubprocess module is built. Implement check_output() with os.system() in _bootsubprocess.
* bpo-19466: Py_Finalize() clears daemon threads earlier (GH-18848)Victor Stinner2020-03-091-0/+45
| | | | | | | | Clear the frames of daemon threads earlier during the Python shutdown to call objects destructors. So "unclosed file" resource warnings are now emitted for daemon threads in a more reliable way. Cleanup _PyThreadState_DeleteExcept() code: rename "garbage" to "list".
* bpo-28577: Special case added to IP v4 and v6 hosts for /32 and /128 ↵Pete Wicken2020-03-092-4/+17
| | | | | | networks (GH-18757) The `.hosts()` method now returns the single address present in a /32 or /128 network.
* bpo-36287: Make ast.dump() not output optional fields and attributes with ↵Serhiy Storchaka2020-03-102-34/+41
| | | | | | | default values. (GH-18843) The default values for optional fields and attributes of AST nodes are now set as class attributes (e.g. Constant.kind is set to None).
* bpo-27115: Use Query subclass for IDLE editor Goto (GH-18871)Terry Jan Reedy2020-03-094-12/+72
| | | | Replace tkinter tkSimpleDialog.askinteger with a standard IDLE query dialog. The new box checks for positivity before returning.
* bpo-38870: Simplify sequence interleaves in ast.unparse (GH-17892)Batuhan Taşkaya2020-03-092-37/+34
|
* bpo-39877: Remove useless PyEval_InitThreads() calls (GH-18883)Victor Stinner2020-03-091-3/+2
| | | | Py_Initialize() calls PyEval_InitThreads() since Python 3.7. It's no longer needed to call it explicitly.
* bpo-38643: Raise SystemError instead of crashing when PyNumber_ToBase is ↵Serhiy Storchaka2020-03-091-0/+14
| | | | called with invalid base. (GH-18863)
* bpo-39850: Add support for abstract sockets in multiprocessing (GH-18866)Pablo Galindo2020-03-095-5/+53
|
* bpo-38691: importlib ignores PYTHONCASEOK if -E is used (GH-18627)idomic2020-03-093-3/+9
| | | | | The importlib module now ignores the PYTHONCASEOK environment variable when the -E or -I command line options are being used.
* bpo-27115: Move IDLE Query error blanking (GH-18868)Terry Jan Reedy2020-03-091-5/+2
| | | | Move required blanking of error text to non-overridden entry_ok(). (Omit news item.)
* bpo-39517: Allow runpy.run_path() to accept path-like objects (GH-18699)Maor Kleinberger2020-03-082-2/+13
|
* bpo-39885: IDLE context menu clears selection (#18859)Terry Jan Reedy2020-03-082-0/+4
| | | | | Since clicking to get an IDLE context menu moves the cursor, any text selection should be and now is cleared.
* bpo-39852: IDLE 'Go to line' deletes selection, updates status (GH-18801)Terry Jan Reedy2020-03-083-15/+26
| | | | | | It appears standard that moving the text insert cursor away from a selection clears the selection. Clearing prevents accidental deletion of a possibly off-screen bit of text. The update is for Ln and Col on the status bar.
* bpo-36144: Update MappingProxyType with PEP 584's operators (#18814)Brandt Bucher2020-03-071-0/+19
| | | We make `|=` raise TypeError, since it would be surprising if `C.__dict__ |= {'x': 0}` silently did nothing, while `C.__dict__.update({'x': 0})` is an error.
* bpo-38894: Fix pathlib.Path.glob in the presence of symlinks and ↵Pablo Galindo2020-03-072-13/+52
| | | | | insufficient permissions (GH-18815) Co-authored-by: Matt Wozniski <mwozniski@bloomberg.net>
* bpo-39889: Fix ast.unparse() for subscript. (GH-18824)Serhiy Storchaka2020-03-072-2/+31
|