Commit Graph

104861 Commits

Author SHA1 Message Date
Serhiy Storchaka ed146b52a3
[3.8] bpo-37830: Fix compilation of break and continue in finally. (GH-15320) (GH-15456)
Fix compilation of "break" and "continue" in the
"finally" block when the corresponding "try" block
contains "return" with a non-constant value.
(cherry picked from commit ef61c524dd)
2019-08-24 13:41:53 +03:00
Miss Islington (bot) 920ec4b776
bpo-28269: Replace strcasecmp with system function _stricmp. (GH-13095)
(cherry picked from commit 05f2d84cae)

Co-authored-by: Minmin Gong <gongminmin@msn.com>
2019-08-24 03:22:14 -07:00
Miss Islington (bot) 076d0b9f5d
bpo-29535: Remove promize about hash randomization of datetime objects. (GH-15269)
(cherry picked from commit e9c90aa431)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-08-24 03:19:51 -07:00
Miss Islington (bot) ef3ccd7370 bpo-19119: Remove invalid test and rename a misnamed test (GH-15442) (GH-15447)
(cherry picked from commit 4101181fd8)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-23 22:54:07 -07:00
Miss Islington (bot) 7784d4bb15
Fix funny typo in Doc/bugs. (GH-15412)
Fix typo in description of link to mozilla bug report writing guidelines.

Though the URL is misleading, we're indeed trying to write bug _reports_, not to add bugs.

Automerge-Triggered-By: @ned-deily
(cherry picked from commit e17f201cd9)

Co-authored-by: Antoine <43954001+awecx@users.noreply.github.com>
2019-08-23 21:16:28 -07:00
Miss Islington (bot) 5779c53632 bpo-37798: Add C fastpath for statistics.NormalDist.inv_cdf() (GH-15266) (GH-15441)
(cherry picked from commit 0a18ee4be7)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
2019-08-23 15:39:27 -07:00
Victor Stinner af84a88ef8
bpo-36763: PyConfig_Read() handles PySys_AddXOption() (GH-15431) (GH-15435)
PyConfig_Read() is now responsible to handle early calls to
PySys_AddXOption() and PySys_AddWarnOption().

Options added by PySys_AddXOption() are now handled the same way than
PyConfig.xoptions and command line -X options.

For example, PySys_AddXOption(L"faulthandler") enables faulthandler
as expected.

(cherry picked from commit 120b707a6d)
2019-08-23 21:16:51 +02:00
Miss Islington (bot) 3921d12174
bpo-37549: os.dup() fails for standard streams on Windows 7 (GH-15389)
(cherry picked from commit 5be666010e)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-08-23 12:04:27 -07:00
Miss Islington (bot) 761e5a7c7f bpo-26589: Add http status code 451 (GH-15413) (GH-15436)
(cherry picked from commit 8f080b0995)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-23 10:56:44 -07:00
Miss Islington (bot) 9cbdce3917
bpo-36763, doc: Add links in the new C API init doc (GH-15433)
(cherry picked from commit 1beb7c3de9)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-08-23 10:05:59 -07:00
Miss Islington (bot) a6427cb2a2
bpo-36763: Implement PyWideStringList_Insert() of PEP 587 (GH-15423)
(cherry picked from commit 3842f2997f)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-08-23 09:24:42 -07:00
GeeTransit fe64ba611b [3.8] Fix typo (inifite -> infinite) (GH-15429)
The same typo exists in the changelogs of 3.6 and 3.7.

Automerge-Triggered-By: @Mariatta
2019-08-23 09:23:43 -07:00
Victor Stinner 944aa01a81
Fix _PyTime_MIN/MAX values (GH-15384) (GH-15426)
_PyTime_t type is defined as int64_t, and so min/max are INT64_MIN/INT64_MAX,
not PY_LLONG_MIN/PY_LLONG_MAX.

(cherry picked from commit 8e76c45622)
2019-08-23 17:17:52 +01:00
Victor Stinner ca9ae94a2a
bpo-37926: Fix PySys_SetArgvEx(0, NULL, 0) crash (GH-15415) (GH-15420)
empty_argv is no longer static in Python 3.8, but it is declared in
a temporary scope, whereas argv keeps a reference to it.
empty_argv memory (allocated on the stack) is reused by
make_sys_argv() code which is inlined when using gcc -O3.

Define empty_argv in PySys_SetArgvEx() body, to ensure
that it remains valid for the whole lifetime of
the PySys_SetArgvEx() call.

