diana
543386b7f0
bpo-31657: Add test coverage for the __debug__ case (GH-3450)
...
Update the compile tests for optimization levels to also check that
__debug__ blocks are included or excluded based on the optimization
level.
Patch by Diana Clarke.
2017-10-03 09:46:56 -07:00
Serhiy Storchaka
85c0b8941f
bpo-31619: Fixed a ValueError when convert a string with large number of underscores ( #3827 )
...
to integer with binary base.
2017-10-03 14:13:44 +03:00
Thomas Moreau
e8c368df22
bpo-31540: Allow passing multiprocessing context to ProcessPoolExecutor ( #3682 )
2017-10-03 11:53:17 +02:00
Victor Stinner
e6cfdefa0c
bpo-31510: Fix multiprocessing test_many_processes() on macOS ( #3857 )
...
On macOS, a process can exit with -SIGKILL if it is killed "early"
with SIGTERM.
2017-10-02 08:27:34 -07:00
Antoine Pitrou
1023dbbcb7
bpo-31516: current_thread() should not return a dummy thread at shutdown ( #3673 )
...
bpo-31516: current_thread() should not return a dummy thread at shutdown
2017-10-02 16:42:15 +02:00
Cornelius Diekmann
e6f62f69f0
bpo-31158: Fix nondeterministic read in test_pty ( #3808 )
...
* bpo-31158: Fix nondeterministic read in test_pty
* Reuse existing readline implementation from io.
Thx to @pitrou
* Updated comment
Ideally, this commit is fixuped into the previous commit. Since there is
already a comment on github, I won't rebase.
2017-10-02 02:39:55 -07:00
Oren Milman
7dc46d8cf5
bpo-31592: Fix an assertion failure in Python parser in case of a bad unicodedata.normalize(). ( #3767 )
2017-09-30 20:16:24 +03:00
Serhiy Storchaka
f4ea642cb6
bpo-31627: Make test_mailbox be lenient to empty hostname. ( #3821 )
2017-09-30 17:10:57 +03:00
scoder
101a5e84ac
bpo-31648: Improve ElementPath ( #3835 )
...
* Allow whitespace inside of ElementPath predicates.
* Add ElementPath predicate support for text comparison of the current node, like "[.='text']".
2017-09-30 16:35:21 +03:00
INADA Naoki
9811e80fd0
bpo-31581: Reduce the number of imports for functools (GH-3757)
2017-09-30 16:13:02 +09:00
James Sexton
b24cd055ec
bpo-30806 netrc.__repr__() is broken for writing to file (GH-2491)
...
netrc file format doesn't support quotes and escapes.
See https://linux.die.net/man/5/netrc
2017-09-30 16:10:31 +09:00
Łukasz Langa
574562c5dd
bpo-31641: Allow arbitrary iterables in concurrent.futures.as_completed() ( #3830 )
...
This was possible before. GH-1560 introduced a regression after 3.6.2 got
released where only sequences were accepted now. This commit addresses this
problem.
2017-09-29 14:33:34 -07:00
Oren Milman
01c6a8859e
bpo-31602: Fix an assertion failure in zipimporter.get_source() in case of a bad zlib.decompress() (GH-3784)
...
While a rare potential failure (it requires swapping out zlib.decompress() itself and forcing it to return a non-bytes object), this change prevents a potential C-level assertion failure and instead substitutes it with an exception.
Thanks to Oren Milman for the patch.
2017-09-29 11:34:31 -07:00
Zhiming Wang
d87b105ca7
bpo-31638: Add compression support to zipapp (GH-3819)
...
Add optional argument `compressed` to `zipapp.create_archive`, and add
option `--compress` to the command line interface of `zipapp`.
2017-09-29 18:31:52 +01:00
Benjamin Peterson
288d1daada
remove support for BSD/OS (closes bpo-31624) ( #3812 )
2017-09-28 22:44:27 -07:00
Antoine Pitrou
a106aec2ed
bpo-11063, bpo-20519: avoid ctypes and improve import time for uuid ( #3796 )
...
bpo-11063, bpo-20519: avoid ctypes and improve import time for uuid.
2017-09-28 23:03:06 +02:00
Oren Milman
d780b2d588
bpo-31478: Fix an assertion failure in random.seed() in case a seed has a bad __abs__() method. ( #3596 )
2017-09-28 10:50:01 +03:00
Oren Milman
5837d0418f
bpo-31588: Validate return value of __prepare__() methods (GH-3764)
...
Class execution requires that __prepare__() methods return
a proper execution namespace. Check for that immediately
after calling __prepare__(), rather than passing it through
to the code execution machinery and potentially triggering
SystemError (in debug builds) or a cryptic TypeError
(in release builds).
Patch by Oren Milman.
2017-09-28 00:04:37 +10:00
Serhiy Storchaka
c740e4fe8a
bpo-30347: Stop crashes when concurrently iterate over itertools.groupby() iterators. ( #1557 )
2017-09-26 21:47:56 +03:00
Victor Stinner
e6d9fcbb8d
bpo-31170: Write unit test for Expat 2.2.4 UTF-8 bug ( #3570 )
...
Non-regression tests for the Expat 2.2.3 UTF-8 decoder bug.
2017-09-25 01:27:34 -07:00
Oren Milman
5d3e80021a
bpo-31566: Fix an assertion failure in _warnings.warn() in case of a bad __name__ global. ( #3717 )
2017-09-24 21:28:42 +03:00
Oren Milman
91fb0afe18
bpo-31285: Fix an assertion failure and a SystemError in warnings.warn_explicit. ( #3219 )
2017-09-24 21:27:12 +03:00
Serhiy Storchaka
c247caf33f
bpo-30346: An iterator produced by the itertools.groupby() iterator ( #1569 )
...
now becames exhausted after advancing the groupby iterator.
2017-09-24 13:36:11 +03:00
Oren Milman
2b382dd612
bpo-31505: Fix an assertion failure in json, in case _json.make_encoder() received a bad encoder() argument. ( #3643 )
2017-09-24 12:07:12 +03:00
Barry Warsaw
35425d638c
bpo-31389 Add an optional header argument to pdb.set_trace() ( #3438 )
...
* Give pdb.set_trace() an optional `header` argument
* What's new.
* Give pdb.set_trace() an optional `header` argument
* What's new.
2017-09-22 12:29:42 -04:00
Serhiy Storchaka
b3a77964ea
bpo-27541: Reprs of subclasses of some classes now contain actual type name. ( #3631 )
...
Affected classes are bytearray, array, deque, defaultdict, count and repeat.
2017-09-21 14:24:13 +03:00
Igor Filatov
9adda0cdf8
bpo-31351: Set return code in ensurepip when pip fails (GH-3626)
...
Previously ensurepip would always report success, even if the
pip installation failed.
2017-09-21 20:07:45 +10:00
Anthony Sottile
aaf6fc0982
bpo-26510: make argparse subparsers required by default ( #3027 )
...
This fixes a regression from Python 2. To get optional subparsers,
use the new parameter ``add_subparsers(required=False)``.
Patch by Anthony Sottile.
2017-09-20 17:35:27 -04:00
Victor Stinner
9abee722d4
bpo-31479: Always reset the signal alarm in tests ( #3588 )
...
* bpo-31479: Always reset the signal alarm in tests
Use "try: ... finally: signal.signal(0)" pattern to make sure that
tests don't "leak" a pending fatal signal alarm.
* Move two more alarm() calls into the try block
Fix also typo: replace signal.signal(0) with signal.alarm(0)
* Move another signal.alarm() into the try block
2017-09-19 09:36:54 -07:00
Victor Stinner
a92941ff12
pythoninfo: ignore OSError(ENOSYS) on getrandom() ( #3655 )
2017-09-19 07:37:24 -07:00
Oren Milman
865e4b4f63
bpo-31293: Fix crashes in truediv and mul of a timedelta by a float with a bad as_integer_ratio() method. ( #3227 )
2017-09-19 15:58:11 +03:00
Oren Milman
9974e1bcf3
bpo-31315: Fix an assertion failure in imp.create_dynamic(), when spec.name is not a string. ( #3257 )
2017-09-19 14:39:47 +03:00
Oren Milman
6db7033192
bpo-31492: Fix assertion failures in case of a module with a bad __name__ attribute. ( #3620 )
2017-09-19 14:23:01 +03:00
Antoine Pitrou
88c60c9668
Trivial cleanups following bpo-31370 ( #3649 )
...
* Trivial cleanups following bpo-31370
* Also cleanup the "importlib._bootstrap_external" module
2017-09-18 23:50:44 +02:00
Antoine Pitrou
b43c4caf81
Restore dummy_threading and _dummy_thread, but deprecate them (bpo-31370) ( #3648 )
2017-09-18 22:04:20 +02:00
Victor Stinner
a8e7d903d7
os.test_utime_current(): tolerate 50 ms delta ( #3646 )
2017-09-18 08:49:45 -07:00
Victor Stinner
e727d41ffc
bpo-31499, xml.etree: Fix xmlparser_gc_clear() crash ( #3641 )
...
* bpo-31499, xml.etree: Fix xmlparser_gc_clear() crash
xml.etree: xmlparser_gc_clear() now sets self.parser to NULL to prevent a
crash in xmlparser_dealloc() if xmlparser_gc_clear() was called previously
by the garbage collector, because the parser was part of a reference cycle.
Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
2017-09-18 05:29:37 -07:00
Raymond Hettinger
132a7d7cdb
bpo-31482: Missing bytes support for random.seed() version 1 ( #3614 )
...
bpo-31482: Missing bytes support for random.seed() version 1 #3614
2017-09-17 09:04:30 -07:00
Christian Heimes
e82c034496
bpo-31431: SSLContext.check_hostname auto-sets CERT_REQUIRED ( #3531 )
...
Signed-off-by: Christian Heimes <christian@python.org>
2017-09-15 20:29:57 +02:00
Christian Heimes
a170fa162d
bpo-31346: Use PROTOCOL_TLS_CLIENT/SERVER ( #3058 )
...
Replaces PROTOCOL_TLSv* and PROTOCOL_SSLv23 with PROTOCOL_TLS_CLIENT and
PROTOCOL_TLS_SERVER.
Signed-off-by: Christian Heimes <christian@python.org>
2017-09-15 20:27:30 +02:00
Christian Heimes
4df60f18c6
bpo-31386: Custom wrap_bio and wrap_socket type ( #3426 )
...
SSLSocket.wrap_bio() and SSLSocket.wrap_socket() hard-code SSLObject and
SSLSocket as return types. In the light of future deprecation of
ssl.wrap_socket() module function and direct instantiation of SSLSocket,
it is desirable to make the return type of SSLSocket.wrap_bio() and
SSLSocket.wrap_socket() customizable.
Signed-off-by: Christian Heimes <christian@python.org>
2017-09-15 20:26:05 +02:00
Victor Stinner
11f0807a40
bpo-31234: test_multiprocessing: wait 30 seconds ( #3599 )
...
Give 30 seconds to join_process(), instead of 5 or 10 seconds, to
wait until the process completes.
2017-09-15 06:55:31 -07:00
Victor Stinner
da3e5cf961
bpo-31234: Join timers in test_threading ( #3598 )
...
Call the .join() method of threading.Timer timers to prevent the
"threading_cleanup() failed to cleanup 1 threads" warning.
2017-09-15 05:37:42 -07:00
Feanil Patel
6a396c9807
bpo-31128: Allow pydoc to bind to arbitrary hostnames ( #3011 )
...
New -n flag allow overriding localhost with custom value,
for example to run from containers.
2017-09-14 17:54:09 -04:00
Victor Stinner
b9b69003d9
bpo-31234: Add support.join_thread() helper ( #3587 )
...
join_thread() joins a thread but raises an AssertionError if the
thread is still alive after timeout seconds.
2017-09-14 14:40:56 -07:00
Victor Stinner
167cbde50a
bpo-31234: Join threads in test_queue ( #3586 )
...
Call thread.join() to prevent the "dangling thread" warning.
2017-09-14 14:04:56 -07:00
Victor Stinner
ff40ecda73
bpo-31234: Add test.support.wait_threads_exit() ( #3578 )
...
Use _thread.count() to wait until threads exit. The new context
manager prevents the "dangling thread" warning.
2017-09-14 13:07:24 -07:00
Victor Stinner
b8c7be2c52
bpo-31234: Join threads in test_threading ( #3579 )
...
Call thread.join() to prevent the "dangling thread" warning.
2017-09-14 13:05:21 -07:00
scoder
c8d8e15bfc
bpo-31455: Fix an assertion failure in ElementTree.XMLParser(). ( #3545 )
...
* Avoid calling "PyObject_GetAttrString()" (and potentially executing user code) with a live exception set.
* Ignore only AttributeError on attribute lookups in ElementTree.XMLParser() and propagate all other exceptions.
2017-09-14 23:00:03 +03:00
Oren Milman
0b3a87ef54
bpo-31471: Fix assertion failure in subprocess.Popen() on Windows, in case env has a bad keys() method. ( #3580 )
2017-09-14 22:30:27 +03:00