summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* bpo-40234: Revert "bpo-37266: Daemon threads are now denied in ↵Victor Stinner2020-04-122-28/+19
| | | | | subinterpreters (GH-14049)" (GH-19456) This reverts commit 066e5b1a917ec2134e8997d2cadd815724314252.
* bpo-40246: Report a better error message for invalid string prefixes (GH-19476)Lysandros Nikolaou2020-04-121-1/+1
|
* bpo-31758: Prevent crashes when using an uninitialized ↵Oren Milman2020-04-121-0/+15
| | | | _elementtree.XMLParser object (GH-3997)
* bpo-13743: Add some documentation strings to xml.dom.minidom (GH-16355)Alex Itkes2020-04-121-0/+23
|
* bpo-39011: Preserve line endings within ElementTree attributes (GH-18468)mefistotelis2020-04-122-9/+10
| | | | | | | * bpo-39011: Preserve line endings within attributes Line endings within attributes were previously normalized to "\n" in Py3.7/3.8. This patch removes that normalization, as line endings which were replaced by entity numbers should be preserved in original form.
* bpo-40126: Fix reverting multiple patches in unittest.mock. (GH-19351)Serhiy Storchaka2020-04-112-49/+27
| | | | | Patcher's __exit__() is now never called if its __enter__() is failed. Returning true from __exit__() silences now the exception.
* bpo-39481: PEP 585 for a variety of modules (GH-19423)Batuhan Taşkaya2020-04-1013-0/+57
| | | | | | | | | | - concurrent.futures - ctypes - http.cookies - multiprocessing - queue - tempfile - unittest.case - urllib.parse
* bpo-39481: PEP 585 for difflib, filecmp, fileinput (#19422)Ethan Smith2020-04-104-0/+17
|
* bpo-39481: PEP 585 for enumerate, AsyncGeneratorType, mmap (GH-19421)Ethan Smith2020-04-101-4/+5
|
* bpo-39481: PEP 585 for ipaddress.py (GH-19418)Batuhan Taşkaya2020-04-102-0/+10
|
* Generic itertools.chain (GH-19417)Ethan Smith2020-04-101-1/+3
|
* bpo-31904: Fix test_c_locale_coercion encodings for VxWorks RTOS (GH-19448)pxinwr2020-04-091-0/+4
|
* bpo-40187: Refactor typing.TypedDict. (GH-19372)Serhiy Storchaka2020-04-081-34/+33
|
* bpo-40185: Refactor typing.NamedTuple (GH-19371)Serhiy Storchaka2020-04-082-59/+54
|
* bpo-39481: Make os.DirEntry generic (GH-19415)Batuhan Taşkaya2020-04-071-1/+2
|
* bpo-40089: Add _at_fork_reinit() method to locks (GH-19195)Victor Stinner2020-04-072-7/+43
| | | | | | | | | | | | | | | Add a private _at_fork_reinit() method to _thread.Lock, _thread.RLock, threading.RLock and threading.Condition classes: reinitialize the lock after fork in the child process; reset the lock to the unlocked state. Rename also the private _reset_internal_locks() method of threading.Event to _at_fork_reinit(). * Add _PyThread_at_fork_reinit() private function. It is excluded from the limited C API. * threading.Thread._reset_internal_locks() now calls _at_fork_reinit() on self._tstate_lock rather than creating a new Python lock object.
* bpo-39481: Implementation for PEP 585 (#18239)Guido van Rossum2020-04-0715-53/+282
| | | | | | | | | | | | This implements things like `list[int]`, which returns an object of type `types.GenericAlias`. This object mostly acts as a proxy for `list`, but has attributes `__origin__` and `__args__` that allow recovering the parts (with values `list` and `(int,)`. There is also an approximate notion of type variables; e.g. `list[T]` has a `__parameters__` attribute equal to `(T,)`. Type variables are objects of type `typing.TypeVar`.
* bpo-40214: Temporarily disable a ctypes test (GH-19404)Zachary Ware2020-04-071-2/+5
| | | | | Only one particular sub-test of ctypes.test.test_loading.test_load_dll_with_flags is disabled, which caused failures on Azure Pipelines CI.
* bpo-40196: Fix a bug in the symtable when reporting inspecting global ↵Pablo Galindo2020-04-062-2/+6
| | | | variables (GH-19391)
* bpo-40182: Remove the _field_types attribute of the NamedTuple class (GH-19368)Serhiy Storchaka2020-04-042-8/+4
|
* bpo-36517: Raise error on multiple inheritance with NamedTuple (GH-19363)Serhiy Storchaka2020-04-042-0/+10
|
* Convert tuples to sets for faster searches (GH-19365)Raymond Hettinger2020-04-041-3/+3
|
* bpo-38689: avoid IDLE hanging when calltip fails getting a signature (GH-17152)Tal Einat2020-04-043-15/+30
| | | Inspect.signature failed on the test case because its isinstance call raised.
* bpo-40141: Include the value in the column position for keyword AST nodes ↵Pablo Galindo2020-04-031-1/+1
| | | | (GH-19348)
* bpo-40147: Move the check for duplicate keywords to the compiler (GH-19289)Pablo Galindo2020-04-032-2/+2
|
* bpo-40112: distutils test_search_cpp: Fix logic to determine if C compiler ↵Michael Felt2020-04-031-2/+1
| | | | is xlc on AIX (GH-19225)
* bpo-40140: test_builtin.PtyTests registers SIGHUP handler (GH-19314)Victor Stinner2020-04-022-8/+21
| | | | | | | | test_builtin.PtyTests now registers an handler for SIGHUP signal. Closing the PTY file descriptor can emit a SIGHUP signal: just ignore it. run_child() now also closes the PTY file descriptor before waiting for the process completition, otherwise the test hangs on AIX.
* lib2to3: Support named assignment expressions (GH-12702)Tim Hatch2020-04-025-6/+25
| | | | | | | | | | | | There are two copies of the grammar -- the one used by Python itself as Grammar/Grammar, and the one used by lib2to3 which has necessarily diverged at Lib/lib2to3/Grammar.txt because it needs to support older syntax an we want it to be reasonable stable to avoid requiring fixer rewrites. This brings suport for syntax like `if x:= foo():` to match what the live Python grammar does. This should've been added at the time of the walrus operator itself, but lib2to3 being independent is often overlooked. So we do consider this a bugfix rather than enhancement.
* bpo-38972: Link to instructions to change PowerShell execution policy (GH-19131)Derek Keeler2020-04-021-4/+15
|
* bpo-40115: Fix refleak in test_asyncio.test_run_in_executor_cancel() (GH-19282)Kyle Stanley2020-04-021-0/+2
| | | Call explicitly self.loop.shutdown_default_executor().
* bpo-40094: CGIHTTPRequestHandler logs exit code (GH-19285)Victor Stinner2020-04-021-2/+3
| | | | | | | CGIHTTPRequestHandler of http.server now logs the CGI script exit code, rather than the CGI script exit status of os.waitpid(). For example, if the script is killed by signal 11, it now logs: "CGI script exit code -11."
* bpo-39503: CVE-2020-8492: Fix AbstractBasicAuthHandler (GH-18284)Victor Stinner2020-04-022-52/+107
| | | | | | | | | | | | | The AbstractBasicAuthHandler class of the urllib.request module uses an inefficient regular expression which can be exploited by an attacker to cause a denial of service. Fix the regex to prevent the catastrophic backtracking. Vulnerability reported by Ben Caller and Matt Schwager. AbstractBasicAuthHandler of urllib.request now parses all WWW-Authenticate HTTP headers and accepts multiple challenges per header: use the realm of the first Basic challenge. Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
* bpo-40094: mailcap.test() uses waitstatus_to_exitcode() (GH-19287)Victor Stinner2020-04-021-0/+1
| | | | mailcap.test() now uses os.waitstatus_to_exitcode() to convert os.system() exit status into an exit code.
* bpo-40141: Add line and column information to ast.keyword nodes (GH-19283)Pablo Galindo2020-04-011-1/+1
|
* bpo-40094: Add os.waitstatus_to_exitcode() (GH-19201)Victor Stinner2020-04-0111-58/+50
| | | | | | | | | | | | | | Add os.waitstatus_to_exitcode() function to convert a wait status to an exitcode. Suggest waitstatus_to_exitcode() usage in the documentation when appropriate. Use waitstatus_to_exitcode() in: * multiprocessing, os, subprocess and _bootsubprocess modules; * test.support.wait_process(); * setup.py: run_command(); * and many tests.
* bpo-39682: make `pathlib.Path` immutable by removing (undocumented) support ↵Barney Gale2020-04-012-49/+18
| | | | | | for "closing" a path by using it as a context manager (GH-18846) Support for using a path as a context manager remains, and is now a no-op.
* bpo-33262: Deprecate passing None for `s` to shlex.split() (GH-6514)Zackery Spytz2020-04-012-1/+10
| | | | | | | | | * bpo-33262: Deprecate passing None for `s` to shlex.split() This reads the string to split from standard input. * Update What's New. * Fix shlex.rst
* bpo-40121: Fix exception type in test (GH-19267)Steve Dower2020-04-011-1/+1
|
* Handle when IOCTL_VM_SOCKETS_GET_LOCAL_CID does not exist in "socket" (GH-19270)Pablo Galindo2020-04-011-0/+2
| | | | | | | Running `test_socket` or anything that depends on it (like python -m test.pythoninfo) crashes if IOCTL_VM_SOCKETS_GET_LOCAL_CID does not exist in the socket module. Automerge-Triggered-By: @pablogsal
* bpo-40094: Add missing import to wait_process() (GH-19268)Victor Stinner2020-04-011-0/+2
|
* bpo-31160: Fix race condition in test_os.PtyTests (GH-19263)Victor Stinner2020-03-311-2/+9
| | | | bpo-31160, bpo-40094: Wait until the process completes before closing the PTY to prevent sending SIGHUP to the child process.
* bpo-40094: Add _bootsubprocess._waitstatus_to_exitcode (GH-19264)Victor Stinner2020-03-311-11/+15
| | | | | | | * Add _waitstatus_to_exitcode() helper function to _bootsubprocess. * Enhance check_output() error message if the command fails. _bootsubprocess no longer handles WIFSTOPPED() case: it now raises a ValueError.
* bpo-40094: Enhance threading tests (GH-19260)Victor Stinner2020-03-312-31/+39
| | | | | | | * Rewrite test_thread.test_forkinthread() to use support.wait_process() and wait for the child process in the main thread, not in the spawned thread. * test_threading now uses support.wait_process() and checks the child process exit code to detect crashes.
* bpo-40094: Enhance fork and wait tests (GH-19259)Victor Stinner2020-03-314-24/+15
| | | | | | * test_fork1: remove duplicated wait_impl() method: reuse fork_wait.py implementation instead. * Use exit code different than 0 to ensure that we executed the expected code path.
* bpo-40094: Add test.support.wait_process() (GH-19254)Victor Stinner2020-03-3117-103/+109
| | | | | | | | | Moreover, the following tests now check the child process exit code: * test_os.PtyTests * test_mailbox.test_lock_conflict() * test_tempfile.test_process_awareness() * test_uuid.testIssue8621() * multiprocessing resource tracker tests
* bpo-40003: test.bisect_cmd copies Python options (GH-19246)Victor Stinner2020-03-311-2/+14
| | | | | test.bisect_cmd now copies Python command line options like -O or -W. Moreover, emit a warning if test.bisect_cmd is used with -w/--verbose2 option.
* bpo-40121: Fixes audit event raised on creating a new socket (GH-19238)Steve Dower2020-03-312-0/+34
|
* bpo-40108: Improve the error message in runpy when importing a module that ↵Pablo Galindo2020-03-312-0/+13
| | | | includes the extension (GH-19239)
* Fix bug in test_collections.py (#19221)Curtis Bucher2020-03-301-1/+2
| | | Test in TestChainMap() line 257 did not properly check union behavior.
* bpo-40077: Convert _abc module to use PyType_FromSpec() (GH-19202)Dong-hee Na2020-03-301-1/+1
| | | | | | | Replace statically allocated types with heap allocated types: use PyType_FromSpec(). Add a module state to store the _abc_data_type. Add traverse, clear and free functions to the module.