(cherry picked from commit c48682509d)
2019-08-23 12:22:14 +01:00
Miss Islington (bot) 994925b2cb
Correct minor grammar mistake (GH-15404)
(cherry picked from commit d288b29fc6)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2019-08-23 03:06:27 -07:00
Miss Islington (bot) 5c77730300
bpo-37915: Fix comparison between tzinfo objects and timezone objects (GH-15390)
https://bugs.python.org/issue37915

Automerge-Triggered-By: @pablogsal
(cherry picked from commit 4be11c009a)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2019-08-23 01:48:40 -07:00
Miss Islington (bot) b6341e676a bpo-30826: Improve control flow examples (GH-15407) (GH-15410)
(cherry picked from commit 6fcb6cfb13)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-22 23:52:12 -07:00
Miss Islington (bot) f6a7f5bc50 bpo-12634: Clarify an awkward section of the tutorial (GH-15406) (GH-15409)
(cherry picked from commit 483ae0cf1d)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-22 23:45:57 -07:00
Miss Islington (bot) 4a40498ea9 bpo-30550: Clarify JSON ordering guarantees (GH-15397) (GH-15403)
(cherry picked from commit 657008ea03)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-22 15:50:32 -07:00
Miss Islington (bot) 5fda09cc1e
bpo-28556: Add a regression test to typing (GH-15396)
This adds a regression test for the issue found in the Python 2 backport, see https://github.com/python/typing/issues/656

https://bugs.python.org/issue28556
(cherry picked from commit 8889627b53)

Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
2019-08-22 11:11:27 -07:00
Miss Islington (bot) cb8de91dad bpo-14050: Note that not all data can be sorted (GH-15381) (GH-15395)
(cherry picked from commit 4109263a7e)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-08-22 09:39:52 -07:00
Miss Islington (bot) 2878f378e0
bpo-27961: Remove leftovers from the times when long long wasn't required (GH-15388)
(cherry picked from commit a38e9d1399)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
2019-08-22 08:59:18 -07:00
Miss Islington (bot) 8ede9676bb Add missing space to warning message (GH-14915) (GH-15379)
This typo was introduced in GH-13409 when changing the message text.
(cherry picked from commit c4106af38b)

Co-authored-by: Florian Bruhin <me@the-compiler.org>
2019-08-21 23:30:26 -07:00
Miss Islington (bot) 967d625a6d
bpo-37834: Fix test on Windows 7 (GH-15377)
(cherry picked from commit 374be59b8e)

Co-authored-by: Steve Dower <steve.dower@python.org>
2019-08-21 18:01:22 -07:00
Steve Dower a50d2f7e19
bpo-9949: Call normpath() in realpath() and avoid unnecessary prefixes (GH-15376) 2019-08-21 17:23:38 -07:00
Miss Islington (bot) f93c15aedc
bpo-36311: Fixes decoding multibyte characters around chunk boundaries and improves decoding performance (GH-15083)
(cherry picked from commit 7ebdda0dbe)

Co-authored-by: Steve Dower <steve.dower@python.org>
2019-08-21 16:53:56 -07:00
Steve Dower 9eb3d54639
bpo-37834: Normalise handling of reparse points on Windows (GH-15370)
bpo-37834: Normalise handling of reparse points on Windows
* ntpath.realpath() and nt.stat() will traverse all supported reparse points (previously was mixed)
* nt.lstat() will let the OS traverse reparse points that are not name surrogates (previously would not traverse any reparse point)
* nt.[l]stat() will only set S_IFLNK for symlinks (previous behaviour)
* nt.readlink() will read destinations for symlinks and junction points only

bpo-1311: os.path.exists('nul') now returns True on Windows
* nt.stat('nul').st_mode is now S_IFCHR (previously was an error)
2019-08-21 15:52:42 -07:00
Miss Islington (bot) c30c869e8d
bpo-9949: Enable symlink traversal for ntpath.realpath (GH-15287)
(cherry picked from commit 75e064962e)

Co-authored-by: Steve Dower <steve.dower@python.org>
2019-08-21 14:09:33 -07:00
Miss Islington (bot) 7e293f5e4c
Fix difflib `?` hint in diff output when dealing with tabs (GH-15201)
(cherry picked from commit e1c638da6a)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
2019-08-21 12:18:26 -07:00
Miss Islington (bot) 349d897e0f Update asyncio.ensure_future() documentation (GH-15347) (GH-15364)
Added back mention that ensure_future actually scheduled obj. This documentation just mentions what ensure_future returns, so I did not realize that ensure_future also schedules obj.
(cherry picked from commit 092911d5c0)

