]> granicus.if.org Git - python/log
python
7 years ago[2.7] bpo-21060 Improve error message for "setup.py upload" without dist files (GH...
Éric Araujo [Mon, 19 Feb 2018 03:56:06 +0000 (22:56 -0500)]
[2.7] bpo-21060 Improve error message for "setup.py upload" without dist files (GH-5726).

(cherry picked from commit 08a6926b2584040fe3c3f06263b0b5f1fbbdc24c)

Co-authored-by: Éric Araujo <merwok@netwok.org>
7 years ago[2.7] Clean up Travis config (GH-5727)
Zachary Ware [Sun, 18 Feb 2018 21:45:48 +0000 (15:45 -0600)]
[2.7] Clean up Travis config (GH-5727)

(cherry picked from commit 7eb3f8226ea7b79dae4e4e8b05730cfe0d9af7c1)

7 years agoDOC: fix documentation for copyright and credits (GH-5706)
Miss Islington (bot) [Sat, 17 Feb 2018 04:11:48 +0000 (20:11 -0800)]
DOC: fix documentation for copyright and credits (GH-5706)

Adapt documentation for `copyright` and `credits` to reality.  Previously, the documentation implied that all each of `copyright`,
`credits`, and `license`, would print a message to call the object in order to see the full text.  In reality, only `license` exhibits this
behaviour, and `copyright` and `credit` print their full text either when printed, displayed, or called.
(cherry picked from commit 243d6d71265be1996a8326002deae429106a5fba)

Co-authored-by: Gerrit Holl <gerrit.holl@gmail.com>
7 years agoUpdate comment in posixmodule.c (GH-5681)
Miss Islington (bot) [Wed, 14 Feb 2018 20:43:17 +0000 (12:43 -0800)]
Update comment in posixmodule.c (GH-5681)

A closing parentheses was missing.

Signed-off-by: Ngie Cooper <yaneurabeya@gmail.com>
(cherry picked from commit 7745ec4e356ac1f4eaf43b155f4482c20a907d48)

Co-authored-by: ngie-eign <1574099+ngie-eign@users.noreply.github.com>
7 years agoFix installation instructions for *nix (GH-5605)
Miss Islington (bot) [Wed, 14 Feb 2018 03:55:09 +0000 (19:55 -0800)]
Fix installation instructions for *nix (GH-5605)

Remove pkg_add -r python from FreeBSD installation section.
Moved to OpenBSD.
(cherry picked from commit 3384d38d51a2c3450e742175db5d6d638fa5d2eb)

Co-authored-by: Eitan Adler <grimreaper@users.noreply.github.com>
7 years ago[2.7] remove mercurial dot files (GH-5558).
Benjamin Peterson [Wed, 14 Feb 2018 03:17:10 +0000 (19:17 -0800)]
[2.7] remove mercurial dot files (GH-5558).

(cherry picked from commit 2b86f4cb2cd339f545804a9abb8c4d4cc28d9488)

7 years agobpo-30109: Fix reindent.py for non-ASCII files. (#5637)
Serhiy Storchaka [Mon, 12 Feb 2018 18:16:42 +0000 (20:16 +0200)]
bpo-30109: Fix reindent.py for non-ASCII files. (#5637)

It now processes files as binary streams.

This also fixes "make reindent".

7 years agoFix typo in Include/objimpl.h, the word "has" was missing (GH-5568) (GH-5571)
Miss Islington (bot) [Mon, 12 Feb 2018 08:06:48 +0000 (00:06 -0800)]
Fix typo in Include/objimpl.h, the word "has" was missing (GH-5568) (GH-5571)

It now reads: ...be aware that Python has no control over...
(cherry picked from commit 517da1e58f4c489d4b31579852cde5f7113da08e)

Co-authored-by: Alexey <forestbiiird@gmail.com>
7 years agoFix AppVeyor doc short-circuit (GH-5635)
Miss Islington (bot) [Sun, 11 Feb 2018 22:29:11 +0000 (14:29 -0800)]
Fix AppVeyor doc short-circuit (GH-5635)

(cherry picked from commit 6ea20fc719dcaf102d2cefa1786f0421514f7a58)

7 years ago[2.7] Add short-circuit for doc changes to AppVeyor (GH-5629)
Zachary Ware [Sun, 11 Feb 2018 19:57:11 +0000 (13:57 -0600)]
[2.7] Add short-circuit for doc changes to AppVeyor (GH-5629)

(cherry picked from commit 28607e0dd9417ce44a109980ffd60697c1afdea0)

7 years agobpo-32800: Update link to w3c doc for xml default namespaces (GH-5609) (GH-5613)
Miss Islington (bot) [Sun, 11 Feb 2018 00:42:42 +0000 (16:42 -0800)]
bpo-32800: Update link to w3c doc for xml default namespaces (GH-5609) (GH-5613)

The new link is given in a red box on the old page.
(cherry picked from commit 8d1f2f40389c476d9240ec87a33da0373597c6af)

Co-authored-by: sblondon <sblondon@users.noreply.github.com>
7 years ago[2.7] bpo-30157: Fix csv.Sniffer.sniff() regex pattern. (GH-5601) (GH-5604)
Serhiy Storchaka [Fri, 9 Feb 2018 22:02:04 +0000 (00:02 +0200)]
[2.7] bpo-30157: Fix csv.Sniffer.sniff() regex pattern. (GH-5601) (GH-5604)

Co-authored-by: Jake Davis <jcdavis@awedge.net>.
(cherry picked from commit 2411292ba8155327125d8a1da8a4c9fa003d5909)

7 years agobpo-32784: Wrong argument name for csv.DictReader in documentation (GH-5575)
Stéphane Wirtel [Wed, 7 Feb 2018 16:05:35 +0000 (17:05 +0100)]
bpo-32784: Wrong argument name for csv.DictReader in documentation (GH-5575)

Use `f` as the name of the first parameter of `csv.DictReader` and
`csv.DictWriter` classes.

7 years agobpo-32616: Disable computed gotos by default for clang < 5 (GH-5574)
INADA Naoki [Wed, 7 Feb 2018 10:09:36 +0000 (19:09 +0900)]
bpo-32616: Disable computed gotos by default for clang < 5 (GH-5574)

7 years agoallow the test suite to pass if the strop module doesn't exist (GH-5566)
Benjamin Peterson [Tue, 6 Feb 2018 17:29:21 +0000 (09:29 -0800)]
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.

7 years agoFix typo -- missing "not" (GH-5532)
Raymond Hettinger [Sun, 4 Feb 2018 18:34:29 +0000 (10:34 -0800)]
Fix typo -- missing "not" (GH-5532)

7 years agobpo-32739: Show default value for rotate() (GH-5517)
Raymond Hettinger [Sat, 3 Feb 2018 21:57:02 +0000 (13:57 -0800)]
bpo-32739: Show default value for rotate() (GH-5517)

Manual backport of GH-5485

7 years agoUpdate Doc build for split off of 3.7 branch
Ned Deily [Sat, 3 Feb 2018 21:31:41 +0000 (16:31 -0500)]
Update Doc build for split off of 3.7 branch

7 years agobpo-32674: Improve the docstring for __import__ (GH-5339) (GH-5494)
Mariatta [Fri, 2 Feb 2018 16:23:53 +0000 (11:23 -0500)]
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 461d225b195eec5269f317323b41115516144c41)

Co-authored-by: oldk <oldk1331@users.noreply.github.com>
7 years ago[2.7] bpo-32137: The repr of deeply nested dict now raises a RuntimeError (GH-4570...
Serhiy Storchaka [Fri, 2 Feb 2018 14:29:02 +0000 (16:29 +0200)]
[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 1fb72d2ad243c965d4432b4e93884064001a2607)

7 years agobpo-30595: Increase test_queue_feeder_donot_stop_onexc() timeout (GH-2148) (GH-5429)
Victor Stinner [Mon, 29 Jan 2018 15:54:29 +0000 (16:54 +0100)]
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 8f6eeaf21cdf4aea25fdefeec814a1ce07453fe9)

7 years agobpo-32304: Fix distutils upload for tar files ending with b'\r' (GH-5264) (GH-5331)
Bo Bayles [Mon, 29 Jan 2018 14:31:32 +0000 (08:31 -0600)]
bpo-32304: Fix distutils upload for tar files ending with b'\r' (GH-5264) (GH-5331)

Patch by Bo Bayles.

7 years agoFix PyTrace_RETURN documentation (GH-5384) (GH-5387)
Miss Islington (bot) [Sun, 28 Jan 2018 15:49:14 +0000 (07:49 -0800)]
Fix PyTrace_RETURN documentation (GH-5384) (GH-5387)

It will be triggered when propagating an exception.
(cherry picked from commit 79db11ce99332d62917be9d03b31494b1ff2f96a)

7 years agobpo-32687: Fix wrong meaning of args for PyTrace_LINE/CALL in documentation (GH-5361...
Miss Islington (bot) [Sun, 28 Jan 2018 08:41:29 +0000 (00:41 -0800)]
bpo-32687: Fix wrong meaning of args for PyTrace_LINE/CALL in documentation (GH-5361) (GH-5378)

(cherry picked from commit 9ed0aee27c249dada410a22fff4325a4a61df36d)

7 years ago[2.7] bpo-32521: nis libnsl (GH-5190) (#5353)
Christian Heimes [Sat, 27 Jan 2018 08:39:39 +0000 (09:39 +0100)]
[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 29a7df78277447cf6b898dfa0b1b42f8da7abc0c)

7 years ago[2.7] bpo-32640: Clarify the behavior of str.join and unicode object (GH-5333)
Mariatta [Fri, 26 Jan 2018 17:55:15 +0000 (09:55 -0800)]
[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.

7 years agobpo-32667: Fix tests when $PATH contains a file (#5324)
Victor Stinner [Thu, 25 Jan 2018 21:41:38 +0000 (22:41 +0100)]
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.

7 years agobpo-17799: Explain real behaviour of sys.settrace and sys.setprofile (GH-4056). ...
Xiang Zhang [Wed, 24 Jan 2018 14:53:42 +0000 (22:53 +0800)]
bpo-17799: Explain real behaviour of sys.settrace and sys.setprofile (GH-4056). (#5299)

(cherry picked from commit 131fd7f96c619bc7eaea956e45c6337175f4b27f)

7 years agobpo-32635: Fix a segfault when importing the crypt module with libxcrypt. (GH-5284...
Miss Islington (bot) [Wed, 24 Jan 2018 09:51:39 +0000 (01:51 -0800)]
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 e768c86ef442ef89004089a8a34ce5909ffb90f2)

7 years agobpo-32586: Fix code example in urllib2's doc (GH-5238)
Pablo Galindo [Fri, 19 Jan 2018 00:16:13 +0000 (00:16 +0000)]
bpo-32586: Fix code example in urllib2's doc  (GH-5238)

It should be `urllib2.URLError` instead of just `URLError`.

7 years agoUse assertItemsEqual instead of assertEqual. (#5224)
Gregory P. Smith [Wed, 17 Jan 2018 23:15:46 +0000 (15:15 -0800)]
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.

7 years agopythoninfo: add time.time and datetime.datetime.now (GH-5214) (#5220)
Miss Islington (bot) [Wed, 17 Jan 2018 16:58:16 +0000 (08:58 -0800)]
pythoninfo: add time.time and datetime.datetime.now (GH-5214) (#5220)

(cherry picked from commit 7d91c0250408e202243c77c1dc9afdb321b6b32f)

7 years agobpo-32539: Fix OSError for os.listdir() for extended-length paths on Windows (#5169)
Anthony Sottile [Mon, 15 Jan 2018 21:39:04 +0000 (13:39 -0800)]
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".

7 years agobpo-32521: nis libtirpc (GH-5137) (#5166)
Miss Islington (bot) [Fri, 12 Jan 2018 15:35:25 +0000 (07:35 -0800)]
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 f3031b8a7ad71d3b6ed05da7f3041d9efbe773cf)

7 years agoFix version in AppVeyor config (GH-5126)
Zachary Ware [Sun, 7 Jan 2018 19:00:56 +0000 (13:00 -0600)]
Fix version in AppVeyor config (GH-5126)

7 years ago[2.7] Kill the AppVeyor file whitelist (GH-5123)
Zachary Ware [Sun, 7 Jan 2018 03:16:56 +0000 (21:16 -0600)]
[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 7f7de371f947dc38e67505601927e9bc58fa268a)

7 years ago[2.7] advance copyright years to 2018 (GH-5094). (#5105)
Benjamin Peterson [Fri, 5 Jan 2018 07:02:11 +0000 (23:02 -0800)]
[2.7] advance copyright years to 2018 (GH-5094). (#5105)

(cherry picked from commit 65f2a6dcc2bc28a8566b74c8e9273f982331ec48)

7 years ago[2.7] bpo-32211: Document the existing bug in re.findall() and re.finditer(). (GH...
Serhiy Storchaka [Thu, 4 Jan 2018 12:08:27 +0000 (14:08 +0200)]
[2.7] bpo-32211: Document the existing bug in re.findall() and re.finditer(). (GH-4695). (#5096)

(cherry picked from commit 1e6d8525f9dd3dcdc83adb93b164082c8b95d17a)

7 years agobpo-32482: Improve syntax and grammar tests. (#5085)
Serhiy Storchaka [Thu, 4 Jan 2018 08:36:14 +0000 (10:36 +0200)]
bpo-32482: Improve syntax and grammar tests. (#5085)

7 years agocoalesce GILless sections in new_buffersize (#5059)
Benjamin Peterson [Tue, 2 Jan 2018 23:52:42 +0000 (15:52 -0800)]
coalesce GILless sections in new_buffersize (#5059)

830daae1c82ed33deef0086b7b6323e5be0b0cc8 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.

7 years agobpo-31530: fix crash when multiple threads iterate over a file, round 2 (#5060)
Benjamin Peterson [Tue, 2 Jan 2018 17:25:41 +0000 (09:25 -0800)]
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 6401e5671781eb217ee1afb4603cc0d1b0367ae6, 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.

7 years agobpo-32452: clarify term 'brackets' in generator tutorial (GH-5079) (#5082)
Miss Islington (bot) [Tue, 2 Jan 2018 15:42:12 +0000 (07:42 -0800)]
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 f190eb59e60e2ae7a7cbd396458389a7a076e0d3)

7 years ago[2.7] bpo-32478: Add tests for 'break' and 'return' inside 'finally' clause. (GH...
Serhiy Storchaka [Tue, 2 Jan 2018 08:56:40 +0000 (10:56 +0200)]
[2.7] bpo-32478: Add tests for 'break' and 'return' inside 'finally' clause. (GH-5078). (#5084)

(cherry picked from commit 7cc42c356b0dc5ad9eaa9392789e84bd4aa1c7de)

7 years agobpo-32416: Add two new tests in test_sys_settrace. (GH-5072) (#5074)
Miss Islington (bot) [Mon, 1 Jan 2018 18:51:12 +0000 (10:51 -0800)]
bpo-32416: Add two new tests in test_sys_settrace. (GH-5072) (#5074)

Move other test to more proper place.
(cherry picked from commit e8ed96550c6aa9a1e39c36e67e892994e25e2c41)

7 years ago[2.7] Add missing backslashes in PCbuild bat files (GH-5056) (GH-5058)
Zachary Ware [Sun, 31 Dec 2017 00:34:46 +0000 (18:34 -0600)]
[2.7] Add missing backslashes in PCbuild bat files (GH-5056) (GH-5058)

(cherry picked from commit fe90efdc07ec70fd4ff28eac179448a41379cff1)

7 years agobpo-18035: telnetlib: select.error doesn't have an errno attribute (#5044)
Segev Finer [Fri, 29 Dec 2017 20:44:04 +0000 (22:44 +0200)]
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.

7 years ago[2.7] remove unused import (GH-5040). (#5043)
Benjamin Peterson [Fri, 29 Dec 2017 07:38:55 +0000 (23:38 -0800)]
[2.7] remove unused import (GH-5040). (#5043)

(cherry picked from commit e325608740bee161ca7fefd09463d63099efa1b8)

7 years agomake PatternCompiler use the packaged grammar if possible (more bpo-24960) (GH-5034...
Miss Islington (bot) [Fri, 29 Dec 2017 02:05:07 +0000 (18:05 -0800)]
make PatternCompiler use the packaged grammar if possible (more bpo-24960) (GH-5034) (#5037)

(cherry picked from commit e5f7dccefaa8d97ab53b3051acbb4a4d49379dc4)

7 years ago[2.7] bpo-32416: Refactor tests for the f_lineno setter and add new tests. (GH-4991...
Serhiy Storchaka [Wed, 27 Dec 2017 19:32:03 +0000 (21:32 +0200)]
[2.7] bpo-32416: Refactor tests for the f_lineno setter and add new tests. (GH-4991). (#5017)

(cherry picked from commit 53f9135667226f33e049e327db60fb033afbd77a)

7 years agocorrect wording (GH-4983) (#4985)
Miss Islington (bot) [Sat, 23 Dec 2017 05:49:49 +0000 (21:49 -0800)]
correct wording (GH-4983) (#4985)

(cherry picked from commit d11e8e0d11c759cd0f96aebb59de914e4d62b8cd)

7 years ago[2.7] bpo-24960: use pkgutil.get_data in lib2to3 to read pickled grammar files (GH...
Benjamin Peterson [Fri, 22 Dec 2017 20:52:10 +0000 (12:52 -0800)]
[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 8a5877165e993afb2633cd48da5222326d3f6e0e)

7 years agocorrect the typos (GH-4950) (#4952)
Miss Islington (bot) [Thu, 21 Dec 2017 05:42:42 +0000 (21:42 -0800)]
correct the typos (GH-4950) (#4952)

(cherry picked from commit 83cb778b4a3f856f2243b0f0d36fefb5c44b388f)

7 years agopythoninfo: sync with master (#4843)
Victor Stinner [Wed, 13 Dec 2017 22:23:40 +0000 (23:23 +0100)]
pythoninfo: sync with master (#4843)

7 years agotrivial: link updates in documentation (GH-2765) (#4836)
Miss Islington (bot) [Wed, 13 Dec 2017 12:45:13 +0000 (04:45 -0800)]
trivial: link updates in documentation (GH-2765) (#4836)

(cherry picked from commit 4f29f3c84b74de8c208980a14bc56bffa6363121)

7 years agoFix improper use of re.escape() in tests. (GH-4814) (#4817)
Miss Islington (bot) [Tue, 12 Dec 2017 18:49:18 +0000 (10:49 -0800)]
Fix improper use of re.escape() in tests. (GH-4814) (#4817)

(cherry picked from commit b748e3b2586e44bfc7011b601bce9cc6d16d89f1)

7 years agobpo-30806: Fix netrc.__repr__() format (GH-2491)
Steven Loria [Sun, 10 Dec 2017 06:09:58 +0000 (01:09 -0500)]
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

7 years agobpo-32212: Updated logging documentation to make parameter names more consistent...
Vinay Sajip [Sat, 9 Dec 2017 12:49:10 +0000 (12:49 +0000)]
bpo-32212: Updated logging documentation to make parameter names more consistent with source. (GH-4765) (GH-4768)

(cherry picked from commit a9f8df646aac7fc94ced0aefd1ed2c8566d14d10)

7 years ago[2.7] bpo-32186: Release the GIL during fstat and lseek calls (#4651)
Nir Soffer [Thu, 7 Dec 2017 20:25:39 +0000 (22:25 +0200)]
[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.

7 years agoAdd a missing space in tkinter documentation. (GH-4692). (GH-4723)
Mariatta [Tue, 5 Dec 2017 05:15:57 +0000 (21:15 -0800)]
Add a missing space in tkinter documentation. (GH-4692). (GH-4723)

(cherry picked from commit ae342cf7deebdcf2035f4064609b32b2102dadcf)

7 years ago[2.7] bpo-10544: Deprecate "yield" in comprehensions and generator expressions in...
Serhiy Storchaka [Sat, 2 Dec 2017 19:00:09 +0000 (21:00 +0200)]
[2.7] bpo-10544: Deprecate "yield" in comprehensions and generator expressions in Py3k mode. (GH-4579) (#4676)

7 years agobpo-20891: Fix PyGILState_Ensure() (#4650) (#4657)
Victor Stinner [Thu, 30 Nov 2017 22:35:14 +0000 (23:35 +0100)]
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 b4d1e1f7c1af6ae33f0e371576c8bcafedb099db)

7 years agomake tags: index also Modules/_ctypes/ (#4648) (#4660)
Victor Stinner [Thu, 30 Nov 2017 22:28:01 +0000 (23:28 +0100)]
make tags: index also Modules/_ctypes/ (#4648) (#4660)

Avoid also "cd $(srcdir)" to not change the current directory.

(cherry picked from commit 3be3b97a9709d3cd5303175ddbffa7dcca57ac3e)

7 years ago[2.7] bpo-32107 - Backport bitmask check fix (GH-4576) (#4590)
Barry Warsaw [Wed, 29 Nov 2017 15:34:40 +0000 (10:34 -0500)]
[2.7] bpo-32107 - Backport bitmask check fix (GH-4576) (#4590)

Remove a flakey test and rewrite another one for readability.

7 years agobpo-32139: test_strftime does not anymore modify the locale (GH-4569) (#4636)
Miss Islington (bot) [Wed, 29 Nov 2017 15:29:54 +0000 (07:29 -0800)]
bpo-32139: test_strftime does not anymore modify the locale (GH-4569) (#4636)

(cherry picked from commit cc55e78acab93a495c974b9a2ea71c8bb9cc2f5d)

7 years agobpo-32110: codecs.StreamReader.read(n) now returns not more than n (GH-4499) (#4623)
Miss Islington (bot) [Wed, 29 Nov 2017 00:15:43 +0000 (16:15 -0800)]
bpo-32110: codecs.StreamReader.read(n) now returns not more than n (GH-4499) (#4623)

characters/bytes for non-negative n.  This makes it compatible with
read() methods of other file-like objects.
(cherry picked from commit 219c2de5ad0fdac825298bed1bb251f16956c04a)

7 years agopythoninfo: add Py_DEBUG (#4198) (#4581)
Victor Stinner [Mon, 27 Nov 2017 09:44:50 +0000 (10:44 +0100)]
pythoninfo: add Py_DEBUG (#4198) (#4581)

(cherry picked from commit afd055a59fe0291881fc2459215ce106e424da51)

7 years agobpo-30855: Bump Tcl/Tk to 8.5.19 on Windows (GH-4550)
Zachary Ware [Sun, 26 Nov 2017 17:55:46 +0000 (11:55 -0600)]
bpo-30855: Bump Tcl/Tk to 8.5.19 on Windows (GH-4550)

7 years agoImprove Scheduler Objects documentation. (GH-4556) (GH-4558)
Miss Islington (bot) [Sat, 25 Nov 2017 05:49:10 +0000 (21:49 -0800)]
Improve Scheduler Objects documentation. (GH-4556) (GH-4558)

Mention that the lower the priority number, the higher priority it represents.
(cherry picked from commit 9d5ec808de2c1359f434cc2fa8378458e4339c96)

7 years agobpo-30004: Fix the code example of using group in Regex Howto Docs (GH-4443) (GH...
Miss Islington (bot) [Sat, 25 Nov 2017 05:01:39 +0000 (21:01 -0800)]
bpo-30004: Fix the code example of using group in Regex Howto Docs (GH-4443) (GH-4555)

The provided code example was supposed to find repeated words, however it returned false results.
(cherry picked from commit 610e5afdcbe3eca906ef32f4e0364e20e1b1ad23)

7 years agoImprove the String tutorial docs (GH-4541) (GH-4546)
Miss Islington (bot) [Fri, 24 Nov 2017 17:35:53 +0000 (09:35 -0800)]
Improve the String tutorial docs (GH-4541) (GH-4546)

The paragraph that contains example of string literal concatenation was placed
after the section about concatenation using the '+' sign.
Moved the paragraph to the appropriate section.
(cherry picked from commit 78a5722ae950b80a4b3d13377957f3932195aef3)

7 years agoExtending Python Doc minor updates (GH-4518) (GH-4536)
Miss Islington (bot) [Fri, 24 Nov 2017 08:55:33 +0000 (00:55 -0800)]
Extending Python Doc minor updates  (GH-4518) (GH-4536)

Move footnote markers to be closer to the related terminology:
before the end of the sentence, instead of after.
(cherry picked from commit cdfe910e746e1d0fc43429b8cc3384a65a19b358)

7 years agobpo-31626: Fix _PyObject_DebugReallocApi() (#4310)
Victor Stinner [Fri, 24 Nov 2017 01:13:26 +0000 (02:13 +0100)]
bpo-31626: Fix _PyObject_DebugReallocApi() (#4310)

_PyObject_DebugReallocApi() now calls Py_FatalError() if realloc()
fails to shrink a memory block.

Call Py_FatalError() because _PyObject_DebugReallocApi() erased freed
bytes *before* realloc(), expecting that realloc() *cannot* fail to
shrink a memory block.

7 years agobpo-31324: Optimize support._match_test() (#4523) (#4524)
Victor Stinner [Thu, 23 Nov 2017 17:34:59 +0000 (18:34 +0100)]
bpo-31324: Optimize support._match_test() (#4523) (#4524)

* bpo-31324: Optimize support._match_test() (#4421)

* Rename support._match_test() to support.match_test(): make it
  public
* Remove support.match_tests global variable. It is replaced with a
  new support.set_match_tests() function, so match_test() doesn't
  have to check each time if patterns were modified.
* Rewrite match_test(): use different code paths depending on the
  kind of patterns for best performances.

Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 803ddd8ce22f0de3ab42fb98a225a704c000ef06)

* bpo-31324: Fix test.support.set_match_tests(None) (#4505)

(cherry picked from commit bb11c3c967afaf263e00844d4ab461b7fafd6d36)
(cherry picked from commit 70b2f8797146a56a6880743424f0bedf4fc30c62)

7 years agotest_builtin: TestExecFile removes created file (#4525)
Victor Stinner [Thu, 23 Nov 2017 17:23:37 +0000 (18:23 +0100)]
test_builtin: TestExecFile removes created file (#4525)

Fix the following warning:

Warning -- files was modified by test_builtin
  Before: []
  After:  ['@test_19422_tmp']
1 test altered the execution environment:
    test_builtin

7 years agobpo-29512: Fix Lib/test/bisect.py shebang (#4522)
Victor Stinner [Thu, 23 Nov 2017 16:04:34 +0000 (17:04 +0100)]
bpo-29512: Fix Lib/test/bisect.py shebang (#4522)

Replace python3 with python2.

7 years agobpo-32050: Fix -x option documentation (#4423)
Victor Stinner [Mon, 20 Nov 2017 15:08:44 +0000 (07:08 -0800)]
bpo-32050: Fix -x option documentation (#4423)

The line number in correct when using the -x option: Py_Main() uses
ungetc() to not skip the first newline character.

7 years agoDocument parameters of BaseServer.finish_request() (GH-4445)
Masayuki Yamamoto [Sun, 19 Nov 2017 12:20:09 +0000 (21:20 +0900)]
Document parameters of BaseServer.finish_request() (GH-4445)

(cherry picked from commit 7750bded92d908cbc422c57b97214f8eec615b0d)

7 years agoFix typo in atexit documentation. (GH-4419) (GH-4442)
Erik Bray [Fri, 17 Nov 2017 13:57:54 +0000 (14:57 +0100)]
Fix typo in atexit documentation. (GH-4419) (GH-4442)

`kargs` -> `kwargs`

7 years agobpo-31691: Specify how to build installer in Windows (#4430)
native-api [Fri, 17 Nov 2017 00:28:42 +0000 (03:28 +0300)]
bpo-31691: Specify how to build installer in Windows (#4430)

7 years agobpo-15606: Improve the re.VERBOSE documentation. (GH-4366) (#4395)
Miss Islington (bot) [Tue, 14 Nov 2017 15:39:04 +0000 (07:39 -0800)]
bpo-15606: Improve the re.VERBOSE documentation. (GH-4366) (#4395)

(cherry picked from commit b0b44b4b3337297007f5ef87220a75df204399f8)

7 years ago[2.7] bpo-21149: Workaround a GC finalization bug in logging. (#4368)
Gregory P. Smith [Sat, 11 Nov 2017 22:48:49 +0000 (14:48 -0800)]
[2.7] bpo-21149: Workaround a GC finalization bug in logging. (#4368)

* Work around a GC process finalization bug.

The logging RLock instances may exist but the threading.RLock class
itself has already been emptied causing a
Exception TypeError: "'NoneType' object is not callable" in <function _removeHandlerRef ..."
to be printed to stderr on process termination.

This catches that exception and ignores it because there is absolutely
nothing we can or should do about it from the context of a weakref
handler called from the gc context.

7 years ago[2.7] bpo-31530: Stop crashes when iterating over a file on multiple threads. (#3672)
Serhiy Storchaka [Fri, 10 Nov 2017 10:58:55 +0000 (12:58 +0200)]
[2.7] bpo-31530: Stop crashes when iterating over a file on multiple threads. (#3672)

7 years ago[2.7] bpo-31927: Fix reading arbitrary data when parse a AF_BLUETOOTH address (GH...
Serhiy Storchaka [Thu, 9 Nov 2017 21:05:59 +0000 (23:05 +0200)]
[2.7] bpo-31927: Fix reading arbitrary data when parse a AF_BLUETOOTH address (GH-4235) (GH-4352) (#4355)

on NetBSD and DragonFly BSD.
(cherry picked from commit d3187158c09cf899e9849f335bdff10594209167).
(cherry picked from commit 596286f8f3c8e53ef010d6298464775dc900a515)

7 years agoFix a test for select.kevent. (#4349)
Serhiy Storchaka [Thu, 9 Nov 2017 17:04:47 +0000 (19:04 +0200)]
Fix a test for select.kevent. (#4349)

select.kevent objects are now comparable with other objects in Python 2.

7 years agoFix DeprecationWarning in tests (#4345)
Victor Stinner [Wed, 8 Nov 2017 22:45:55 +0000 (14:45 -0800)]
Fix DeprecationWarning in tests (#4345)

Define __hash__() in test_functools and test_itertools to fix the
following warning:

DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x

7 years ago[2.7] bpo-31934: Abort when building out of a not clean source tree (GH-4255). (...
xdegaye [Wed, 8 Nov 2017 16:10:16 +0000 (17:10 +0100)]
[2.7] bpo-31934: Abort when building out of a not clean source tree (GH-4255). (#4342)

(cherry picked from commit 0de92859caf25e65fc968d4bb68626e9ba21b851)

7 years agobpo-31955: Fix distutils CCompiler.set_executable() for Unicode (GH-4316)
Mazay0 [Wed, 8 Nov 2017 15:48:48 +0000 (22:48 +0700)]
bpo-31955: Fix distutils CCompiler.set_executable() for Unicode (GH-4316)

Fix CCompiler.set_executable() of distutils to handle properly Unicode strings.

7 years agobpo-31764: Prevent a crash in sqlite3.Cursor.close() in case the Cursor object is...
Oren Milman [Wed, 8 Nov 2017 09:57:02 +0000 (11:57 +0200)]
bpo-31764: Prevent a crash in sqlite3.Cursor.close() in case the Cursor object is uninitialized (GH-4333)

7 years agobpo-31793: Doc: Specialize smart-quotes for Japanese (GH-4006)
Miss Islington (bot) [Tue, 7 Nov 2017 16:53:24 +0000 (08:53 -0800)]
bpo-31793: Doc: Specialize smart-quotes for Japanese (GH-4006)

(cherry picked from commit 5a66c8a64d180b5f3c80307924adaec53cc8faa3)

7 years agoFix a memory leak in _msi.c (GH-4127) (#4308)
Miss Islington (bot) [Tue, 7 Nov 2017 10:33:41 +0000 (02:33 -0800)]
Fix a memory leak in _msi.c (GH-4127) (#4308)

(cherry picked from commit cb04f7518292108d68e5ba4c685ca2bf2da18eab)

7 years agoFix bpo-27666 backporting error in _cursesmodule.c (#4305)
Serhiy Storchaka [Tue, 7 Nov 2017 07:55:33 +0000 (09:55 +0200)]
Fix bpo-27666 backporting error in _cursesmodule.c (#4305)

7 years agobpo-31770: Prevent a crash and refleaks when calling sqlite3.Cursor.__init__() more...
Miss Islington (bot) [Tue, 7 Nov 2017 00:44:19 +0000 (16:44 -0800)]
bpo-31770: Prevent a crash and refleaks when calling sqlite3.Cursor.__init__() more than once (GH-3968) (#4302)

(cherry picked from commit e56ab746a965277ffcc4396d8a0902b6e072d049)

7 years ago[2.7] bpo-31271: Fix an assertion failure in io.TextIOWrapper.write. (GH-3201) (...
Oren Milman [Tue, 7 Nov 2017 00:17:54 +0000 (02:17 +0200)]
[2.7] bpo-31271: Fix an assertion failure in io.TextIOWrapper.write. (GH-3201) (#3951)

7 years agobpo-31923: Fix spelling in sqlite3 docs (GH-4227)
Miss Islington (bot) [Sat, 4 Nov 2017 23:11:25 +0000 (16:11 -0700)]
bpo-31923: Fix spelling in sqlite3 docs (GH-4227)

(cherry picked from commit aafece7a9e010075fff4420cfbb16f1ec0342698)

7 years ago[2.7] bpo-18699: Corrected documentation for window.chgat in curses module (GH-1430...
Serhiy Storchaka [Sat, 4 Nov 2017 08:42:56 +0000 (10:42 +0200)]
[2.7] bpo-18699: Corrected documentation for window.chgat in curses module (GH-1430). (#4272)

(cherry picked from commit b838cc3ff4e039af949c6a19bd896e98e944dcbe)

7 years ago[2.7] bpo-9678: Fix determining the MAC address in the uuid module. (GH-4264) (#4270)
Serhiy Storchaka [Sat, 4 Nov 2017 08:23:09 +0000 (10:23 +0200)]
[2.7] bpo-9678: Fix determining the MAC address in the uuid module. (GH-4264) (#4270)

* Using ifconfig on NetBSD and OpenBSD.
* Using arp on Linux, FreeBSD, NetBSD and OpenBSD.

Based on patch by Takayuki Shimizukawa..
(cherry picked from commit ee1a9a2b78d5b6bb1a8148fc5fcf365e6d4e9e67)

7 years agobpo-31924: Fix test_curses on NetBSD 8. (GH-4228) (#4260)
Miss Islington (bot) [Fri, 3 Nov 2017 20:11:12 +0000 (13:11 -0700)]
bpo-31924: Fix test_curses on NetBSD 8. (GH-4228) (#4260)

(cherry picked from commit a7723d8b09f516a2b75837a3527b8cc7bee89fad)

7 years ago[2.7] bpo-30057: Fix potential missed signal in signal.signal(). (GH-4258) (#4263)
Antoine Pitrou [Fri, 3 Nov 2017 19:36:39 +0000 (20:36 +0100)]
[2.7] bpo-30057: Fix potential missed signal in signal.signal(). (GH-4258) (#4263)

Bug report and patch by Jeroen Demeyer..
(cherry picked from commit f6f90ff079a22b79a58d47b6117cc8a8c7d366f3)

7 years agobpo-27666: Fixed stack corruption in curses.box() and curses.ungetmouse(). (GH-4220...
Miss Islington (bot) [Wed, 1 Nov 2017 19:24:00 +0000 (12:24 -0700)]
bpo-27666: Fixed stack corruption in curses.box() and curses.ungetmouse(). (GH-4220) (#4222)

(cherry picked from commit 4f469c096628af730b17798d0ebfd8925bfde836)

7 years agobpo-31893: Fix a backporting error in 8cbf4e10646c3f5b8f0d274c2d7dea5bb6305f57. ...
Serhiy Storchaka [Wed, 1 Nov 2017 15:43:07 +0000 (17:43 +0200)]
bpo-31893: Fix a backporting error in 8cbf4e10646c3f5b8f0d274c2d7dea5bb6305f57. (#4219)