Commit Graph

80521 Commits

Author SHA1 Message Date
Benjamin Peterson 0a18422b31
allow the test suite to pass if the strop module doesn't exist (GH-5566)
strop is highly legacy and can be safely compiled out in most installations. Let's not fail the test suite for its absence.
2018-02-06 09:29:21 -08:00
Raymond Hettinger 2a4e2ea112
Fix typo -- missing "not" (GH-5532) 2018-02-04 10:34:29 -08:00
Raymond Hettinger 42e8ea9f69
bpo-32739: Show default value for rotate() (GH-5517)
Manual backport of GH-5485
2018-02-03 13:57:02 -08:00
Ned Deily 2357cd71b0 Update Doc build for split off of 3.7 branch 2018-02-03 16:31:41 -05:00
Mariatta 9b7b3a6456
bpo-32674: Improve the docstring for __import__ (GH-5339) (GH-5494)
Clarify that the level argument is used to determine whether to
perform absolute or relative imports: 0 is absolute, while a positive number
is the number of parent directories to search relative to the current module..
(cherry picked from commit 461d225b19)

Co-authored-by: oldk <oldk1331@users.noreply.github.com>
2018-02-02 11:23:53 -05:00
Serhiy Storchaka b7a2c17be8
[2.7] bpo-32137: The repr of deeply nested dict now raises a RuntimeError (GH-4570) (#5493)
instead of crashing due to a stack overflow.

This perhaps will fix similar problems in other extension types.
(cherry picked from commit 1fb72d2ad2)
2018-02-02 16:29:02 +02:00
Victor Stinner b60f43a0e6
bpo-30595: Increase test_queue_feeder_donot_stop_onexc() timeout (GH-2148) (GH-5429)
_test_multiprocessing.test_queue_feeder_donot_stop_onexc() now uses a
timeout of 1 second on Queue.get(), instead of 0.1 second, for slow
buildbots.

(cherry picked from commit 8f6eeaf21c)
2018-01-29 16:54:29 +01:00
Bo Bayles f5a793522d bpo-32304: Fix distutils upload for tar files ending with b'\r' (GH-5264) (GH-5331)
Patch by Bo Bayles.
2018-01-29 09:31:32 -05:00
Miss Islington (bot) 5679277fdd Fix PyTrace_RETURN documentation (GH-5384) (GH-5387)
It will be triggered when propagating an exception.
(cherry picked from commit 79db11ce99)
2018-01-28 23:49:14 +08:00
Miss Islington (bot) 745e9de7dd bpo-32687: Fix wrong meaning of args for PyTrace_LINE/CALL in documentation (GH-5361) (GH-5378)
(cherry picked from commit 9ed0aee27c)
2018-01-28 16:41:29 +08:00
Christian Heimes 38487a05cc
[2.7] bpo-32521: nis libnsl (GH-5190) (#5353)
The nismodule is now compatible with new libnsl and headers location

Signed-off-by: Christian Heimes <christian@python.org>.
(cherry picked from commit 29a7df7827)
2018-01-27 09:39:39 +01:00
Mariatta f5e8f71fe3
[2.7] bpo-32640: Clarify the behavior of str.join and unicode object (GH-5333)
In str.join, if any of the iterable contains a Unicode object,
str.join will return a Unicode object.

A Type error will be raised if iterable contains values other
than a string or Unicode object.
2018-01-26 09:55:15 -08:00
Victor Stinner 6996f284d4
bpo-32667: Fix tests when $PATH contains a file (#5324)
test_subprocess.test_leaking_fds_on_error() failed when the PATH
environment variable contains a path to an existing file. Fix the
test: ignore also ENOTDIR, not only ENOENT and EACCES.
2018-01-25 22:41:38 +01:00
Xiang Zhang e64a47b37d
bpo-17799: Explain real behaviour of sys.settrace and sys.setprofile (GH-4056). (#5299)
(cherry picked from commit 131fd7f96c)
2018-01-24 22:53:42 +08:00
Miss Islington (bot) 6ccdad7b1f bpo-32635: Fix a segfault when importing the crypt module with libxcrypt. (GH-5284) (#5295)
glibc is deprecating libcrypt in favor of libxcrypt, however python assumes
that crypt.h will always be included. This change makes the header inclusion
explicit when libxcrypt is present on the system.
(cherry picked from commit e768c86ef4)
2018-01-24 10:51:39 +01:00
Pablo Galindo 8ca036d471 bpo-32586: Fix code example in urllib2's doc (GH-5238)
It should be `urllib2.URLError` instead of just `URLError`.
2018-01-18 16:16:13 -08:00
Gregory P. Smith b1a52b1167
Use assertItemsEqual instead of assertEqual. (#5224)
This test doesn't care about order, the underlying filesystem APIs do not
guarantee directory listings on subsequent calls will be in the same order.
2018-01-17 15:15:46 -08:00
Miss Islington (bot) 016f59a716 pythoninfo: add time.time and datetime.datetime.now (GH-5214) (#5220)
(cherry picked from commit 7d91c02504)
2018-01-17 17:58:16 +01:00
Anthony Sottile 27f32e938f bpo-32539: Fix OSError for os.listdir() for extended-length paths on Windows (#5169)
See https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx?f=255&MSPPError=-2147217396#maxpath

Paths that begin with `\\?\` are "extended-length paths".
2018-01-15 23:39:04 +02:00
Miss Islington (bot) ab95b3074e bpo-32521: nis libtirpc (GH-5137) (#5166)
glibc has removed Sun RPC. Use replacement libtirpc headers and library in
nis module

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit f3031b8a7a)
2018-01-12 16:35:25 +01:00
Zachary Ware 0ebf0ae6a2
Fix version in AppVeyor config (GH-5126) 2018-01-07 13:00:56 -06:00
Zachary Ware cd02003b9e
[2.7] Kill the AppVeyor file whitelist (GH-5123)
It's more trouble than it's worth, since AppVeyor only checks the HEAD commit of a PR rather than the full diff against the base branch to decide which files changed.
(cherry picked from commit 7f7de371f9)
2018-01-06 21:16:56 -06:00
Benjamin Peterson e13698172f
[2.7] advance copyright years to 2018 (GH-5094). (#5105)
(cherry picked from commit 65f2a6dcc2)
2018-01-04 23:02:11 -08:00
Serhiy Storchaka ca54740f25
[2.7] bpo-32211: Document the existing bug in re.findall() and re.finditer(). (GH-4695). (#5096)
(cherry picked from commit 1e6d8525f9)
2018-01-04 14:08:27 +02:00
Serhiy Storchaka 0bcba372bc
bpo-32482: Improve syntax and grammar tests. (#5085) 2018-01-04 10:36:14 +02:00
Benjamin Peterson eb08a9290f
coalesce GILless sections in new_buffersize (#5059)
830daae1c8 added some new GIL-releasing to new_buffersize. This is fine, but it's better to avoid reacquiring the GIL for as long as possible. Also, it should use FILE_(BEGIN|END)_ALLOW_THREADS to avoid having the file closed from under it.
2018-01-02 15:52:42 -08:00
Benjamin Peterson dbf52e02f1
bpo-31530: fix crash when multiple threads iterate over a file, round 2 (#5060)
Multiple threads iterating over a file can corrupt the file's internal readahead
buffer resulting in crashes. To fix this, cache buffer state thread-locally for
the duration of a file_iternext call and only update the file's internal state
after reading completes.

No attempt is made to define or provide "reasonable" semantics for iterating
over a file on multiple threads. (Non-crashing) races are still
present. Duplicated, corrupt, and missing data will happen.

This was originally fixed by 6401e56717, which
raised an exception from seek() and next() when concurrent operations were
detected. Alas, this simpler solution breaks legitimate use cases such as
capturing the standard streams when multiple threads are logging.
2018-01-02 09:25:41 -08:00
Miss Islington (bot) 0e0d1017a4 bpo-32452: clarify term 'brackets' in generator tutorial (GH-5079) (#5082)
Updates documentation for generator expressions in classes tutorial: Clarify usage of ambiguous term "brackets" by replacing with "square brackets". Updated subsequent lines to respect line breaks. (GH-5079)
(cherry picked from commit f190eb59e6)
2018-01-02 10:42:12 -05:00
Serhiy Storchaka b495377a8b
[2.7] bpo-32478: Add tests for 'break' and 'return' inside 'finally' clause. (GH-5078). (#5084)
(cherry picked from commit 7cc42c356b)
2018-01-02 10:56:40 +02:00
Miss Islington (bot) 2de47ca109 bpo-32416: Add two new tests in test_sys_settrace. (GH-5072) (#5074)
Move other test to more proper place.
(cherry picked from commit e8ed96550c)
2018-01-01 20:51:12 +02:00
Zachary Ware 4be7420d7c
[2.7] Add missing backslashes in PCbuild bat files (GH-5056) (GH-5058)
(cherry picked from commit fe90efdc07)
2017-12-30 18:34:46 -06:00
Segev Finer 3ceaed0dce bpo-18035: telnetlib: select.error doesn't have an errno attribute (#5044)
select.error doesn't have an errno attribute so access the errno by
indexing instead.
2017-12-29 12:44:04 -08:00
Benjamin Peterson 1f9d549a3b
[2.7] remove unused import (GH-5040). (#5043)
(cherry picked from commit e325608740)
2017-12-28 23:38:55 -08:00
Miss Islington (bot) 417f76a20e make PatternCompiler use the packaged grammar if possible (more bpo-24960) (GH-5034) (#5037)
(cherry picked from commit e5f7dccefa)
2017-12-28 18:05:07 -08:00
Serhiy Storchaka c60eca06ad
[2.7] bpo-32416: Refactor tests for the f_lineno setter and add new tests. (GH-4991). (#5017)
(cherry picked from commit 53f9135667)
2017-12-27 21:32:03 +02:00
Miss Islington (bot) 8b9995f2ae correct wording (GH-4983) (#4985)
(cherry picked from commit d11e8e0d11)
2017-12-22 21:49:49 -08:00
Benjamin Peterson 770a802df7
[2.7] bpo-24960: use pkgutil.get_data in lib2to3 to read pickled grammar files (GH-4977) (#4980)
This is more complicated than it should be because we need to preserve the
useful mtime-based regeneration feature that lib2to3.pgen2.driver.load_grammar
has. We only look for the pickled grammar file with pkgutil.get_data and only if
the source file does not exist..
(cherry picked from commit 8a5877165e)
2017-12-22 12:52:10 -08:00
Miss Islington (bot) e8ab7eb5c7 correct the typos (GH-4950) (#4952)
(cherry picked from commit 83cb778b4a)
2017-12-21 07:42:42 +02:00
Victor Stinner 2316c68640
pythoninfo: sync with master (#4843) 2017-12-13 23:23:40 +01:00
Miss Islington (bot) 3ff488c082 trivial: link updates in documentation (GH-2765) (#4836)
(cherry picked from commit 4f29f3c84b)
2017-12-13 14:45:13 +02:00
Miss Islington (bot) d663549a6a Fix improper use of re.escape() in tests. (GH-4814) (#4817)
(cherry picked from commit b748e3b258)
2017-12-12 20:49:18 +02:00
Steven Loria 3b9173d33a bpo-30806: Fix netrc.__repr__() format (GH-2491)
netrc file format doesn't support quotes and escapes.

See https://linux.die.net/man/5/netrc
2017-12-10 15:09:58 +09:00
Vinay Sajip 292fce9934
bpo-32212: Updated logging documentation to make parameter names more consistent with source. (GH-4765) (GH-4768)
(cherry picked from commit a9f8df646a)
2017-12-09 12:49:10 +00:00
Nir Soffer 830daae1c8 [2.7] bpo-32186: Release the GIL during fstat and lseek calls (#4651)
In fileio, there were 3 fstat() calls and one lseek() call that did not
release the GIL during the call. This can cause all threads to hang for
unlimited time when using io.FileIO with inaccessible NFS server.

Same issue seen in fileio exists also in fileobject, fixed in the same
way.
2017-12-07 21:25:39 +01:00
Mariatta 12fa6b1e2f
Add a missing space in tkinter documentation. (GH-4692). (GH-4723)
(cherry picked from commit ae342cf7de)
2017-12-04 21:15:57 -08:00
Serhiy Storchaka 65d1887170
[2.7] bpo-10544: Deprecate "yield" in comprehensions and generator expressions in Py3k mode. (GH-4579) (#4676) 2017-12-02 21:00:09 +02:00
Victor Stinner be6b74c079
bpo-20891: Fix PyGILState_Ensure() (#4650) (#4657)
When PyGILState_Ensure() is called in a non-Python thread before
PyEval_InitThreads(), only call PyEval_InitThreads() after calling
PyThreadState_New() to fix a crash.

(cherry picked from commit b4d1e1f7c1)
2017-11-30 23:35:14 +01:00
Victor Stinner 7d1cfeef64
make tags: index also Modules/_ctypes/ (#4648) (#4660)
Avoid also "cd $(srcdir)" to not change the current directory.

(cherry picked from commit 3be3b97a97)
2017-11-30 23:28:01 +01:00
Barry Warsaw 56e444f8df
[2.7] bpo-32107 - Backport bitmask check fix (GH-4576) (#4590)
Remove a flakey test and rewrite another one for readability.
2017-11-29 10:34:40 -05:00
Miss Islington (bot) bc19cf57a8 bpo-32139: test_strftime does not anymore modify the locale (GH-4569) (#4636)
(cherry picked from commit cc55e78aca)
2017-11-29 16:29:54 +01:00