Co-authored-by: Roger Iyengar <ri@rogeriyengar.com>
2019-08-21 13:20:49 -04:00
Miss Islington (bot) c777dec6f4
bpo-37823: Fix open() link in telnetlib doc (GH-15281)
Fixed wrong link to Telnet.open() method in telnetlib documentation.
(cherry picked from commit e0b6117e27)

Co-authored-by: Michael Anckaert <michael.anckaert@sinax.be>
2019-08-21 04:38:04 -07:00
Miss Islington (bot) 44f2c09680
bpo-35518: Skip test that relies on a deceased network service. (GH-15349)
If this service had thoroughly vanished, we could just ignore the
test until someone gets around to either recreating such a service
or redesigning the test to somehow work locally.  The
`support.transient_internet` mechanism catches the failure to
resolve the domain name, and skips the test.

But in fact the domain snakebite.net does still exist, as do its
nameservers -- and they can be quite slow to reply.  As a result
this test can easily take 20-30s before it gets auto-skipped.

So, skip the test explicitly up front.
(cherry picked from commit 5b95a1507e)

Co-authored-by: Greg Price <gnprice@gmail.com>
2019-08-20 21:08:57 -07:00
Victor Stinner 30e5aff5fb
bpo-37732: Fix GCC warning in _PyObject_Malloc() (GH-15333) (GH-15342)
pymalloc_alloc() now returns directly the pointer, return NULL on
memory allocation error.

allocate_from_new_pool() already uses NULL as marker for "allocation
failed".

(cherry picked from commit 18f8dcfa10)
2019-08-20 13:44:32 +01:00
Miss Islington (bot) 1271ee8187
bpo-37868: Improve is_dataclass for instances. (GH-15325)
(cherry picked from commit b0f4dab873)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2019-08-19 22:59:21 -07:00
Miss Islington (bot) 9aa0ab1a97
Remove 'unstable' warning for Windows Store package in docs (GH-15334)
(cherry picked from commit cf9360e524)

Co-authored-by: Steve Dower <steve.dower@python.org>
2019-08-19 10:14:31 -07:00
Greg Price 8c1c426a63 bpo-36502: Correct documentation of str.isspace() (GH-15019) (GH-15296)
The documented definition was much broader than the real one:
there are tons of characters with general category "Other",
and we don't (and shouldn't) treat most of them as whitespace.

Rewrite the definition to agree with the comment on
_PyUnicode_IsWhitespace, and with the logic in makeunicodedata.py,
which is what generates that function and so ultimately governs.

Add suitable breadcrumbs so that a reader who wants to pin down
exactly what this definition means (what's a "bidirectional class"
of "B"?) can do so.  The `unicodedata` module documentation is an
appropriate central place for our references to Unicode's own copious
documentation, so point there.

Also add to the isspace() test a thorough check that the
implementation agrees with the intended definition.
2019-08-19 10:53:22 +01:00
Miss Islington (bot) 786a4e1cef
bpo-36266: Add module name in ImportError when DLL not found on Windows (GH-15180)
(cherry picked from commit 24fe46081b)

Co-authored-by: shireenrao <shireenrao@gmail.com>
2019-08-17 14:11:28 -07:00
Miss Islington (bot) 7309cca147
[3.8] fix link to time function from time_ns doc (GH-15285) (GH-15321)
Because mod, func, class, etc all share one namespace, :func:time creates a link to the time module doc page rather than the time.time function.
(cherry picked from commit 1b1d0514ad)


Co-authored-by: Éric Araujo <merwok@netwok.org>

Automerge-Triggered-By: @merwok
2019-08-17 13:51:57 -07:00
Miss Islington (bot) f991912146
bpo-37256: Wording in Request class docs (GH-14792)
* bpo-37256: Wording in Request class docs

* 📜🤖 Added by blurb_it.

* Update Misc/NEWS.d/next/Documentation/2019-07-16-14-48-12.bpo-37256.qJTrBb.rst

Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
(cherry picked from commit 38c7199beb)

