Commit Graph

1804 Commits

Author SHA1 Message Date
Anselm Kruis 9c819a6a7d [3.6] bpo-30028: make test.support.temp_cwd() fork-safe (GH-1066) (GH-5826)
Make test.support.temp_cwd() fork-safe. The context manager test.support.temp_cwd() no longer removes the temporary directory when executing in a process other than the parent it entered from.
If a forked child exits the context manager it won't do the cleanup..
(cherry picked from commit 33dddac00b)

Co-authored-by: Anselm Kruis <a.kruis@science-computing.de>
2018-02-23 08:27:54 -08:00
Miss Islington (bot) 2b9726eb64
bpo-31848: Fix broken error handling in Aifc_read.initfp() when the SSND chunk is not found (GH-5240)
Initialize self._ssnd_chunk so that aifc.Error is raised as intended,
not AttributeError.
(cherry picked from commit 80d20b918b)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-02-20 14:17:30 -08:00
Serhiy Storchaka 504f19145c
[3.6] bpo-30157: Fix csv.Sniffer.sniff() regex pattern. (GH-5601) (GH-5603)
Co-authored-by: Jake Davis <jcdavis@awedge.net>.
(cherry picked from commit 2411292ba8)
2018-02-10 00:01:40 +02:00
Bar Harel 7e4cf8e95d [3.6] bpo-32734: Fix asyncio.Lock multiple acquire safety issue (GH-5466) (#5502)
(cherry picked from commit d41e9e0952)
2018-02-02 18:15:31 -05:00
Miss Islington (bot) ce5a3cd9b1 bpo-32255: Always quote a single empty field when write into a CSV file. (GH-4769) (#4810)
This allows to distinguish an empty row from a row consisting of a single empty field.
(cherry picked from commit 2001900b0c)
2017-12-12 12:56:40 +02:00
Miss Islington (bot) ea80ae04e2 bpo-30057: Fix potential missed signal in signal.signal(). (GH-4258) (#4261)
Bug report and patch by Jeroen Demeyer.
(cherry picked from commit f6f90ff079)
2017-11-03 20:23:12 +01:00
Miss Islington (bot) 9c23b173b8 bpo-31632: fix set_protocol() in _SSLProtocolTransport (GH-3817) (GH-3817) (#4052)
(cherry picked from commit ea2ef5d0ca)
2017-10-19 14:12:44 -04:00
Miss Islington (bot) 97abcabc19 [3.6] bpo-31334: Fix timeout in select.poll.poll() (GH-3277) (#4033)
Always pass -1, or INFTIM where defined, to the poll() system call when
a negative timeout is passed to the poll.poll([timeout]) method in the
select module. Various OSes throw an error with arbitrary negative
values.
(cherry picked from commit 6cfa927ceb)
2017-10-18 15:05:16 +03:00
Miss Islington (bot) 2712247ec9 [3.6] bpo-28603: Fix formatting tracebacks for unhashable exceptions (GH-4014) (#4024)
(cherry picked from commit de86073a76)
2017-10-18 01:14:19 +03:00
Miss Islington (bot) 27ce5a1b19 [3.6] bpo-31294: Fix ZeroMQSocketListener and ZeroMQSocketHandler examples (GH-3229) (#3430)
* Fix ZeroMQSocketListener and ZeroMQSocketHandler examples

* Use send_json and recv_json to simplify pyzmq interfacing

* Add News entry
(cherry picked from commit 586c0502b5)
2017-09-07 14:27:44 -07:00
Miss Islington (bot) 98ceece8f4 [3.6] bpo-30737: Update DevGuide links to new URL (GH-3228) (GH-3390)
Update old devguide links from https://docs.python.org/devguide to https://devguide.python.org
(cherry picked from commit 384899dfae)
2017-09-06 14:29:04 -07:00
Łukasz Langa 8e572491b5 [3.6] bpo-30983: [gdb] Fix py-bt, etc. for non-debug shared builds (GH-3153) (#3192)
PEP 523 introduced _PyEval_EvalFrameDefault which inlines PyEval_EvalFrameEx on
non-debug shared builds.  This breaks the ability to use py-bt, py-up, and
a few other Python-specific gdb integrations.

This patch fixes the problem by only looking for _PyEval_EvalFrameDefault
frames.

test_gdb passes on both a debug and a non-debug build.

Original patch by Bruno "Polaco" Penteado.
(cherry picked from commit 5fe59f8e3a)
2017-08-22 13:20:40 -07:00
Shane Harvey 4795ba857e [3.6] bpo-31107: Fix copyreg mangled slot names calculation. (GH-2989) (#3003)
(cherry picked from commit c4c9866064)
2017-08-05 18:01:10 +03:00
csabella 2bf1586e60 [3.6] bpo-25684: ttk.OptionMenu radiobuttons weren't unique (GH-2276) (#2959)
between instances of OptionMenu.
(cherry picked from commit a568e52733)

* Update Misc/ACKS
2017-07-31 22:10:13 +03:00
Utkarsh Upadhyay c52cea4954 [3.6] bpo-30822: Fix testing of datetime module. (GH-2530) (GH-2783) (#2816)
* [3.6] bpo-30822: Fix testing of datetime module. (GH-2530) (GH-2783)

Only C implementation was tested.
(cherry picked from commit 287c5594ed)

* [3.6] bpo-30822: Fix testing of datetime module. (GH-2530) (GH-2783)

Only C implementation was tested..
(cherry picked from commit 287c5594ed)
2017-07-26 13:49:16 +02:00
Nicholas df5837b5a9 [3.6] bpo-30964: Mention ensurepip in package installation docs (GH-2797)
Adds a new 'Pip not installed' section that covers
running `ensurepip` manually, and also references
the relevant section of the Python Packaging User
Guide.

(cherry picked from commit b3527bfefd)
2017-07-21 16:44:43 +10:00
Joel Hillacre c60d2f5e86 bpo-30532: Fix whitespace folding in certain cases (#2591)
Leading whitespace was incorrectly dropped during folding of certain lines in the _header_value_parser's folding algorithm.  This makes the whitespace handling code consistent.
2017-07-06 17:28:22 -04:00
Serhiy Storchaka bebd2cfa5f [3.6] bpo-30441: Fix bug when modifying os.environ while iterating over it (GH-2409). (#2556)
(cherry picked from commit 8a8d28501f)
2017-07-04 07:55:32 +03:00
terryjreedy af68382f68 [3.6] bpo-30723: IDLE -- Enhance parenmatch; add style, flash, and help (GH-2306) (#2460)
* Add 'parens' style to highlight both opener and closer.
* Make 'default' style, which is not default, a synonym for 'opener'.
* Make time-delay work the same with all styles.
* Add help for config dialog extensions tab, including parenmatch.
* Add new tests.
Original patch by Charles Wohlganger.
(cherry picked from commit fae2c35)
2017-06-27 23:02:19 -04:00
Emily Morehouse 2d348f7a72 [3.6] bpo-30769: Fix reference leak introduced in 77703942c5 (GH-2416) (#2425)
New error condition paths were introduced, which did not decrement
`key2` and `val2` objects.  Therefore, decrement references before
jumping to the error label.

Signed-off-by: Eric N. Vander Weele <ericvw@gmail.com>
(cherry picked from commit a7874c73c0)
2017-06-27 07:59:25 +03:00
Brett Cannon 9db3ae045d [3.6] bpo-30645: don't append to an inner loop path in imp.load_package() (GH-2268) (#2364)
Bug didn't manifest itself when importing a module with source as .py files are always the first on the search path. The issue only showed up in bytecode-only packages where the calculated file path would be ``__init__.py/__init__.pyc``.

Patch by Alexandru Ardelean.

(cherry picked from commit c38e32a100)
2017-06-23 11:23:36 -07:00
Victor Stinner 536c1f1246 bpo-30500: urllib: Simplify splithost by calling into urlparse. (#1849) (#2289)
The current regex based splitting produces a wrong result. For example::

  http://abc#@def

Web browsers parse that URL as ``http://abc/#@def``, that is, the host
is ``abc``, the path is ``/``, and the fragment is ``#@def``.
(cherry picked from commit 90e01e50ef)
2017-06-20 15:37:24 +02:00
Mariatta e9f4d8db5f [email] bpo-29478: Fix passing max_line_length=None from Compat32 policy (GH-595) (GH-2233)
If max_line_length=None is specified while using the Compat32 policy,
it is no longer ignored..
(cherry picked from commit b459f74826)
2017-06-16 07:18:58 -07:00
Mariatta 292b421d48 bpo-28837: Fix lib2to3 handling of map/zip/filter calls when followed with a 'trailer', e.g. zip()[x] (GH-24) (GH-2235)
(cherry picked from commit 93b4b47e3a)
2017-06-15 19:56:52 -07:00
Serhiy Storchaka 523a243840 [3.6] bpo-30605: Fix compiling binary regexs with BytesWarnings enabled. (GH-2016) (#2214)
Running our unit tests with `-bb` enabled triggered this failure..
(cherry picked from commit 171b9a354e)
2017-06-15 16:55:22 +03:00
Denis Osipov ca1b66fd05 [3.6] bpo-30584: Fix test_os fails on non-English Windows (GH-1980) (#1999)
* Fix bpo-30584

* Adding a comment mentionning the bpo and explaining what is the identifier

* Add Denis Osipov to Misc/ACKS
(cherry picked from commit 897bba7563)
2017-06-08 14:02:05 +02:00
Antoine Pietri ceabf9acf0 bpo-30177: pathlib: include the full path in resolve(strict=False) (#1893) (#1985) 2017-06-07 10:18:56 -07:00
csabella 00b381b9a7 bpo-17188: DOC: Document 'from None' in raise statement (GH-1671) (GH-1867)
Original patch by Dennis Mårtensson.
(cherry picked from commit 763557eac0)
2017-05-30 13:27:39 -07:00
Mariatta 94d8261d1c [3.6] bpo-29960 _random.Random corrupted on exception in setstate(). … (#1287)
(cherry picked from commit 9616a82e78)
2017-05-27 07:20:24 -07:00
Łukasz Langa d29feccec3 [3.6] bpo-30395 _PyGILState_Reinit deadlock fix (GH-1734) (#1740)
head_lock could be held by another thread when fork happened. We should
reset it to avoid deadlock.
(cherry picked from commit f82c951d1c)
2017-05-22 22:23:05 -07:00
Serhiy Storchaka 564398af6c [3.6] bpo-27945: Fixed various segfaults with dict. (GH-1657) (#1677)
Based on patches by Duane Griffin and Tim Mitchell.
(cherry picked from commit 753bca3934)
2017-05-20 13:06:26 +03:00
Victor Stinner 6b5b85aecf bpo-30357: test_thread now uses threading_cleanup() (#1592) (#1622)
test_thread: setUp() now uses support.threading_setup() and
support.threading_cleanup() to wait until threads complete to avoid
random side effects on following tests.

Co-Authored-By:  Grzegorz Grzywacz <grzegorz.grzywacz@nazwa.pl>
(cherry picked from commit 79ef7f8e88)
2017-05-16 17:06:14 -07:00
stratakis a4465a5bd0 [3.6] bpo-28787: Fix out of tree --with-dtrace builds (GH-135) (#1543)
* bpo-28787: Fix out of tree --with-dtrace builds

* Unsilence directory creation

* Add Misc/NEWS and Misc/ACKS entries.
(cherry picked from commit f6eae5bf1c)
2017-05-11 13:13:18 +02:00
torsava 03b8a378df [3.6] bpo-29243: Fix Makefile with respect to --enable-optimizations (GH-1478) (#1518)
* bpo-29243: Fix Makefile with respect to --enable-optimizations (#1478)

* bpo-29243: Fix Makefile with respect to --enable-optimizations

When using the Profile Guided Optimization (./configure --enable-optimizations)
Python is built not only during `make` but rebuilt again during `make test`,
`make install` and others. This patch fixes the issue.

Note that this fix produces no change at all in the Makefile if configure is
run witout --enable-optimizations.

* !squash

(cherry picked from commit a1054c3b00)

* [3.6] bpo-29243: Fix Makefile with respect to --enable-optimizations (GH-1478)

* bpo-29243: Fix Makefile with respect to --enable-optimizations

When using the Profile Guided Optimization (./configure --enable-optimizations)
Python is built not only during `make` but rebuilt again during `make test`,
`make install` and others. This patch fixes the issue.

Note that this fix produces no change at all in the Makefile if configure is
run witout --enable-optimizations.

* !squash.
(cherry picked from commit a1054c3b00)
2017-05-09 16:05:10 +02:00
Dong-hee Na df5df13fdc [3.6] bpo-12414: Update code_sizeof() to take in account co_extra memory. (#1168) (#1198) 2017-04-20 11:26:25 +03:00
Nick Coghlan a524d63072 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.
(cherry picked from commit 19e0494256)
2017-04-09 20:57:04 +10:00
cocoatomo d184c20e35 Keep the c-api exception doc up-to-date (#966)
cherry-pick'ed from ec1f5df..e3d6db3
2017-04-03 19:26:32 +03:00
Christophe Zeitouny 90eafdb154 faulthandler: Restore the old sigaltstack during teardown (GH-777) (GH-797)
(cherry picked from commit 20fbf8accd)
2017-03-24 04:20:40 -07:00
Michael Seifert 53b2667dcf bpo-29800: Fix crashes in partial.__repr__ if the keys of partial.keywords are not strings (#649) (#671) 2017-03-15 09:42:02 +02:00
Berker Peksag 6b81003bdb bpo-28624: Add a test that checks that cwd parameter of Popen() accepts PathLike objects (#157) (#323)
(cherry picked from commit d5c11f7ace)
2017-02-26 20:38:31 +03:00
Mariatta 02e3357e08 bpo-29521 update Misc/ACKS (#110)
(cherry picked from commit 6420088b92)
2017-02-16 00:14:41 +01:00
Nick Coghlan e1857579f8 Merge issue #26355 fix from Python 3.5 2017-02-09 16:08:17 +01:00
Nick Coghlan e66244521c Issue #26355: Specify canonical URLs in docs pages
Add canonical header link on each page to corresponding major
version of the documentation.

Patch by Matthias Bussonnier.
2017-02-09 16:03:59 +01:00
Steve Dower 5f9193a6ed Issue #29326: Ignores blank lines in ._pth files (Patch by Alexey Izbyshev) 2017-02-04 15:19:29 -08:00
Raymond Hettinger 744c720b69 Issue #29119: Merge in ACK from 3.5 branch 2016-12-31 12:08:00 -07:00
Raymond Hettinger b46ea90343 Issue #29119: Fix weakref in OrderedDict.move_to_end(). Work by Andra Bogildea. 2016-12-31 12:01:59 -07:00
Raymond Hettinger e9ee207622 Issue #29061: secrets.randbelow() would hang with a negative input 2016-12-29 22:54:25 -07:00
Victor Stinner 771cf898f4 Merge 3.5 2016-12-30 02:15:29 +01:00
Victor Stinner 440d70301b Issue #29109: Enhance tracemalloc documentation
* Wrong parameter name, 'group_by' instead of 'key_type'
* Don't round up numbers when explaining the examples. If they exactly match
  what can be read in the script output, it is to easier to understand
  (4.8 MiB vs 4855 KiB)
* Fix incorrect method link that was pointing to another module

Patch written by Loic Pefferkorn.
2016-12-30 02:14:59 +01:00
Serhiy Storchaka 6c57708949 Issue #13051: Fixed recursion errors in large or resized curses.textpad.Textbox.
Based on patch by Tycho Andersen.
2016-12-28 10:22:56 +02:00