Commit Graph

102686 Commits

Author SHA1 Message Date
Miss Islington (bot) f780443399
fixed duplicated method name of test_getuserbase() (GH-12140)
(cherry picked from commit 45d8d2469a)

Co-authored-by: native-api <ivan_pozdeev@mail.ru>
2019-03-03 15:09:10 -08:00
Miss Islington (bot) 4b9459d3a3 Autospec functions should propagate mock calls to parent GH-11273 (#12039)
(cherry picked from commit 9c3f284de5)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-03-03 17:14:44 +00:00
Miss Islington (bot) cd0416466f
bpo-36091: Remove reference to async generator in Lib/types.py. (GH-11996)
(cherry picked from commit 0a6a412fb2)

Co-authored-by: Henry Chen <tahafut@gmail.com>
2019-03-03 06:54:39 -08:00
Miss Islington (bot) 243b2064ce
bpo-32129: Avoid blurry IDLE application icon on macOS with Tk 8.6. (GH-12031)
Patch by Kevin Walzer.
(cherry picked from commit 7eebbbd5b3)

Co-authored-by: Ned Deily <nad@python.org>
2019-03-01 15:13:57 -08:00
Miss Islington (bot) b94874f7e2
bpo-35178: Fix warnings._formatwarnmsg() (GH-12033)
Ensure custom formatwarning function can receive line as positional argument.

Co-Authored-By: Tashrif Billah <tashrifbillah@gmail.com>
(cherry picked from commit be7c460fb5)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
2019-03-01 09:40:10 -08:00
Miss Islington (bot) 70852b1eb6
bpo-36152: IDLE: Remove unused parameter from colorizer (GH-12109)
Remove colorizer.ColorDelegator.close_when_done and the corresponding argument of .close().  In IDLE, both have always been None or False since 2007.
(cherry picked from commit b9f0354efc)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2019-03-01 02:43:43 -08:00
Cheryl Sabella 7dc322f8a5 [3.7] Add versionadded directives to ssl.minimum_version and ssl.maxi… (GH-12101)
…mum_version (GH-11894).

(cherry picked from commit ae2ea33d5d)

Co-authored-by: Zhiming Wang <i@zhimingwang.org>
2019-02-28 10:11:35 -08:00
Miss Islington (bot) 661151b341
Document the surprising sideeffect PyErr_Print(). (GH-12081)
Did you know an API documented as printing the pending traceback would sometimes exit the process?

You do now.
(cherry picked from commit 4173772031)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2019-02-27 15:45:28 -08:00
Miss Islington (bot) 79e72591b1
Fix grammar error in timeit module docs (GH-12066)
skip issue
skip news
(cherry picked from commit 4064089fce)

Co-authored-by: Shiv Dhar <shivdhar@gmail.com>
2019-02-27 15:27:36 -08:00
Miss Islington (bot) 197e46829b
[3.7] Update FAQ to point to Infrastructure Team website. (GH-12077) (GH-12078)
(cherry picked from commit ccb92e814d)


Co-authored-by: Ned Deily <nad@python.org>
2019-02-27 14:29:13 -08:00
Miss Islington (bot) 488aabafe2 bpo-36096: IDLE: Refactor class variables in colorizer (GH-12002) (GH-12075)
(cherry picked from commit ed1deb0719)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2019-02-27 14:14:06 -05:00
Miss Islington (bot) e5897b67ba bpo-28441: Ensure `.exe` suffix in `sys.executable` on MinGW and Cygwin (GH-4348)
This is needed to even the run the test suite on buildbots for affected platforms; e.g.:

```
./python.exe  ./Tools/scripts/run_tests.py -j 1 -u all -W --slowest --fail-env-changed --timeout=11700 -j2
/home/embray/src/python/test-worker/3.x.test-worker/build/python -u -W default -bb -E -W error::BytesWarning -m test -r -w -j 1 -u all -W --slowest --fail-env-changed --timeout=11700 -j2
Traceback (most recent call last):
  File "./Tools/scripts/run_tests.py", line 56, in <module>
    main(sys.argv[1:])
  File "./Tools/scripts/run_tests.py", line 52, in main
    os.execv(sys.executable, args)
PermissionError: [Errno 13] Permission denied
make: *** [Makefile:1073: buildbottest] Error 1
```

(cherry picked from commit 7a7693e9cb)

Co-authored-by: E. M. Bray <erik.m.bray@gmail.com>
2019-02-27 18:24:34 +09:00
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