Co-authored-by: Ngalim Siregar <ngalim.siregar@gmail.com>
2019-08-16 01:27:35 -07:00
Paul Ganssle 27b38b99b3
bpo-37642: Update acceptable offsets in timezone (GH-14878) (#15227)
This fixes an inconsistency between the Python and C implementations of
the datetime module. The pure python version of the code was not
accepting offsets greater than 23:59 but less than 24:00. This is an
accidental legacy of the original implementation, which was put in place
before tzinfo allowed sub-minute time zone offsets.

GH-14878

(cherry picked from commit 92c7e30adf)
2019-08-15 15:08:57 -04:00
Miss Islington (bot) 64db5aac6b
Indent code inside if block. (GH-15284)
Without indendation, seems like strcpy line is parallel to `if` condition.
(cherry picked from commit 69f37bcb28)

Co-authored-by: Hansraj Das <raj.das.136@gmail.com>
2019-08-15 09:38:22 -07:00
Miss Islington (bot) f781283ff6
[3.8] Replace usage of the obscure PEM_read_bio_X509_AUX with the more standard PEM_read_bio_X509 (GH-15303) (GH-15304)
X509_AUX is an odd, note widely used, OpenSSL extension to the X509 file format. This function doesn't actually use any of the extra metadata that it parses, so just use the standard API.

Automerge-Triggered-By: @tiran
(cherry picked from commit 40dad9545a)


Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>

Automerge-Triggered-By: @tiran
2019-08-15 05:52:51 -07:00
Miss Islington (bot) dbe4c286ce
bpo-37775: Update compileall doc for invalidation_mode parameter (GH-15148)
(cherry picked from commit 68e495df90)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2019-08-14 15:22:02 -07:00
Miss Islington (bot) b8e682427a
bpo-21131: Fix faulthandler.register(chain=True) stack (GH-15276)
faulthandler now allocates a dedicated stack of SIGSTKSZ*2 bytes,
instead of just SIGSTKSZ bytes. Calling the previous signal handler
in faulthandler signal handler uses more than SIGSTKSZ bytes of stack
memory on some platforms.
(cherry picked from commit ac827edc49)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-08-14 15:02:12 -07:00
Miss Islington (bot) 123f6c4914
bpo-37811: FreeBSD, OSX: fix poll(2) usage in sockets module (GH-15202)
FreeBSD implementation of poll(2) restricts the timeout argument to be
either zero, or positive, or equal to INFTIM (-1).

Unless otherwise overridden, socket timeout defaults to -1. This value
is then converted to milliseconds (-1000) and used as argument to the
poll syscall. poll returns EINVAL (22), and the connection fails.

This bug was discovered during the EINTR handling testing, and the
reproduction code can be found in
https://bugs.python.org/issue23618 (see connect_eintr.py,
attached). On GNU/Linux, the example runs as expected.

This change is trivial:
If the supplied timeout value is negative, truncate it to -1.
(cherry picked from commit 2814620657)

Co-authored-by: Artem Khramov <akhramov@pm.me>
2019-08-14 14:47:43 -07:00
Miss Islington (bot) 557802dc17
bpo-37849: IDLE: fix completion window positioning above line (GH-15267)
(cherry picked from commit 71662dc2f1)

Co-authored-by: Tal Einat <taleinat+github@gmail.com>
2019-08-14 10:24:04 -07:00
Victor Stinner d85c5670ff
[3.8] bpo-37531: Fix regrtest timeout for subprocesses (GH-15072) (GH-15279)
* bpo-37531: Fix regrtest timeout for subprocesses (GH-15072)

Co-Authored-By: Joannah Nanjekye <joannah.nanjekye@ibm.com>
(cherry picked from commit b0c8369c60)

* bpo-36511: Fix failures in Windows ARM32 buildbot (GH-15181)

(cherry picked from commit ed70a344b5)

Backport also minor fixes from master (fix typo, remove importlib import).
2019-08-14 16:31:32 +02:00
Miss Islington (bot) 984226962b
bpo-37738: Fix curses addch(str, color_pair) (GH-15071)
Fix the implementation of curses addch(str, color_pair): pass the
color pair to setcchar(), instead of always passing 0 as the color
pair.
(cherry picked from commit 077af8c2c9)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-08-14 03:49:13 -07:00
Miss Islington (bot) 364a1d3125
bpo-37681: no_sanitize_thread support from GCC 5.1 (GH-15096)
Fix the following warning with GCC 4.8.5:
Objects/obmalloc.c: warning: ‘no_sanitize_thread’ attribute directive ignored
(cherry picked from commit 7e479c8221)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
2019-08-14 03:08:46 -07:00
Miss Islington (bot) e7ec9e04c8
bpo-25172: Add test for crypt ImportError on Windows (GH-15252)
(cherry picked from commit 243a73deee)

Co-authored-by: shireenrao <shireenrao@gmail.com>
2019-08-13 14:52:20 -07:00