Commit Graph

102574 Commits

Author SHA1 Message Date
Miss Islington (bot) 2632474957
bpo-36123: Fix test_socket.testWithTimeoutTriggeredSend() race condition (GH-12053)
Use longer timeout for accept() in the server and block on accept in the client.
The client now only sets the timeout once the socket is connected.
(cherry picked from commit 53b9e1a1c1)

Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah@users.noreply.github.com>
2019-02-26 08:48:52 -08:00
Miss Islington (bot) 4e6646fef5
bpo-36106: Resolve sinpi name clash with libm (IEEE-754 violation). (GH-12027)
The standard math library (libm) may follow IEEE-754 recommendation to
include an implementation of sinPi(), i.e. sinPi(x):=sin(pi*x).
And this triggers a name clash, found by FreeBSD developer
Steve Kargl, who worken on putting sinpi into libm used on FreeBSD
(it has to be named "sinpi", not "sinPi", cf. e.g.
https://en.cppreference.com/w/c/experimental/fpext4).
(cherry picked from commit f57cd8288d)

Co-authored-by: Dima Pasechnik <dimpase@gmail.com>
2019-02-25 23:10:54 -08:00
Benjamin Peterson 0395869c8c Run autoreconf. 2019-02-25 21:59:37 -08:00
Miss Islington (bot) 2055ebb940
closes bpo-13497: Fix `broken nice` configure test. (GH-12041)
Per POSIX, `nice(3)` requires `unistd.h` and `exit(3)` requires `stdlib.h`.

Fixing the test will prevent false positives with pedantic compilers like clang.
(cherry picked from commit 90c6facebd)

Co-authored-by: ngie-eign <1574099+ngie-eign@users.noreply.github.com>
2019-02-25 21:59:14 -08:00
Miss Islington (bot) 0b3019a02e
bpo-24643: Fix "GH-define timezone _timezone" clashes on Windows (GH-12019)
(cherry picked from commit 6673decfa0)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-02-25 16:15:04 -08:00
Miss Islington (bot) ea199b90bb bpo-35512: Resolve string target to patch.dict decorator during function call GHGH-12000 (#12021)
* Resolve string target to patch.dict during function call

* Add NEWS entry

* Remove unneeded call

* Restore original value for support.target and refactor assertions

* Add extra assertion to verify unpatched dict
(cherry picked from commit a875ea58b2)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-02-25 21:17:16 +00:00
Serhiy Storchaka 95fc8e687c
[3.7] bpo-28450: Fix and improve the documentation for unknown escapes in RE. (GH-11920). (GH-12029)
(cherry picked from commit a180b007d9)
2019-02-25 18:28:53 +02:00
Miss Islington (bot) a1caf65d5e
Remove empty Dictionaries section from programming FAQ (GH-12026)
(cherry picked from commit 55e335d7d5)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
2019-02-25 08:27:54 -08:00
Miss Islington (bot) d14999b184
Correct name of 'defaultobj' parameter in PyDict_SetDefault() signature. (GH-11929)
(cherry picked from commit d90a141bb9)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
2019-02-25 07:18:20 -08:00
Miss Islington (bot) ca5e6aaea5
closes bpo-36083: Fix formatting of the manpage Synopsis. (GH-12017)
More specifically, the options of --check-hash-based-pycs.
(cherry picked from commit 16323cb2c3)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
2019-02-24 16:56:13 -08:00
Miss Islington (bot) 25d20a6503
bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk (GH-12011)
(cherry picked from commit aeca373b33)

Co-authored-by: Ned Deily <nad@python.org>
2019-02-23 23:46:20 -08:00
Miss Islington (bot) 38aea4131f
bpo-24310: Document IDLE settings dialog font tab sample (GH-12007)
(cherry picked from commit d610116a2e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2019-02-23 20:23:08 -08:00
Miss Islington (bot) 8efa32888b
fix _abc.c compile error on Cygwin (GH-8445)
(cherry picked from commit abe5922743)

Co-authored-by: E. M. Bray <erik.m.bray@gmail.com>
2019-02-23 17:53:28 -08:00
Miss Islington (bot) 6163210089
bpo-36019: Use pythontest.net instead of example.com in network tests (GH-11941)
(cherry picked from commit a40681dd5d)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
2019-02-22 06:03:26 -08:00
Miss Islington (bot) 1b2ff9ff09
Include the --prompt flag in venv's help output (GH-10711)
Document usage of the existing `--prompt` option in the command line help.
(cherry picked from commit 3208880f1c)

Co-authored-by: Holger Frey <socials@holgerfrey.de>
2019-02-22 03:14:08 -08:00
Julien Palard 22bfe637ca [3.7] Doc: Missing backquotes. (GH-11982) (GH-11985)
(cherry picked from commit 6e240ddd0d)

Co-authored-by: Julien Palard <julien@palard.fr>
2019-02-22 00:56:06 -08:00
Miss Islington (bot) b046f1bada
bpo-28235: Fix xml.etree.ElementTree.fromstring docs (GH-11903)
(cherry picked from commit e5458bdb6a)

Co-authored-by: Manjusaka <lizheao940510@gmail.com>
2019-02-21 16:45:31 -08:00
Miss Islington (bot) 7121a6eeb7 bpo-36060: Document how collections.ChainMap() determines iteration order (GH-11969) (GH-11978)
(cherry picked from commit 86f093f71a)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-02-21 09:47:46 -08:00
Miss Islington (bot) 3bd3a71a1a Document other performance implication for __slots__ (GH-11974) (GH-11975)
(cherry picked from commit 7463884f69)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-02-21 09:10:20 -08:00
Miss Islington (bot) 300605990d bpo-36059: Update OrderedDict() docs to reflect that regular dicts are now ordered (GH-11966) (GH-#11972)
(cherry picked from commit 49fd6dd887)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-02-21 00:18:51 -08:00
Miss Islington (bot) 0e73ea26a5
bpo-33989: Ensure that ms.key_compare is always initialized in list_sort_impl(). (GH-8710)
(cherry picked from commit ebc793d6ac)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-02-21 00:05:22 -08:00
Miss Islington (bot) 92ac01b104
Doc: fix example for iter() function. (GH-11959)
read() returns bytes for a file opened in binary mode,
so b'' should be used as a sentinel instead of ''.
Otherwise the loop will be infinite.
(cherry picked from commit 11fa0e48a9)

Co-authored-by: Cristian Ciupitu <cristian.ciupitu@yahoo.com>
2019-02-20 23:59:28 -08:00
Miss Islington (bot) 14baf06feb bpo-31982: Improve sequence of presentation in ChainMap docs (GH-11960) (GH-11961)
https://bugs.python.org/issue31982
(cherry picked from commit 9b0c681e2d)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-02-20 14:23:29 -08:00
Miss Islington (bot) bb9ddee3d4 bpo-35584: Clarify role of caret in a class class (GH-11946) (GH-11947)
https://bugs.python.org/issue35584
(cherry picked from commit 3bacf61265)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-02-19 12:25:54 -08:00
Miss Islington (bot) e8bf04de4b
bpo-36037: Fix test_ssl for strict OpenSSL policy (GH-11940)
Fix test_ssl for strict OpenSSL configuration like RHEL8 strict crypto policy.
Use older TLS version for minimum TLS version of the server SSL context if
needed, to test TLS version older than default minimum TLS version.
(cherry picked from commit 3ef6344ee5)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-02-19 09:24:16 -08:00
Miss Islington (bot) 64ca728223
bpo-31506: Clarify error messages for object.__new__ and object.__init__ (GH-11641)
`object.__new__` and `object.__init__` do take one argument each,
they just don't take extra user supplied arguments.

Patch by Sanyam Khurana.
(cherry picked from commit 5105483acb)

Co-authored-by: Sanyam Khurana <8039608+CuriousLearner@users.noreply.github.com>
2019-02-19 05:47:13 -08:00
Miss Islington (bot) a8834905df
Fix syntax warnings in tests introduced in bpo-35942. (GH-11934)
(cherry picked from commit 8d01eb49fc)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-02-19 04:16:36 -08:00
Miss Islington (bot) 35de9bbbab
Fix a misnamed test for lists. (GH-11933)
(cherry picked from commit f522a57ec7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2019-02-19 04:12:16 -08:00
Miss Islington (bot) 99e9c36b29
bpo-35689: IDLE: Add docstrings and unittests for colorizer.py (GH-11472)
(cherry picked from commit ee0f927bd8)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2019-02-18 21:30:53 -08:00
Miss Islington (bot) 3129432845 bpo-34572: change _pickle unpickling to use import rather than retrieving from sys.modules (GH-9047) (GH-11921)
Fix C implementation of pickle.loads to use importlib's locking mechanisms, and thereby avoid using partially-loaded modules.
(cherry picked from commit 4371c0a9c0)

Co-authored-by: tjb900 <ozburgess@gmail.com>
2019-02-18 15:52:32 +00:00
Miss Islington (bot) 0e379d43ac
bpo-34294: re module, fix wrong capturing groups in rare cases. (GH-11546)
Need to reset capturing groups between two SRE(match) callings in loops, this fixes wrong capturing groups in rare cases.

Also add a missing index in re.rst.
(cherry picked from commit 4a7f44a2ed)

Co-authored-by: animalize <animalize@users.noreply.github.com>
2019-02-18 05:48:23 -08:00
Miss Islington (bot) a01065a358
bpo-35942: Improve the error message if __fspath__ returns invalid types in path_converter (GH-11831)
The error message emitted when returning invalid types from __fspath__ in interfaces that allow passing PathLike objects has been improved and now it does explain the origin of the error.
(cherry picked from commit 09fbcd6085)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2019-02-18 03:05:52 -08:00
Miss Islington (bot) a7f929db60
bpo-35992: Use PySequence_GetItem only if sq_item is not NULL (GH-11857)
Not using `__class_getitem__()` fallback if there is a non-subcriptable metaclass was caused by a certain asymmetry between how `PySequenceMethods` and `PyMappingMethods` are used in `PyObject_GetItem`. This PR removes this asymmetry. No tests failed, so I assume it was not intentional.
(cherry picked from commit ac28147e78)

Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
2019-02-17 15:33:04 -08:00
Miss Islington (bot) 6f352199e4
bpo-35931: Gracefully handle SyntaxError in pdb debug command (GH-11782)
Previously, `debug print(` would cause the interpreter to exit on a SyntaxError whereas `print(` would properly display the error and return to the pdb prompt.

This patch fixes this by pre-compiling the code before passing it to `Pdb.run`.

https://bugs.python.org/issue35931
(cherry picked from commit 4327705cfa)

Co-authored-by: Daniel Hahler <github@thequod.de>
2019-02-15 13:19:44 -08:00
Miss Islington (bot) 7a3cbcdc55 Improve readability of random module examples (GH-11884) (GH-11885)
Based on reviewer feedback from Allen Downey, convert ``lambda`` to ``def``.
(cherry picked from commit 9abb725cea)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2019-02-15 12:47:04 -08:00
Miss Islington (bot) f6097306ff Fix the versionadded info for typing.NoReturn (GH-11880)
The earliest version that `typing.NoReturn` appears in is [3.5.4rc1](https://docs.python.org/3/whatsnew/changelog.htmlGH-python-3-5-4-release-candidate-1)
(cherry picked from commit 903567e4f5)

Co-authored-by: Jack Wilsdon <jack.wilsdon@gmail.com>
2019-02-15 11:31:28 -08:00
Miss Islington (bot) 05f41363d4
bpo-36006: Fix versionchanged directive alignment in io module documentation (GH-11881)
https://bugs.python.org/issue36006
(cherry picked from commit 522630a746)

Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
2019-02-15 11:09:38 -08:00
Victor Stinner fe42122d41
bpo-35746: Credit Colin Read and Nicolas Edet (GH-11864)
Add credit for the cert parser vulnerability. Mention also Cisco
TALOS-2018-0758 identifier.
2019-02-15 13:19:30 +01:00
Miss Islington (bot) 04a39399ef
bpo-35994: add sub dir for sub2_tree in os.walk test if symlink is not supported (GH-11853)
https://bugs.python.org/issue35994
(cherry picked from commit 3e028b2d40)

Co-authored-by: pxinwr <peixing.xin@windriver.com>
2019-02-14 21:23:07 -08:00
Miss Islington (bot) b8bcec35e0
bpo-30410: Documentation of sys.stdin/out/err update to reflect change in 3.6 (GH-10264)
Documentation of sys.stdin/out/err update to reflect change in 3.6 on Windows to use UTF-8.

Wording by Eryk Sun and Paul Moore.

https://bugs.python.org/issue30410
(cherry picked from commit 5723263a3a)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2019-02-14 15:45:20 -08:00
Miss Islington (bot) 7e618f3154
bpo-35633: test_lockf() fails with "PermissionError: [Errno 13] Permission denied" on AIX (GH-11424)
[bpo-35633](https://bugs.python.org/issue35633): Fix a test regression introduced with [bpo-35189](https://bugs.python.org/issue35189) (PEP 475: fnctl functions are not retried if interrupted (EINTR)).

Not only a blocking IO error needs to be ignored - permission errors also need to be ignored.

p.s. - iirc as a "test" only correction a NEWS item is not required. If this is not correct - just mention, and I'll add a NEWS blurb.

https://bugs.python.org/issue35633
(cherry picked from commit b94d4bed67)

Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
2019-02-14 10:41:37 -08:00
Miss Islington (bot) e20893596f
closes bpo-35991: Fix a potential double free in Modules/_randommodule.c. (GH-11849)
(cherry picked from commit bb3c05d7ef)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2019-02-14 00:02:12 -08:00
Miss Islington (bot) a78251e2d6
bpo-35961: Fix a crash in slice_richcompare() (GH-11830)
Fix a crash in slice_richcompare(): use strong references rather than
stolen references for the two temporary internal tuples.

The crash (or assertion error) occurred if a garbage collection
occurred during slice_richcompare(), especially while calling
PyObject_RichCompare(t1, t2, op).
(cherry picked from commit dcb68f47f7)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2019-02-13 03:49:34 -08:00
Benjamin Peterson 00cc0fe177
[3.7] Remove stray quote in os.replace docstring. (GH-11835)
(cherry picked from commit 73d600239b)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
2019-02-12 20:36:09 -08:00
Miss Islington (bot) 009220eae2
bpo-35505: Skip test_imap4_host_default_value if localhost listens on IMAP port (GH-11823)
Make test_imap4_host_default_value independent on whether the
local IMAP server is running.
(cherry picked from commit 3dc67d0316)

Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
2019-02-12 10:54:31 -08:00
Miss Islington (bot) 0a834c18cd bpo-35960: Fix dataclasses.field throwing away empty metadata. (GH-11815) (GH-11826)
(cherry picked from commit b01786c881)

Co-authored-by: Christopher Hunt <chrahunt@gmail.com>
2019-02-12 07:11:48 -05:00
Miss Islington (bot) 58f05ce059 bpo-35918: Remove broken has_key method and add test (GH-11819) (#11824)
(cherry picked from commit a31f4cc881)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
2019-02-11 17:09:22 -08:00
Miss Islington (bot) 2259b5af3c
[3.7] bpo-22062: Updated docstring and documentation for pathlib (GH-8519) (GH-11817)
Original patch by Mike Short


https://bugs.python.org/issue22062
(cherry picked from commit 537b6caa56)


Co-authored-by: Eivind Teig <eivind.teig@gmail.com>


https://bugs.python.org/issue22062
2019-02-11 04:02:57 -08:00
Miss Islington (bot) cb9a1c72c2
Doc sidebar: 3.6 has moved to security-fix mode. (GH-11810)
(cherry picked from commit 9db56fb8fa)

Co-authored-by: Julien Palard <julien@palard.fr>
2019-02-10 13:43:57 -08:00
Miss Islington (bot) 6f0f764820
Make sure the BaseManager in test_multiprocessing is cleaned up correctly (GH-11653)
(cherry picked from commit 7b2a37b728)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
2019-02-09 09:53:51 -08:00