]> granicus.if.org Git - python/log
python
7 years agoCorrect the README link in Unix install docs (#1245)
Sebastian Vetter [Fri, 21 Apr 2017 17:24:57 +0000 (10:24 -0700)]
Correct the README link in Unix install docs (#1245)

7 years agobpo-30125: Fix faulthandler.disable() on Windows (#1240)
Victor Stinner [Fri, 21 Apr 2017 16:06:13 +0000 (18:06 +0200)]
bpo-30125: Fix faulthandler.disable() on Windows (#1240)

* bpo-30125: Cleanup faulthandler.c

* Use size_t type for iterators
* Add { ... }

* bpo-30125: Fix faulthandler.disable() on Windows

On Windows, faulthandler.disable() now removes the exception handler
installed by faulthandler.enable().

7 years agobpo-30107: don't dump core on expected test_io crash (#1235)
Victor Stinner [Fri, 21 Apr 2017 15:59:23 +0000 (17:59 +0200)]
bpo-30107: don't dump core on expected test_io crash (#1235)

test_io has two unit tests which trigger a deadlock:

* test_daemon_threads_shutdown_stdout_deadlock()
* test_daemon_threads_shutdown_stderr_deadlock()

These tests call Py_FatalError() if the expected bug is triggered
which calls abort(). Use test.support.SuppressCrashReport to prevent
the creation on a core dump, to fix the warning:

Warning -- files was modified by test_io
  Before: []
  After:  ['python.core']

7 years agobpo-30106: Fix test_asyncore.test_quick_connect() (#1234)
Victor Stinner [Fri, 21 Apr 2017 11:51:53 +0000 (13:51 +0200)]
bpo-30106: Fix test_asyncore.test_quick_connect() (#1234)

test_quick_connect() runs a thread up to 50 seconds, whereas the
socket is connected in 0.2 second and then the thread is expected to
end in less than 3 second. On Linux, the thread ends quickly because
select() seems to always return quickly. On FreeBSD, sometimes
select() fails with timeout and so the thread runs much longer than
expected.

Fix the thread timeout to fix a race condition in the test.

7 years agobpo-30104: configure now detects when cc is clang (#1233)
Victor Stinner [Fri, 21 Apr 2017 10:35:24 +0000 (12:35 +0200)]
bpo-30104: configure now detects when cc is clang (#1233)

Detect when the "cc" compiler (and the $CC variable) is the Clang
compiler. The test is needed to add the -fno-strict-aliasing option
on FreeBSD where cc is clang.

7 years agobpo-30104: Use -fno-strict-aliasing on clang (#1221)
Victor Stinner [Fri, 21 Apr 2017 09:24:34 +0000 (11:24 +0200)]
bpo-30104: Use -fno-strict-aliasing on clang (#1221)

Python/dtoa.c is not compiled correctly with clang 4.0 and
optimization level -O2 or higher, because of an aliasing issue on
the double/ULong[2] union.

LLVM bug report:
https://bugs.llvm.org//show_bug.cgi?id=31928

7 years agoremove configure test for inline keyword (#1231)
Benjamin Peterson [Fri, 21 Apr 2017 06:52:19 +0000 (23:52 -0700)]
remove configure test for inline keyword (#1231)

We require C99, so a configure test for this standard feature is not needed.

7 years agobpo-29191: Add liblzma.vcxproj to pcbuild.sln and other missing entries (#1222)
Segev Finer [Thu, 20 Apr 2017 23:33:28 +0000 (02:33 +0300)]
bpo-29191: Add liblzma.vcxproj to pcbuild.sln and other missing entries (#1222)

liblzma is missing from pcbuild.sln. This causes the build of _lzma to fail when building the solution and not using build.bat.

7 years agoAdd missing .gitignore entries for VS2015 IntelliSense DB (#1223)
Segev Finer [Thu, 20 Apr 2017 23:32:26 +0000 (02:32 +0300)]
Add missing .gitignore entries for VS2015 IntelliSense DB (#1223)

7 years agobpo-29802: Fix reference counting in module-level struct functions (#1213)
Serhiy Storchaka [Thu, 20 Apr 2017 18:19:31 +0000 (21:19 +0300)]
bpo-29802: Fix reference counting in module-level struct functions (#1213)

when pass arguments of wrong type.

7 years agoOnly define get_zone() and get_gmtoff() if needed (#1193)
Victor Stinner [Thu, 20 Apr 2017 11:41:09 +0000 (13:41 +0200)]
Only define get_zone() and get_gmtoff() if needed (#1193)

Only define the get_zone() and get_gmtoff() private functions in the
time module if these functions are needed to initialize the module.

The change fixes the following warnings on AIX:

Modules/timemodule.c:1175:1: warning: 'get_gmtoff' defined but not used [-Wunused-function]
Modules/timemodule.c:1164:1: warning: 'get_zone' defined but not used [-Wunused-function]

7 years agosupport.threading_cleanup() log a warning on fail (#1195)
Victor Stinner [Thu, 20 Apr 2017 11:40:08 +0000 (13:40 +0200)]
support.threading_cleanup() log a warning on fail (#1195)

The @reap_threads decorator and the threading_cleanup() function of
test.support now log a warning if they fail to clenaup threads.

Fix also the usage of support.threading_cleanup() in
test_urllib2_localnet.

The log may help to debug such other warning seen on the AMD64
FreeBSD CURRENT Non-Debug 3.x buildbot:

Warning -- threading._dangling was modified by test_logging

7 years agobpo-30108: Restore sys.path in test_site (#1197)
Victor Stinner [Thu, 20 Apr 2017 11:39:39 +0000 (13:39 +0200)]
bpo-30108: Restore sys.path in test_site (#1197)

Add setUpModule() and tearDownModule() functions to test_site to
save/restore sys.path at the module level to prevent warning if the
user site directory is created, since site.addsitedir() modifies
sys.path.

7 years agobpo-12414: Update code_sizeof() to take in account co_extra memory. (#1168)
Dong-hee Na [Thu, 20 Apr 2017 07:31:17 +0000 (16:31 +0900)]
bpo-12414: Update code_sizeof() to take in account co_extra memory. (#1168)

7 years agobpo-30109: Fix reindent.py (GH-1207)
Mariatta [Thu, 20 Apr 2017 05:59:20 +0000 (22:59 -0700)]
bpo-30109: Fix reindent.py (GH-1207)

Skip the file if it has bad encoding.

7 years agobpo-10379: Add %char examples to locale.format() docs (GH-1145)
Berker Peksag [Thu, 20 Apr 2017 04:38:43 +0000 (07:38 +0300)]
bpo-10379: Add %char examples to locale.format() docs (GH-1145)

7 years agoRemove redundant comma in argparse HOWTO (#1141)
Berker Peksag [Thu, 20 Apr 2017 04:29:35 +0000 (07:29 +0300)]
Remove redundant comma in argparse HOWTO (#1141)

Reported by Sean Canavan on docs@p.o.

7 years agobpo-30078: Add an example of passing a path to unittest (#1178)
Louie Lu [Thu, 20 Apr 2017 03:46:59 +0000 (11:46 +0800)]
bpo-30078: Add an example of passing a path to unittest (#1178)

7 years agobpo-30106: Fix tearDown() of test_asyncore (#1194)
Victor Stinner [Thu, 20 Apr 2017 00:55:39 +0000 (02:55 +0200)]
bpo-30106: Fix tearDown() of test_asyncore (#1194)

Call asyncore.close_all() with ignore_all=True in the tearDown()
method of the test_asyncore base test case. It should prevent keeping
alive sockets in asyncore.socket_map if close() fails with an
unexpected error.

Revert also an unwanted change of my previous commit: remove name
parameter of Thread in test_quick_connect().

7 years agobpo-29887: test_normalization handles PermissionError (#1196)
Victor Stinner [Thu, 20 Apr 2017 00:39:59 +0000 (02:39 +0200)]
bpo-29887: test_normalization handles PermissionError (#1196)

Skip test_normalization.test_main() if download raises a permission
error.

7 years agoregrtest: always show before/after of modified env (#1192)
Victor Stinner [Wed, 19 Apr 2017 22:57:30 +0000 (00:57 +0200)]
regrtest: always show before/after of modified env (#1192)

Buildbots don't run tests with -vv and so only log "xxx was modified
by test_xxx" which is not enough to debug such random issue. In many
cases, I'm unable to reproduce the warning and so unable to fix it.

Always logging the value before and value after should help to debug
such warning on buildbots.

7 years agoFix/optimize test_asyncore.test_quick_connect() (#1188)
Victor Stinner [Wed, 19 Apr 2017 21:42:46 +0000 (23:42 +0200)]
Fix/optimize test_asyncore.test_quick_connect() (#1188)

Don't use addCleanup() in test_quick_connect() because it keeps the
Thread object alive and so @reap_threads fails on its timeout of 1
second. "./python -m test -v test_asyncore -m test_quick_connect"
now takes 185 ms, instead of 11 seconds.

Other minor changes:

* Use "with sock:" to close the socket instead of
  try/finally: sock.close()
* Use self.skipTest() in test_quick_connect() to remove one
  indentation level and notice user that the test is specific to
  AF_INET and AF_INET6

7 years agobpo-30030: Revert f50354ad (tempfile) (#1187)
Victor Stinner [Wed, 19 Apr 2017 20:59:51 +0000 (22:59 +0200)]
bpo-30030: Revert f50354ad (tempfile) (#1187)

Revert f50354adaaafebe95ad09d09b825804a686ea843: it introduced a
regression in test_threadedtempfile.

7 years agobpo-30065: Fixed arguments validation in _posixsubprocess.fork_exec(). (#1110)
Serhiy Storchaka [Wed, 19 Apr 2017 18:12:46 +0000 (21:12 +0300)]
bpo-30065: Fixed arguments validation in _posixsubprocess.fork_exec(). (#1110)

7 years agobpo-30070: Fixed leaks and crashes in errors handling in the parser module. (#1131)
Serhiy Storchaka [Wed, 19 Apr 2017 18:09:21 +0000 (21:09 +0300)]
bpo-30070: Fixed leaks and crashes in errors handling in the parser module. (#1131)

7 years agobpo-22352: Adjust widths in the output of dis.dis() for large line numbers and (...
Serhiy Storchaka [Wed, 19 Apr 2017 17:36:31 +0000 (20:36 +0300)]
bpo-22352: Adjust widths in the output of dis.dis() for large line numbers and (#1153)

instruction offsets.

Add tests for widths of opcode names.

7 years agobpo-30061: Check if PyObject_Size()/PySequence_Size()/PyMapping_Size() (#1096)
Serhiy Storchaka [Wed, 19 Apr 2017 17:03:52 +0000 (20:03 +0300)]
bpo-30061: Check if PyObject_Size()/PySequence_Size()/PyMapping_Size() (#1096)

raised an error.

Replace them with using concrete types API that never fails if appropriate.

7 years agobpo-29925: Skip test_uuid1_safe() on OS X Tiger (#971)
Victor Stinner [Wed, 19 Apr 2017 11:01:03 +0000 (13:01 +0200)]
bpo-29925: Skip test_uuid1_safe() on OS X Tiger (#971)

7 years agoMinor grammar fixes (GH-1174)
Mariatta [Wed, 19 Apr 2017 01:59:47 +0000 (18:59 -0700)]
Minor grammar fixes (GH-1174)

7 years agoFix minor typos (GH-1173)
cocoatomo [Wed, 19 Apr 2017 00:38:26 +0000 (09:38 +0900)]
Fix minor typos (GH-1173)

7 years agobpo-29514: Check magic number for bugfix release (#54)
Eric Appelt [Mon, 17 Apr 2017 18:35:43 +0000 (13:35 -0500)]
bpo-29514: Check magic number for bugfix release (#54)

* bpo-29514: Check magic number for micro release

Add a dict importlib.util.EXPECTED_MAGIC_NUMBERS which
details the initial and expected pyc magic number for
each minor release. This gives a mechanism for users to
check if the magic number has changed within a release and
for a test to ensure procedure is followed if a change is
necessary.

Add a test to check the current MAGIC_NUMBER against the
expected number for the release if the current release is
at candidate or final level. On test failure, describe to
the developer the procedure for changing the magic number.

* Simplify magic number release test

Simplify the magic number release test by removing
EXPECTED_MAGIC_NUMBERS table and making the expected
magic number self-contained within the test.

BPO: 29514

* Improve magic number test execution and message

Improve the execution of the magic number test by
using skipUnless for alpha and beta releases, and
directly inheriting from unittest.TestCase rather than
using the machinery for the other tests. Also improve
the error message to explain the reason for caution in
changing the magic number.

BPO: 29514

7 years agofix a refleak in slot_sq_length (#1162)
Xiang Zhang [Sun, 16 Apr 2017 16:54:21 +0000 (00:54 +0800)]
fix a refleak in slot_sq_length (#1162)

7 years agobpo-30022: Get rid of using EnvironmentError and IOError (except test… (#1051)
Serhiy Storchaka [Sun, 16 Apr 2017 07:46:38 +0000 (10:46 +0300)]
bpo-30022: Get rid of using EnvironmentError and IOError (except test… (#1051)

7 years agobpo-10076: Compiled regular expression and match objects now are copyable. (#1000)
Serhiy Storchaka [Sun, 16 Apr 2017 07:16:03 +0000 (10:16 +0300)]
bpo-10076: Compiled regular expression and match objects now are copyable. (#1000)

7 years agobpo-28765: Use concrete types API in _sre.c. (#1009)
Serhiy Storchaka [Sun, 16 Apr 2017 06:39:30 +0000 (09:39 +0300)]
bpo-28765: Use concrete types API in _sre.c. (#1009)

7 years agobpo-29839: Raise ValueError rather than OverflowError in len() for negative values...
Serhiy Storchaka [Sun, 16 Apr 2017 06:37:18 +0000 (09:37 +0300)]
bpo-29839: Raise ValueError rather than OverflowError in len() for negative values. (#701)

7 years agobpo-29838: Add asserts for checking results of sq_length and mq_length slots. (#700)
Serhiy Storchaka [Sun, 16 Apr 2017 06:21:44 +0000 (09:21 +0300)]
bpo-29838: Add asserts for checking results of sq_length and mq_length slots. (#700)

Negative result should be returned only when an error is set.

7 years agobpo-30068: add missing iter(self) in _io._IOBase.readlines when hint is present ...
Xiang Zhang [Sat, 15 Apr 2017 04:47:28 +0000 (12:47 +0800)]
bpo-30068: add missing iter(self) in _io._IOBase.readlines when hint is present (#1130)

7 years agobpo-19225: Remove duplicated description for standard warning categories (GH-1068)
cocoatomo [Sat, 15 Apr 2017 02:06:02 +0000 (11:06 +0900)]
bpo-19225: Remove duplicated description for standard warning categories (GH-1068)

7 years agobpo-29738: Add Olivier Vielpeau to Misc/ACKS (GH-1146)
Mariatta [Sat, 15 Apr 2017 01:33:48 +0000 (18:33 -0700)]
bpo-29738: Add Olivier Vielpeau to Misc/ACKS (GH-1146)

7 years agobpo-29738: Fix memory leak in _get_crl_dp (GH-526)
Olivier Vielpeau [Sat, 15 Apr 2017 01:06:07 +0000 (21:06 -0400)]
bpo-29738: Fix memory leak in _get_crl_dp (GH-526)

* Remove conditional on free of `dps`, since `dps` is now allocated for
all versions of OpenSSL
* Remove call to `x509_check_ca` since it was only used to cache
the `crldp` field of the certificate
CRL_DIST_POINTS_free is available in all supported versions of OpenSSL
(recent 0.9.8+) and LibreSSL.

7 years agobpo-30059: Include Py_Ellipsis in C API documentation (#1018)
Michael Seifert [Fri, 14 Apr 2017 19:18:35 +0000 (21:18 +0200)]
bpo-30059: Include Py_Ellipsis in C API documentation (#1018)

7 years agoimprove alignment autoconf test (#1129)
Benjamin Peterson [Fri, 14 Apr 2017 16:36:45 +0000 (09:36 -0700)]
improve alignment autoconf test (#1129)

Replace the deprecated AC_TRY_RUN with AC_RUN_IFELSE. Also, standardize the
variable name and allow for caching of the result.

7 years agoFix misplaced positional argument in OS X support library (#1134)
Jack McCracken [Fri, 14 Apr 2017 12:28:55 +0000 (08:28 -0400)]
Fix misplaced positional argument in OS X support library (#1134)

7 years agoRelax test timing (bpo-29861) to avoid sporadic failures (#1120)
Antoine Pitrou [Fri, 14 Apr 2017 11:10:00 +0000 (13:10 +0200)]
Relax test timing (bpo-29861) to avoid sporadic failures (#1120)

7 years agobpo-11913: Add README.rst to the distutils standard READMEs list (#563)
Ryan Gonzalez [Fri, 14 Apr 2017 09:00:25 +0000 (04:00 -0500)]
bpo-11913: Add README.rst to the distutils standard READMEs list (#563)

7 years agobpo-29869: Add Nevada Sanchez to Misc/ACKS (GH-1125)
Mariatta [Fri, 14 Apr 2017 01:30:42 +0000 (18:30 -0700)]
bpo-29869: Add Nevada Sanchez to Misc/ACKS (GH-1125)

7 years agobpo-29694: race condition in pathlib mkdir with flags parents=True (GH-1089)
Armin Rigo [Thu, 13 Apr 2017 18:08:15 +0000 (20:08 +0200)]
bpo-29694: race condition in pathlib mkdir with flags parents=True (GH-1089)

7 years agobpo-29995: re.escape() now escapes only special characters. (#1007)
Serhiy Storchaka [Thu, 13 Apr 2017 18:06:43 +0000 (21:06 +0300)]
bpo-29995: re.escape() now escapes only special characters. (#1007)

7 years agobpo-29869: Allow underscores in numeric literals in lib2to3. (GH-1119)
Nevada Sanchez [Thu, 13 Apr 2017 17:32:54 +0000 (13:32 -0400)]
bpo-29869: Allow underscores in numeric literals in lib2to3. (GH-1119)

* Allow underscores in numeric literals in lib2to3.
* Stricter literal parsing for Python 3.6 in lib2to3.pgen2.tokenize.
* Add test case for underscores in literals in Python 3.

7 years agoFix a typo in Doc/library/functions.rst (GH-1117)
Joshua Diaddigo [Thu, 13 Apr 2017 17:31:37 +0000 (13:31 -0400)]
Fix a typo in Doc/library/functions.rst (GH-1117)

Replace `For object's ... ` with `For objects ...`

7 years agobpo-30021: Add examples for re.escape(). (#1048)
Serhiy Storchaka [Thu, 13 Apr 2017 16:17:36 +0000 (19:17 +0300)]
bpo-30021: Add examples for re.escape(). (#1048)

And fix the parameter name.

7 years agobpo-27200: Fix pathlib, ssl, turtle and weakref doctests (GH-616)
Marco Buttu [Thu, 13 Apr 2017 14:17:59 +0000 (16:17 +0200)]
bpo-27200: Fix pathlib, ssl, turtle and weakref doctests (GH-616)

7 years agoBlacklist myself from mention-bot (#1114)
Berker Peksag [Thu, 13 Apr 2017 14:14:37 +0000 (17:14 +0300)]
Blacklist myself from mention-bot (#1114)

7 years agobpo-29791: Clarify that flush is keyword-only argument (#1093)
Berker Peksag [Thu, 13 Apr 2017 12:48:18 +0000 (15:48 +0300)]
bpo-29791: Clarify that flush is keyword-only argument (#1093)

Reported by Lucio Ricardo Montero Valenzuela.

7 years agobpo-30055: add testcleanup to leave a fresh context (#1094)
Marco Buttu [Thu, 13 Apr 2017 11:30:25 +0000 (13:30 +0200)]
bpo-30055: add testcleanup to leave a fresh context (#1094)

7 years agoconvert from long long to PyLong loselessly (#1106)
Benjamin Peterson [Thu, 13 Apr 2017 08:44:54 +0000 (01:44 -0700)]
convert from long long to PyLong loselessly (#1106)

7 years agobpo-26985: Add missing info of code object in inspect documentation (GH-1090)
Xiang Zhang [Thu, 13 Apr 2017 02:38:28 +0000 (10:38 +0800)]
bpo-26985: Add missing info of code object in inspect documentation (GH-1090)

7 years agobpo-30017: Allowed calling the close() method of the zip entry writer object (#1041)
Serhiy Storchaka [Wed, 12 Apr 2017 13:03:23 +0000 (16:03 +0300)]
bpo-30017: Allowed calling the close() method of the zip entry writer object (#1041)

multiple times.  Writing to closed zip entry writer object now always produce
a ValueError.

7 years agobpo-30047: Fix a typo in Doc/library/select.rst (#1086)
NAKAMURA Osamu [Wed, 12 Apr 2017 10:30:40 +0000 (19:30 +0900)]
bpo-30047: Fix a typo in Doc/library/select.rst (#1086)

7 years agoRemove two legacy constants which hopefully have no consumers (#1087)
Alex Gaynor [Wed, 12 Apr 2017 02:41:42 +0000 (22:41 -0400)]
Remove two legacy constants which hopefully have no consumers (#1087)

The data contained in them is nonsensical

7 years agoReimplement tempfile._RandomNameSequence using a generator function. (#1075)
Serhiy Storchaka [Tue, 11 Apr 2017 19:45:59 +0000 (22:45 +0300)]
Reimplement tempfile._RandomNameSequence using a generator function. (#1075)

7 years agobpo-29692: Add missing ACKS entry (#1079)
Nick Coghlan [Tue, 11 Apr 2017 09:47:39 +0000 (19:47 +1000)]
bpo-29692: Add missing ACKS entry (#1079)

7 years agobpo-29692: contextlib.contextmanager may incorrectly unchain RuntimeError (GH-949)
svelankar [Tue, 11 Apr 2017 09:11:13 +0000 (05:11 -0400)]
bpo-29692: contextlib.contextmanager may incorrectly unchain RuntimeError (GH-949)

contextlib._GeneratorContextManager.__exit__ includes a special case to deal with
PEP 479 RuntimeErrors created when `StopIteration` is thrown into the context
manager body.

Previously this check was too permissive, and undid one level of chaining on *all*
RuntimeError instances, not just those that wrapped a StopIteration instance.

7 years agoRemove superfluous comment in urllib.error. (#1076)
Senthil Kumaran [Tue, 11 Apr 2017 04:08:35 +0000 (21:08 -0700)]
Remove superfluous comment in urllib.error. (#1076)

7 years agoRemove OSError related comment in urllib.request. (#1070)
Senthil Kumaran [Mon, 10 Apr 2017 02:49:34 +0000 (19:49 -0700)]
Remove OSError related comment in urllib.request. (#1070)

7 years agobpo-29506: Clarify deep copy note in copy module
Sanyam Khurana [Sun, 9 Apr 2017 10:22:30 +0000 (15:52 +0530)]
bpo-29506: Clarify deep copy note in copy module

The reference to administrative data was confusing to readers,
so this simplifies the note to explain that deep copying may copy
more then you intended, such as data that you expected to be
shared between copies.

7 years agobpo-26187: Test that set_trace_callback() is not called multiple times (GH-461)
Aviv Palivoda [Sun, 9 Apr 2017 09:11:59 +0000 (12:11 +0300)]
bpo-26187: Test that set_trace_callback() is not called multiple times (GH-461)

conn.set_trace_callback() shouldn't be called multiple times when the
schema is changing.

This has indirectly been fixed by using sqlite3_prepare_v2() in bpo-9303.

7 years agoIssue #29798: Handle git worktree in patchcheck (#1058)
Nick Coghlan [Sun, 9 Apr 2017 08:33:03 +0000 (18:33 +1000)]
Issue #29798: Handle git worktree in patchcheck (#1058)

The original attempted fix missed an `isdir()` call in
`get_base_branch()`.

7 years agobpo-29951: Include function name for some error messages in `PyArg_ParseTuple*` ...
Michael Seifert [Sun, 9 Apr 2017 07:47:12 +0000 (09:47 +0200)]
bpo-29951: Include function name for some error messages in `PyArg_ParseTuple*` (#916)

Also changed format specifier for function name from "%s" to "%.200s"
and exception messages should start with lowercase letter.

7 years agoRemove invalid comment in urllib.request. (#1054)
Senthil Kumaran [Sun, 9 Apr 2017 06:27:25 +0000 (23:27 -0700)]
Remove invalid comment in urllib.request. (#1054)

7 years agoImprovements to typing documentation (#967)
Jelle Zijlstra [Sat, 8 Apr 2017 16:09:14 +0000 (09:09 -0700)]
Improvements to typing documentation (#967)

Documents a few omitted classes and adds NamedTuple methods.

7 years agobpo-29998: Pickling and copying ImportError now preserves name and path (#1010)
Serhiy Storchaka [Sat, 8 Apr 2017 06:55:07 +0000 (09:55 +0300)]
bpo-29998: Pickling and copying ImportError now preserves name and path (#1010)

attributes.

7 years agoExpand the PySlice_GetIndicesEx macro. (#1023)
Serhiy Storchaka [Sat, 8 Apr 2017 06:53:51 +0000 (09:53 +0300)]
Expand the PySlice_GetIndicesEx macro. (#1023)

7 years agobpo-29914: Fix default implementations of __reduce__ and __reduce_ex__(). (#843)
Serhiy Storchaka [Sat, 8 Apr 2017 06:52:59 +0000 (09:52 +0300)]
bpo-29914: Fix default implementations of __reduce__ and __reduce_ex__(). (#843)

object.__reduce__() no longer takes arguments, object.__reduce_ex__() now
requires one argument.

7 years agoFix a minor typo. (#1032)
Barry Warsaw [Fri, 7 Apr 2017 18:18:14 +0000 (14:18 -0400)]
Fix a minor typo. (#1032)

7 years agobpo-29958: Minor improvements to zipfile and tarfile CLI. (#944)
Serhiy Storchaka [Fri, 7 Apr 2017 15:56:12 +0000 (18:56 +0300)]
bpo-29958: Minor improvements to zipfile and tarfile CLI. (#944)

7 years agoRemove Invalid comment in test_urllib2.py (#1020)
Senthil Kumaran [Fri, 7 Apr 2017 07:19:08 +0000 (00:19 -0700)]
Remove Invalid comment in test_urllib2.py (#1020)

7 years agobpo-28837: Fix lib2to3 handling of map/zip/filter calls when followed with a 'trailer...
Stuart Berg [Thu, 6 Apr 2017 05:19:40 +0000 (01:19 -0400)]
bpo-28837: Fix lib2to3 handling of map/zip/filter calls when followed with a 'trailer', e.g. zip()[x] (#24)

7 years agoCorrect typo in configparser.rst (#1012)
Alex Jordan [Thu, 6 Apr 2017 02:21:30 +0000 (22:21 -0400)]
Correct typo in configparser.rst (#1012)

7 years agobpo-29962: add math.remainder (#950)
Mark Dickinson [Wed, 5 Apr 2017 17:34:27 +0000 (18:34 +0100)]
bpo-29962: add math.remainder (#950)

* Implement math.remainder.

* Fix markup for arguments; use double spaces after period.

* Mark up function reference in what's new entry.

* Add comment explaining the calculation in the final branch.

* Fix out-of-order entry in whatsnew.

* Add comment explaining why it's good enough to compare m with c, in spite of possible rounding error.

7 years agoMiscellaneous minor fixes of Misc/NEWS formatting. (#1002)
Serhiy Storchaka [Wed, 5 Apr 2017 09:07:22 +0000 (12:07 +0300)]
Miscellaneous minor fixes of Misc/NEWS formatting. (#1002)

7 years agoUpdate Argument Clinic generated code for bpo-29878. (#1001)
Serhiy Storchaka [Wed, 5 Apr 2017 09:00:42 +0000 (12:00 +0300)]
Update Argument Clinic generated code for bpo-29878. (#1001)

7 years agobpo-29762: More use "raise from None". (#569)
Serhiy Storchaka [Wed, 5 Apr 2017 06:37:24 +0000 (09:37 +0300)]
bpo-29762: More use "raise from None". (#569)

This hides unwanted implementation details from tracebacks.

7 years agobpo-29549: Fixes docstring for str.index (#256)
Lisa Roach [Wed, 5 Apr 2017 05:36:22 +0000 (22:36 -0700)]
bpo-29549: Fixes docstring for str.index (#256)

* Updates B.index documentation.

* Updates str.index documentation, makes it Argument Clinic compatible.

* Removes ArgumentClinic code.

* Finishes string.index documentation.

* Updates string.rindex documentation.

* Documents B.rindex.

7 years agocorrect parse_qs and parse_qsl test case descriptions. (#968)
Senthil Kumaran [Wed, 5 Apr 2017 04:19:43 +0000 (21:19 -0700)]
correct parse_qs and parse_qsl test case descriptions. (#968)

* correct parse_qs and parse_qsl test case descriptions.

7 years agobpo-29649: Improve struct.pack_into() boundary error messages (#424)
Andrew Nester [Tue, 4 Apr 2017 10:46:25 +0000 (13:46 +0300)]
bpo-29649: Improve struct.pack_into() boundary error messages (#424)

7 years agobpo-29972: Skip tests known to fail on AIX (#979)
Victor Stinner [Tue, 4 Apr 2017 08:35:15 +0000 (10:35 +0200)]
bpo-29972: Skip tests known to fail on AIX (#979)

* bpo-29972: Fix test_eintr on AIX

On AIX, sigtimedwait(0.2) sleeps 199.8 ms, whereas the test expects
200 ms or longer.

* bpo-29972: Skip some inet_pton() tests on AIX

Skip some inet_pton() tests of test_socket on AIX.

inet_pton() on AIX is less strict than on Linux and doesn't reject
some invalid IP addresses. The unit tests test more the libc than
Python itself.

* bpo-29972: Skip tests known to fail on AIX

* test_locale.test_strcoll_with_diacritic()
* test_locale.test_strxfrm_with_diacritic()
* test_strptime.test_week_of_year_and_day_of_week_calculation()
* test_tools.test_POT_Creation_Date()

7 years agobpo-29725: DOC: add text for arraysize in sqlite3.Cursor (#947)
csabella [Tue, 4 Apr 2017 05:16:14 +0000 (01:16 -0400)]
bpo-29725: DOC: add text for arraysize in sqlite3.Cursor (#947)

* bpo-29725: DOC: add text for arraysize in sqlite3.Cursor

7 years agoRemove obsolete declaration in tokenizer.h (#962)
Jim Fasarakis-Hilliard [Mon, 3 Apr 2017 16:18:32 +0000 (19:18 +0300)]
Remove obsolete declaration in tokenizer.h (#962)

7 years agoCorrect typo (#976)
Angus Hollands [Mon, 3 Apr 2017 16:16:14 +0000 (17:16 +0100)]
Correct typo (#976)

7 years agotest_locale now ignores the DeprecationWarning (#977)
Victor Stinner [Mon, 3 Apr 2017 16:09:55 +0000 (18:09 +0200)]
test_locale now ignores the DeprecationWarning (#977)

Don't fail anymore if test run with python3 -Werror.

Fix also deprecation message: add a space.

7 years agoFix misleading documentation for math.exp. (#951)
Mark Dickinson [Sun, 2 Apr 2017 15:30:04 +0000 (16:30 +0100)]
Fix misleading documentation for math.exp. (#951)

7 years agobpo-19225: Add a table of warning names and missed exception names in C API doc ...
cocoatomo [Sun, 2 Apr 2017 10:45:40 +0000 (19:45 +0900)]
bpo-19225: Add a table of warning names and missed exception names in C API doc (#881)

Move the `.. index` directive to more appropriate place.

7 years agobpo-29654 : Support If-Modified-Since HTTP header (browser cache) (#298)
Pierre Quentel [Sun, 2 Apr 2017 10:26:12 +0000 (12:26 +0200)]
bpo-29654 : Support If-Modified-Since HTTP header (browser cache) (#298)

Return 304 response if file was not modified.

7 years agoMinor spell fix and formatting fixes in urllib tests. (#959)
Senthil Kumaran [Sun, 2 Apr 2017 06:47:35 +0000 (23:47 -0700)]
Minor spell fix and formatting fixes in urllib tests. (#959)

7 years agobpo-29957: change LBYL key lookup to dict.setdefault (#938)
Michael Selik [Sun, 2 Apr 2017 06:02:31 +0000 (02:02 -0400)]
bpo-29957: change LBYL key lookup to dict.setdefault (#938)

* change LBYL key lookup to dict.setdefault

The ``results`` was constructed as a defaultdict and we could simply
delete the check ``if key not in results``. However, I think it's safer
to use dict.setdefault as I'm not sure whether the caller expects a
regular dict or defaultdict.

* add name to the acknowledgements file

* use defaultdict to make the key-lookup cleaner

7 years agobpo-26947: DOC: clarify wording on hashable in glossary (#948)
csabella [Sun, 2 Apr 2017 02:50:47 +0000 (22:50 -0400)]
bpo-26947: DOC: clarify wording on hashable in glossary (#948)

7 years agobpo-29949: Fix set memory usage regression (GH-943)
INADA Naoki [Sat, 1 Apr 2017 08:20:25 +0000 (17:20 +0900)]
bpo-29949: Fix set memory usage regression (GH-943)

Revert "Minor factoring:  move redundant resize scaling logic into the resize function."

This reverts commit 4897300276d870f99459c82b937f0ac22450f0b6.

7 years agoRevert "bpo-29763: Use unittest cleanup in test_site (GH-841)" (GH-942)
Zachary Ware [Sat, 1 Apr 2017 06:29:31 +0000 (01:29 -0500)]
Revert "bpo-29763: Use unittest cleanup in test_site (GH-841)" (GH-942)

This reverts commit b94d7fd4efa877d649cea9c8125c8869ffe0c32d.