Commit Graph

80589 Commits

Author SHA1 Message Date
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
Miss Islington (bot) fc73c54dae 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 219c2de5ad)
2017-11-29 02:15:43 +02:00
Victor Stinner 180372c08a
pythoninfo: add Py_DEBUG (#4198) (#4581)
(cherry picked from commit afd055a59f)
2017-11-27 10:44:50 +01:00
Zachary Ware be1faabeef
bpo-30855: Bump Tcl/Tk to 8.5.19 on Windows (GH-4550) 2017-11-26 11:55:46 -06:00
Miss Islington (bot) d6c6e586b4 Improve Scheduler Objects documentation. (GH-4556) (GH-4558)
Mention that the lower the priority number, the higher priority it represents.
(cherry picked from commit 9d5ec808de)
2017-11-24 21:49:10 -08:00
Miss Islington (bot) c02037d622 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 610e5afdcb)
2017-11-24 21:01:39 -08:00
Miss Islington (bot) 465f3d0820 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 78a5722ae9)
2017-11-24 09:35:53 -08:00
Miss Islington (bot) 66cdc84e40 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 cdfe910e74)
2017-11-24 00:55:33 -08:00
Victor Stinner ed4743a2f2
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.
2017-11-24 02:13:26 +01:00
Victor Stinner 35d99830f1
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 803ddd8ce2)

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

(cherry picked from commit bb11c3c967)
(cherry picked from commit 70b2f87971)
2017-11-23 18:34:59 +01:00
Victor Stinner 2d5890eda6
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
2017-11-23 18:23:37 +01:00
Victor Stinner 448c673987
bpo-29512: Fix Lib/test/bisect.py shebang (#4522)
Replace python3 with python2.
2017-11-23 17:04:34 +01:00
Victor Stinner 733b5f3f2f
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.
2017-11-20 07:08:44 -08:00
Masayuki Yamamoto aa9100567f Document parameters of BaseServer.finish_request() (GH-4445)
(cherry picked from commit 7750bded92)
2017-11-19 15:20:09 +03:00
Erik Bray 3393c8067d Fix typo in atexit documentation. (GH-4419) (GH-4442)
`kargs` -> `kwargs`
2017-11-17 05:57:54 -08:00
native-api c02307e963 bpo-31691: Specify how to build installer in Windows (#4430) 2017-11-16 16:28:42 -08:00
Miss Islington (bot) a2f1be0b5b bpo-15606: Improve the re.VERBOSE documentation. (GH-4366) (#4395)
(cherry picked from commit b0b44b4b33)
2017-11-14 17:39:04 +02:00
Gregory P. Smith e84f6d3817
[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.
2017-11-11 14:48:49 -08:00
Serhiy Storchaka 6401e56717
[2.7] bpo-31530: Stop crashes when iterating over a file on multiple threads. (#3672) 2017-11-10 12:58:55 +02:00
Serhiy Storchaka 1bce4efdb4
[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 d3187158c0).
(cherry picked from commit 596286f8f3)
2017-11-09 23:05:59 +02:00
Serhiy Storchaka 15e14538f9
Fix a test for select.kevent. (#4349)
select.kevent objects are now comparable with other objects in Python 2.
2017-11-09 19:04:47 +02:00
Victor Stinner 2ce1ef54d3
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
2017-11-08 14:45:55 -08:00
xdegaye fbdd3eeba3
[2.7] bpo-31934: Abort when building out of a not clean source tree (GH-4255). (#4342)
(cherry picked from commit 0de92859ca)
2017-11-08 17:10:16 +01:00
Mazay0 849482955f bpo-31955: Fix distutils CCompiler.set_executable() for Unicode (GH-4316)
Fix CCompiler.set_executable() of distutils to handle properly Unicode strings.
2017-11-08 07:48:48 -08:00
Oren Milman cd66d6d632 bpo-31764: Prevent a crash in sqlite3.Cursor.close() in case the Cursor object is uninitialized (GH-4333) 2017-11-08 01:57:02 -08:00
Miss Islington (bot) 47eaaa5524 bpo-31793: Doc: Specialize smart-quotes for Japanese (GH-4006)
(cherry picked from commit 5a66c8a64d)
2017-11-08 01:53:24 +09:00
Miss Islington (bot) b74c3d410d Fix a memory leak in _msi.c (GH-4127) (#4308)
(cherry picked from commit cb04f75182)
2017-11-07 02:33:41 -08:00
Serhiy Storchaka 69ea4b4deb
Fix bpo-27666 backporting error in _cursesmodule.c (#4305) 2017-11-07 09:55:33 +02:00
Miss Islington (bot) 4b544aadd5 bpo-31770: Prevent a crash and refleaks when calling sqlite3.Cursor.__init__() more than once (GH-3968) (#4302)
(cherry picked from commit e56ab746a9)
2017-11-06 16:44:19 -08:00
Oren Milman 30537698b6 [2.7] bpo-31271: Fix an assertion failure in io.TextIOWrapper.write. (GH-3201) (#3951) 2017-11-06 16:17:54 -08:00
Miss Islington (bot) 4376a22759 bpo-31923: Fix spelling in sqlite3 docs (GH-4227)
(cherry picked from commit aafece7a9e)
2017-11-05 02:11:25 +03:00
Serhiy Storchaka fd38819497
[2.7] bpo-18699: Corrected documentation for window.chgat in curses module (GH-1430). (#4272)
(cherry picked from commit b838cc3ff4)
2017-11-04 10:42:56 +02:00
Serhiy Storchaka f72ad2d363
[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 ee1a9a2b78)
2017-11-04 10:23:09 +02:00