summaryrefslogtreecommitdiff
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
...
* 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-021-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-03-311-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-04-011-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.
* bpo-39073: validate Address parts to disallow CRLF (#19007)Ashwin Ramaswami2020-03-292-0/+24
| | | Disallow CR or LF in email.headerregistry.Address arguments to guard against header injection attacks.
* bpo-38002: Use False/True for IDLE pyshell bools (GH-19203)Terry Jan Reedy2020-03-281-13/+12
| | | | | | | Change 0/1 assignments to 'executing', 'canceled', 'reading', 'endoffile'. These are not used outside of pyshell. Other bools already use False/True. Add comment about int needed for Windows call. Remove self.more, unused in idlelib and code.InteractiveInterpreter. The latter uses 'more' as a local.
* bpo-40086: Update/fix test_etree test case in test_typing (GH-19189)Furkan Önder2020-03-281-4/+2
|
* bpo-39812: Remove daemon threads in concurrent.futures (GH-19149)Kyle Stanley2020-03-274-32/+90
| | | | | | Remove daemon threads from :mod:`concurrent.futures` by adding an internal `threading._register_atexit()`, which calls registered functions prior to joining all non-daemon threads. This allows for compatibility with subinterpreters, which don't support daemon threads.
* bpo-40089: Fix threading._after_fork() (GH-19191)Victor Stinner2020-03-271-1/+9
| | | | | If fork was not called by a thread spawned by threading.Thread, threading._after_fork() now creates a _MainThread instance for _main_thread, instead of a _DummyThread instance.
* bpo-1812: Fix newline conversion when doctest.testfile loads from a package ↵Peter Donis2020-03-262-5/+97
| | | | | whose loader has a get_data method (GH-17385) This pull request fixes the newline conversion bug originally reported in bpo-1812. When that issue was originally submitted, the open builtin did not default to universal newline mode; now it does, which makes the issue fix simpler, since the only code path that needs to be changed is the one in doctest._load_testfile where the file is loaded from a package whose loader has a get_data method.
* bpo-40067: Improve error messages for multiple star expressions in ↵Furkan Önder2020-03-261-2/+7
| | | | | | assignments (GH-19168) Co-Authored-By: Batuhan Taşkaya <isidentical@gmail.com> Co-Authored-By: Pablo Galindo <Pablogsal@gmail.com>
* bpo-40016: re docstring: Clarify relationship of inline and argument flags ↵Ram Rachum2020-03-251-2/+4
| | | | | | | (#19078) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-36144: Add union operators to WeakValueDictionary584 (#19127)Curtis Bucher2020-03-242-0/+56
|
* bpo-40029 mark test_importlib.test_zip as requiring zlib (#19105)Roman Yurchak2020-03-241-0/+4
| | | | | * bpo-40029 mark test_importlib.test_zip as requiring zlib * Decorate TestZip / TestEgg classes as requiring zlib
* bpo-40050: Fix importlib._bootstrap_external (GH-19135)Victor Stinner2020-03-241-21/+13
| | | | | | Remove two unused imports: _thread and _weakref. Avoid creating a new winreg builtin module if it's already available in sys.modules. The winreg module is now stored as "winreg" rather than "_winreg".
* bpo-20526: Fix PyThreadState_Clear(): don't decref frame (GH-19120)Victor Stinner2020-03-241-28/+0
| | | | | | | | PyThreadState.frame is a borrowed reference, not a strong reference: PyThreadState_Clear() must not call Py_CLEAR(tstate->frame). Remove test_threading.test_warnings_at_exit(): we cannot warranty that the Python thread state of daemon threads is cleared in a reliable way during Python shutdown.
* Merge tag 'v3.9.0a5'Łukasz Langa2020-03-231-20/+68
|\ | | | | | | Python 3.9.0a5
| * Python 3.9.0a5v3.9.0a5Łukasz Langa2020-03-231-20/+68
| |
* | bpo-36144: Add union operators to WeakKeyDictionary (#19106)Curtis Bucher2020-03-232-0/+56
| |
* | bpo-36144: Add PEP 584 operators to collections.ChainMap (#18832)Curtis Bucher2020-03-232-0/+64
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update ChainMap to include | and |= Created __ior__, __or__ and __ror__ methods in ChainMap class. * Update ACKS * Update docs * Update test_collections.py to include test_issue584(). Added testing for | and |= operators for ChainMap objects. * Update test_union_operators Renamed test_union operators, fixed errors and style problems raised by brandtbucher. * Update test_union_operators in TestChainMap Added testing for union operator between ChainMap and iterable of key-value pairs. * Update test_union operators in test_collections.py Gave more descriptive variable names and eliminated unnecessary tmp variable. * Update test_union_operators in test_collections.py Added cm3 * Check .maps rather than Chainmap equality. * Add news entry * Update Lib/test/test_collections.py Co-Authored-By: Brandt Bucher <brandtbucher@gmail.com> * Removed whitespace * Added Guido's changes * Fixed Docs * Removed whitespace Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
* bpo-39830: Add zipfile.Path to __all__ (GH-19115)Zackery Spytz2020-03-231-1/+2
|
* bpo-39999: Improve compatibility of the ast module. (GH-19056)Serhiy Storchaka2020-03-222-4/+26
| | | | | | | * Re-add removed classes Suite, slice, Param, AugLoad and AugStore. * Add docstrings for dummy classes. * Add docstrings for attribute aliases. * Set __module__ to "ast" instead of "_ast".
* bpo-22490: Remove __PYVENV_LAUNCHER__ from environment during launch (GH-9516)Ronald Oussoren2020-03-222-1/+12
| | | | | | | | | | | | | | | | | | | | | * bpo-22490: Remove "__PYVENV_LAUNCHER__" from the shell environment on macOS This changeset removes the environment varialbe "__PYVENV_LAUNCHER__" during interpreter launch as it is only needed to communicate between the stub executable in framework installs and the actual interpreter. Leaving the environment variable present may lead to misbehaviour when launching other scripts. * Actually commit the changes for issue 22490... * Correct typo Co-Authored-By: Nicola Soranzo <nicola.soranzo@gmail.com> * Run make patchcheck Co-authored-by: Jason R. Coombs <jaraco@jaraco.com> Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
* bpo-36543: Remove the xml.etree.cElementTree module. (GH-19108)Serhiy Storchaka2020-03-222-18/+0
|
* bpo-39652: Truncate the column name after '[' only if PARSE_COLNAMES is set. ↵Serhiy Storchaka2020-03-212-4/+4
| | | | (GH-18942)
* bpo-24916: Remove an outdated comment. (GH-19101)Serhiy Storchaka2020-03-211-2/+0
|
* bpo-40019: Skip test_gdb if Python was optimized (GH-19081)Victor Stinner2020-03-201-0/+9
| | | | test_gdb now skips tests if it detects that gdb failed to read debug information because the Python binary is optimized.
* bpo-39562: Allow executing asynchronous comprehensions in the asyncio REPL ↵Batuhan Taşkaya2020-03-191-1/+8
| | | | | (GH-18968) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-40000: Improve error messages when validating invalid ast.Constant nodes ↵Batuhan Taşkaya2020-03-191-0/+9
| | | | | (GH-19055) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-39220: Do not optimise annotation if 'from __future__ import ↵Pablo Galindo2020-03-181-1/+9
| | | | | | annotations' is used (GH-17866) Do not apply AST-based optimizations if 'from __future__ import annotations' is used in order to prevent information lost in the final version of the annotations.
* bpo-27807: Skip test_site.test_startup_imports() if pth file (GH-19060)Victor Stinner2020-03-181-4/+23
| | | | | | test_site.test_startup_imports() is now skipped if a path of sys.path contains a .pth file. Sort test_site imports.
* bpo-39957: Change Signature.parameters to OrderedDict (GH-18988)Jens Reidel2020-03-182-5/+10
|
* bpo-39984: _PyThreadState_DeleteCurrent() takes tstate (GH-19051)Victor Stinner2020-03-181-1/+2
| | | | | | | | | | * _PyThreadState_DeleteCurrent() now takes tstate rather than runtime. * Add ensure_tstate_not_null() helper to pystate.c. * Add _PyEval_ReleaseLock() function. * _PyThreadState_DeleteCurrent() now calls _PyEval_ReleaseLock(tstate) and frees PyThreadState memory after this call, not before. * PyGILState_Release(): rename "tcur" variable to "tstate".
* bpo-39719: Remove softspace from tempfile.SpooledTemporaryFile (GH-18599)Shantanu2020-03-171-4/+0
|