summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-37785: Fix xgettext warning in argparse (GH-15161)Jakub Kulík2019-09-131-2/+3
|
* bpo-9216: Add usedforsecurity to hashlib constructors (GH-16044)Christian Heimes2019-09-132-2/+14
| | | | | The usedforsecurity keyword only argument added to the hash constructors is useful for FIPS builds and similar restrictive environment with non-technical requirements that legacy algorithms be forbidden by their implementations without being explicitly annotated as not being used for any security related purposes. Linux distros with FIPS support benefit from this being standard rather than making up their own way(s) to do it. Contributed and Signed-off-by: Christian Heimes christian@python.org
* bpo-36046: Add user and group parameters to subprocess (GH-11950)Patrick McLean2019-09-124-13/+262
| | | | | | | | | | | | | | * subprocess: Add user, group and extra_groups paremeters to subprocess.Popen This adds a `user` parameter to the Popen constructor that will call setreuid() in the child before calling exec(). This allows processes running as root to safely drop privileges before running the subprocess without having to use a preexec_fn. This also adds a `group` parameter that will call setregid() in the child process before calling exec(). Finally an `extra_groups` parameter was added that will call setgroups() to set the supplimental groups.
* closes bpo-37803: pdb: fix handling of options (--help / --version) (GH-15193)Daniel Hahler2019-09-121-1/+1
| | | | | | | The "--" should not be included with long options passed to getopt.getopt. Fixes https://bugs.python.org/issue37803
* bpo-21872: fix lzma library decompresses data incompletely (GH-14048)animalize2019-09-121-0/+163
| | | | | | | * 1. add test case with wrong behavior * 2. fix bug when max_length == -1 * 3. allow b"" as valid input data for decompress_buf() * 4. when max_length >= 0, let needs_input mechanism works * add more asserts to test case
* bpo-36991: Fix incorrect exception escaping ZipFile.extract() (GH-13632)Berker Peksag2019-09-122-0/+12
|
* bpo-37935: Added tests for os.walk(), glob.iglob() and Path.glob() (GH-15956)Serhiy Storchaka2019-09-123-0/+59
| | | | | Test that they do not keep too many file descriptors open for the host OS in a reasonable test scenario. See [bpo-37935](https://bugs.python.org/issue37935).
* bpo-38132: Simplify _hashopenssl code (GH-16023)Christian Heimes2019-09-121-0/+3
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-36373: Deprecate explicit loop in task and subprocess API (GH-16033)Andrew Svetlov2019-09-125-91/+147
|
* bpo-9938: Add optional keyword argument exit_on_error to ↵Hai Shi2019-09-122-9/+32
| | | | | | | | | | | | argparse.ArgumentParser (GH-15362) Co-Authored-by: Xuanji Li <xuanji@gmail.com> https://bugs.python.org/issue9938 Automerge-Triggered-By: @matrixise
* bpo-38008: Move builtin protocol whitelist to mapping instead of list (GH-15647)Divij Rajkumar2019-09-122-5/+17
| | | | Fixes https://bugs.python.org/issue38008
* closes bpo-37405: Make socket.getsockname() always return a tuple for ↵bggardner2019-09-121-1/+3
| | | | | AF_CAN. (GH-14392) This fixes a regression from 3.5. In recent releases, `getsockname()` in the AF_CAN case has returned a string.
* bpo-36876: Skip test_check_c_globals for now. (gh-16017)Eric Snow2019-09-121-1/+3
|
* Fix the ImportWarning regarding __spec__ and __package__ being None (GH-16003)Xtreak2019-09-121-3/+4
|
* bpo-38121: Sync importlib.metadata with 0.22 backport (GH-15993)Jason R. Coombs2019-09-122-65/+78
| | | | | | * bpo-38121: Sync importlib.metadata with 0.22 backport * 📜🤖 Added by blurb_it.
* closes bpo-37758: Extend unicodedata checksum tests to cover all of Unicode. ↵Greg Price2019-09-121-5/+8
| | | | | | | | | | | | | | (GH-15125) Unicode has grown since Python first gained support for it, when Unicode itself was still rather new. This pair of test cases was added in commit 6a20ee7de back in 2000, and they haven't needed to change much since then. But do change them to look beyond the Basic Multilingual Plane (range(0x10000)) and cover all 17 planes of Unicode's final form. This adds about 5 seconds to the test suite's runtime. Mark the tests as CPU-using accordingly.
* bpo-32820: __format__ method for ipaddress (#5627)ewosborne2019-09-122-0/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bits method and test_bits * Cleaned up assert string * blurb * added docstring * Faster method, per Eric Smith * redoing as __format__ * added ipv6 method * test cases and cleanup * updated news * cleanup and NEWS.d * cleaned up old NEWS * removed cut and paste leftover * one more cleanup * moved to regexp, moved away from v4- and v6-specific versions of __format__ * More cleanup, added ipv6 test cases * more cleanup * more cleanup * cleanup * cleanup * cleanup per review, part 1 * addressed review comments around help string and regexp matching * wrapped v6 test strings. contiguous integers: break at 72char. with underscores: break so that it looks clean. * 's' and '' tests for pv4 and ipv6 * whitespace cleanup * Remove trailing whitespace * Remove more trailing whitespace * Remove an excess blank line
* bpo-18578: Rename and document test.bytecode_helper as ↵Joannah Nanjekye2019-09-123-4/+4
| | | | | test.support.bytecode_helper (GH-15168) Rename and document test.bytecode_helper as test.support.bytecode_helper
* bpo-38120: Fix DeprecationWarning in test_random for invalid type of ↵Xtreak2019-09-121-3/+9
| | | | arguments to random.seed. (GH-15987)
* bpo-36876: Add a tool that identifies unsupported global C variables. (#15877)Eric Snow2019-09-1122-19/+4426
|
* Correct typo in min version test (GH-16000)Christian Heimes2019-09-111-1/+1
| | | Signed-off-by: Christian Heimes <christian@python.org>
* bpo-34001: Fix test_ssl with LibreSSL (GH-13783)Christian Heimes2019-09-111-1/+2
|
* bpo-28724: Add methods send_fds and recv_fds to the socket module (GH-12889)Joannah Nanjekye2019-09-112-1/+80
| | | | | | | The socket module now has the socket.send_fds() and socket.recv.fds() functions. Contributed by Joannah Nanjekye, Shinya Okano (original patch) and Victor Stinner. Co-Authored-By: Victor Stinner <vstinner@redhat.com>
* bpo-36528: Remove duplicate re tests. (GH-2689)Xtreak2019-09-111-106/+0
| | | | Co-Authored-By: Makdon <makdon@makdon.me>
* bpo-35923: Update the BuiltinImporter to use loader._ORIGIN instead of a ↵Dong-hee Na2019-09-111-2/+4
| | | | | | hard-coded value (GH-15651)
* bpo-34331: Fix incorrectly pluralized abstract class error message. (GH-8670)Daniel Andrade2019-09-111-0/+19
|
* bpo-37885: venv: Don't produce unbound variable warning on deactivate (GH-15330)Daniel Abrahamsson2019-09-112-1/+21
| | | | | | | | | | Before, running deactivate from a bash shell configured to treat undefined variables as errors (`set -u`) would produce a warning: ``` $ python3 -m venv test $ source test/bin/activate (test) $ deactivate -bash: $1: unbound variable ```
* bpo-36634: Fixes activate.bat when existing values contain double quotes ↵Steve Dower2019-09-111-25/+13
| | | | (GH-15924)
* bpo-37972: unittest.mock._Call now passes on __getitem__ to the __getattr__ ↵blhsing2019-09-112-0/+26
| | | | | | | | | | | | | | | | chaining so that call() can be subscriptable (GH-15565) * bpo-37972: unittest.mock._Call now passes on __getitem__ to the __getattr__ chaining so that call() can be subscriptable * 📜🤖 Added by blurb_it. * Update 2019-08-28-21-40-12.bpo-37972.kP-n4L.rst added name of the contributor * bpo-37972: made all dunder methods chainable for _Call * bpo-37972: delegate only attributes of tuple instead to __getattr__
* bpo-36919: make test_source_encoding.test_issue2301 ↵Pavel Koneski2019-09-111-1/+1
| | | | | | implementation-independent (#13639) * bpo-36919: make test_issue2301 implementation-independent
* closes bpo-37252: Fix devpoll tests. (GH-14017)Jakub Kulík2019-09-111-3/+3
|
* bpo-37305: add MIME type for Web App Manifest (#14199)Filip Š2019-09-111-0/+1
| | | | | | | | * bpo-37305: add MIME type for Web App Manifest * bpo-37305: add news entry * Restore indentation and sort by value
* bpo-31163: Added return values to pathlib.Path instance's rename and replace ↵hui shang2019-09-112-6/+14
| | | | | methods. (GH-13582) * bpo-31163: Added return values to pathlib.Path instance's rename and replace methods.
* bpo-34519: Add additional aliases for HP Roman 8 (GH-8956)Michael Osipov2019-09-111-0/+2
| | | | | | | * bpo-34519: Add additional aliases for HP Roman 8 HP Roman 8 is known under mode aliases than listed in aliases.py. Patch by Michael Osipov.
* bpo-38107: Replace direct future and task contructor calls with factories in ↵Andrew Svetlov2019-09-1113-159/+156
| | | | asyncio tests (GH-15928)
* bpo-35640: Allow passing PathLike arguments to SimpleHTTPRequestHandler ↵Géry Ogam2019-09-112-24/+75
| | | | (GH-11398)
* bpo-20504 : in cgi.py, fix bug when a multipart/form-data request has… ↵Pierre Quentel2019-09-112-3/+22
| | | | | | | | | | | | (#10638) * bpo-20504 : in cgi.py, fix bug when a multipart/form-data request has no content-length header * Add Misc/NEWS.d/next file. * Add rst formatting for NEWS.d/next file * Reaplce assert by self.assertEqual
* bpo-35168: Make shlex.punctuation_chars read-only (#11631)Alex2019-09-112-1/+12
| | | | | | | | * bpo-35168: Documentation about shlex.punctuation_chars now states that it should be set in __init__.py * bpo-35168: Convert shlex.punctuation_chars to read-only property * Add NEWS.d entry
* bpo-35066: Make trailing percent test more portable. (GH-15907)Benjamin Peterson2019-09-111-4/+9
| | | Different libc implementations have different behavior when presented with trailing % in strftime strings. To make test_strftime_trailing_percent more portable, compare the output of datetime.strftime directly to that of time.strftime rather than hardcoding.
* bpo-37409: fix relative import with no parent (#14956)Ben Lewis2019-09-112-0/+9
| | | | | | | | | | | | | Relative imports use resolve_name to get the absolute target name, which first seeks the current module's absolute package name from the globals: If __package__ (and __spec__.parent) are missing then import uses __name__, truncating the last segment if the module is a submodule rather than a package __init__.py (which it guesses from whether __path__ is defined). The __name__ attempt should fail if there is no parent package (top level modules), if __name__ is '__main__' (-m entry points), or both (scripts). That is, if both __name__ has no subcomponents and the module does not seem to be a package __init__ module then import should fail.
* bpo-38081: Fixes ntpath.realpath('NUL') (GH-15899)Steve Dower2019-09-112-6/+11
|
* bpo-37936: Systematically distinguish rooted vs. unrooted in .gitignore ↵Greg Price2019-09-111-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-15823) A root cause of bpo-37936 is that it's easy to write a .gitignore rule that's intended to apply to a specific file (e.g., the `pyconfig.h` generated by `./configure`) but actually applies to all similarly-named files in the tree (e.g., `PC/pyconfig.h`.) Specifically, any rule with no non-trailing slashes is applied in an "unrooted" way, to files anywhere in the tree. This means that if we write the rules in the most obvious-looking way, then * for specific files we want to ignore that happen to be in subdirectories (like `Modules/config.c`), the rule will work as intended, staying "rooted" to the top of the tree; but * when a specific file we want to ignore happens to be at the root of the repo (like `platform`), then the obvious rule (`platform`) will apply much more broadly than intended: if someone tries to add a file or directory named `platform` somewhere else in the tree, it will unexpectedly get ignored. That's surprising behavior that can make the .gitignore file's behavior feel finicky and unpredictable. To avoid it, we can simply always give a rule "rooted" behavior when that's what's intended, by systematically using leading slashes. Further, to help make the pattern obvious when looking at the file and minimize any need for thinking about the syntax when adding new rules: separate the rules into one group for each type, with brief comments identifying them. For most of these rules it's clear whether they're meant to be rooted or unrooted, but in a handful of cases I've only guessed. In that case the safer default (the choice that won't hide information) is the narrower, rooted meaning, with a leading slash. If for some of these the unrooted meaning is desired after all, it'll be easy to move them to the unrooted section at the top.
* bpo-37424: Avoid a hang in subprocess.run timeout output capture (GH-14490)Gregory P. Smith2019-09-112-9/+48
| | | | | | | Fixes a possible hang when using a timeout on subprocess.run() while capturing output. If the child process spawned its own children or otherwise connected its stdout or stderr handles with another process, we could hang after the timeout was reached and our child was killed when attempting to read final output from the pipes.
* bpo-37879: Suppress subtype_dealloc decref when base type is a C heap type ↵Eddie Elizondo2019-09-111-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-15323) The instance destructor for a type is responsible for preparing an instance for deallocation by decrementing the reference counts of its referents. If an instance belongs to a heap type, the type object of an instance has its reference count decremented while for static types, which are permanently allocated, the type object is unaffected by the instance destructor. Previously, the default instance destructor searched the class hierarchy for an inherited instance destructor and, if present, would invoke it. Then, if the instance type is a heap type, it would decrement the reference count of that heap type. However, this could result in the premature destruction of a type because the inherited instance destructor should have already decremented the reference count of the type object. This change avoids the premature destruction of the type object by suppressing the decrement of its reference count when an inherited, non-default instance destructor has been invoked. Finally, an assertion on the Py_SIZE of a type was deleted. Heap types have a non zero size, making this into an incorrect assertion. https://github.com/python/cpython/pull/15323
* bpo-36373: Fix deprecation warnings (GH-15889)Andrew Svetlov2019-09-115-12/+12
| | | https://bugs.python.org/issue36373
* bpo-28494: Test existing zipfile working behavior. (GH-15853)Gregory P. Smith2019-09-106-0/+101
| | | | Add unittests for executables with a zipfile appended to test_zipfile, as zipfile.is_zipfile and zipfile.ZipFile work properly on these today.
* bpo-32424: Deprecate xml.etree.ElementTree.Element.copy() in favor of ↵Gordon P. Hemsley2019-09-102-0/+36
| | | | copy.copy() (GH-12995)
* bpo-36253: Remove use after free reference in ctypes test suite (GH-12257)Ben Harper2019-09-101-2/+2
|
* bpo-38086: Sync importlib.metadata with importlib_metadata 0.21. (GH-15840)Jason R. Coombs2019-09-104-33/+82
| | | https://gitlab.com/python-devs/importlib_metadata/-/tags/0.21
* bpo-38087: Fix case sensitivity in test_pathlib and test_ntpath (GH-15850)Steve Dower2019-09-102-107/+124
|