Commit Graph

8663 Commits

Author SHA1 Message Date
Mario Corchero 552be9d7e6 bpo-30541: Add new method to seal mocks (GH61923)
The new method allows the developer to control when to stop the
feature of mocks that automagically creates new mocks when accessing
an attribute that was not declared before

Signed-off-by: Mario Corchero <mariocj89@gmail.com>
2017-10-17 04:35:11 -07:00
brainfvck c75edabbb6 bpo-31558: Add gc.freeze() (#3705)
Freeze all the objects tracked by gc - move them to a permanent generation
and ignore all the future collections. This can be used before a POSIX
fork() call to make the gc copy-on-write friendly or to speed up collection.
2017-10-16 12:49:41 -07:00
INADA Naoki 073150db39 bpo-31672: doc: Remove one sentence from library/string.rst (GH-3990)
This sentence is removed while backporting to 3.6 branch.
See https://github.com/python/cpython/pull/3982#discussion_r144555768
2017-10-14 21:22:41 +09:00
Serhiy Storchaka cd195e2a7a bpo-31714: Improved regular expression documentation. (#3907) 2017-10-14 11:14:26 +03:00
Victor Stinner ef611c96ea bpo-30807: signal.setitimer() now uses _PyTime API (GH-3865)
The _PyTime API handles detects overflow and is well tested.

Document that the signal will only be sent once if internal is equal
to zero.
2017-10-13 13:49:43 -07:00
Berker Peksag 7f58097083 bpo-28647: Update -u documentation after bpo-30404 (GH-3961) 2017-10-13 15:16:31 +03:00
INADA Naoki b22273ec5d bpo-31672: Fix string.Template accidentally matched non-ASCII identifiers (GH-3872)
Pattern `[a-z]` with `IGNORECASE` flag can match to some non-ASCII characters.

Straightforward solution for this is using `IGNORECASE | ASCII` flag.
But users may subclass `Template` and override only `idpattern`. So we want to
avoid changing `Template.flags`.

So this commit uses local flag `-i` for `idpattern` and change `[a-z]` to `[a-zA-Z]`.
2017-10-13 16:02:23 +09:00
Berker Peksag 9255104499 Improve test suite customization example (GH-3967)
Reported by John Gamboa on docs@p.o at
https://mail.python.org/pipermail/docs/2017-June/031942.html
2017-10-13 06:41:57 +03:00
Éric Araujo 03b9537dc5 bpo-31567: more decorator markup fixes in docs (GH-3959) (#3966) 2017-10-12 12:28:55 -04:00
Daisuke Miyakawa 0e61e67a57 bpo-31567: add or fix decorator markup in docs (#3959) 2017-10-12 10:39:43 -04:00
Cheryl Sabella 703ff381ff bpo-28157: Improvements for the time module documentation (GH-928)
* Separated functions and constants descriptions in sections.
* Added a note about the limitations of timezone constants.
* Removed redundant lists from the module docstring.
2017-10-11 16:29:14 +03:00
Brad Smith eeb5ffd54e bpo-31537: Update readline documentation example. (GH-3925)
Change the code example from using `get_history_length` to `get_current_history_length`.
2017-10-10 14:52:58 -07:00
Tzu-ping Chung 28f713601d bpo-31720: msilib documentation, change MsiError into MSIError (GH-3914) 2017-10-07 07:55:00 -07:00
Yury Selivanov 02e82a0596 bpo-31709: Update importlib magic (#3906) 2017-10-06 10:18:10 -04:00
Jelle Zijlstra ac317700ce bpo-30406: Make async and await proper keywords (#1669)
Per PEP 492, 'async' and 'await' should become proper keywords in 3.7.
2017-10-05 23:24:46 -04:00
Barry Warsaw 36c1d1f1e5 PEP 553 built-in breakpoint() function (bpo-31353) (#3355)
Implement PEP 553, built-in breakpoint() with support from sys.breakpointhook(), along with documentation and tests.  Closes bpo-31353
2017-10-05 12:11:18 -04:00
pdox e14679c784 closes bpo-31596: Add an interface for pthread_getcpuclockid(3) (#3756) 2017-10-05 00:01:56 -07:00
Serhiy Storchaka 300dd552b1 bpo-30872: Update the curses docs to Python 3. (#2620) 2017-10-04 22:44:13 +03:00
Serhiy Storchaka c02a1f4ad8 bpo-31667: Fix gettext related links. (#3860)
* Fix incorrect links.
* Remove redundant links.
* Add signatures and index entries for gettext related
functions in the locale module.
2017-10-04 20:28:20 +03:00
Serhiy Storchaka 0b5e61ddca bpo-30397: Add re.Pattern and re.Match. (#1646) 2017-10-04 20:09:49 +03:00
Thomas Moreau e8c368df22 bpo-31540: Allow passing multiprocessing context to ProcessPoolExecutor (#3682) 2017-10-03 11:53:17 +02:00
scoder 101a5e84ac bpo-31648: Improve ElementPath (#3835)
* Allow whitespace inside of ElementPath predicates.
* Add ElementPath predicate support for text comparison of the current node, like "[.='text']".
2017-09-30 16:35:21 +03:00
Zhiming Wang d87b105ca7 bpo-31638: Add compression support to zipapp (GH-3819)
Add optional argument `compressed` to `zipapp.create_archive`, and add
option `--compress` to the command line interface of `zipapp`.
2017-09-29 18:31:52 +01:00
Benjamin Peterson 236329ed9f point to the module-level get_ident function rather than the one in _thread (#3782) 2017-09-26 23:13:15 -07:00
Stefan Grönke f1502d097c bpo-31569: correct PCBuild/ case to PCbuild/ in build scripts and docs (GH-3711) 2017-09-25 17:58:10 +01:00
Raymond Hettinger 49392c63a2 bpo-27385: Clarify docstring for groupby() (#3738) 2017-09-25 01:21:06 -07:00
Raymond Hettinger 0bf287b6e0 bpo-18558: Clarify glossary entry for "Iterable" (#3732) 2017-09-25 00:52:06 -07:00
Sanket Dasgupta 5b9299d8c7 bpo-30085: Improve documentation for operator (#1171)
The dunderless functions are preferred; dunder are retained for back compatilibity.
Patch by Sanket Dasgupta.
2017-09-24 14:29:22 -04:00
Serhiy Storchaka 2fad102354 bpo-27319, bpo-31508: Document deprecation in Treeview.selection(). (#3667)
Defer removing old behavior to 3.8.
Document new feature of selection_set() and friends.
2017-09-24 14:34:09 +03:00
Serhiy Storchaka c247caf33f bpo-30346: An iterator produced by the itertools.groupby() iterator (#1569)
now becames exhausted after advancing the groupby iterator.
2017-09-24 13:36:11 +03:00
topper-123 039b25d8fd bpo-31564: Update typing documentation (GH-3696)
Mention that ``NewType`` can derive from another ``NewType``.
2017-09-23 19:37:48 -07:00
Dmitry Chestnykh aecc08ac3a Docs: correct hashlib.blake2 keyed hashing example (bpo-31560) 2017-09-23 10:18:40 -07:00
Barry Warsaw 35425d638c bpo-31389 Add an optional `header` argument to pdb.set_trace() (#3438)
* Give pdb.set_trace() an optional `header` argument

* What's new.

* Give pdb.set_trace() an optional `header` argument

* What's new.
2017-09-22 12:29:42 -04:00
Igor Filatov 9adda0cdf8 bpo-31351: Set return code in ensurepip when pip fails (GH-3626)
Previously ensurepip would always report success, even if the
pip installation failed.
2017-09-21 20:07:45 +10:00
Anthony Sottile aaf6fc0982 bpo-26510: make argparse subparsers required by default (#3027)
This fixes a regression from Python 2.  To get optional subparsers,
use the new parameter ``add_subparsers(required=False)``.

Patch by Anthony Sottile.
2017-09-20 17:35:27 -04:00
Felipe 19e4d9346d bpo-31533: fix broken link to OpenSSL docs (#3674) 2017-09-20 20:20:18 +02:00
Antoine Pitrou b43c4caf81 Restore dummy_threading and _dummy_thread, but deprecate them (bpo-31370) (#3648) 2017-09-18 22:04:20 +02:00
Christian Heimes e82c034496 bpo-31431: SSLContext.check_hostname auto-sets CERT_REQUIRED (#3531)
Signed-off-by: Christian Heimes <christian@python.org>
2017-09-15 20:29:57 +02:00
Christian Heimes 4df60f18c6 bpo-31386: Custom wrap_bio and wrap_socket type (#3426)
SSLSocket.wrap_bio() and SSLSocket.wrap_socket() hard-code SSLObject and
SSLSocket as return types. In the light of future deprecation of
ssl.wrap_socket() module function and direct instantiation of SSLSocket,
it is desirable to make the return type of SSLSocket.wrap_bio() and
SSLSocket.wrap_socket() customizable.

Signed-off-by: Christian Heimes <christian@python.org>
2017-09-15 20:26:05 +02:00
Terry Jan Reedy ff70289002 bpo-314777: IDLE - improve rstrip entry in doc (#3602)
'Strip trailing whitespace' is not limited to spaces.  Wording caters to beginners who
do know know the meaning of 'whitespace'.  Multiline string literals are not skipped.

* News blurb.
2017-09-15 13:05:28 -04:00
Feanil Patel 6a396c9807 bpo-31128: Allow pydoc to bind to arbitrary hostnames (#3011)
New -n flag allow overriding localhost with custom value,
for example to run from containers.
2017-09-14 17:54:09 -04:00
sww 312ffead1e Improve code examples in hashlib cookie signing (GH-3562)
The `blake2b` function does not take the `data` keyword argument.
The hex digest returned by sign was a string, whereas compare_digest expects bytes-like objects.
Typo fix: compare_digesty -> compare_digest
2017-09-13 23:24:36 -07:00
Mariatta ea0f7c26ce bpo-31394: Make tokenize.rst PEP 8-compliant (GH-3526)
The last commit contained lines longer than 80 characters.
2017-09-12 21:00:00 -07:00
Aivar Annamaa 5f8fbf917e bpo-31394: Clarify documentation about token type attribute (GH-3469)
Make it clear that Ellipsis tokens also have type attribute set to token.OP.
2017-09-12 20:24:03 -07:00
Terry Jan Reedy 98758bc67f bpo-31421: Document how IDLE runs tkinter programs. (#3513)
IDLE calls tcl/tk update in the background in order to make live
interaction and experimentatin with tkinter applications much easier.
2017-09-12 09:05:16 -04:00
Terry Jan Reedy adb4cd2a2a bpo-27099: Finish updating IDLE doc and help text. (#3510)
As needed for the conversion of extensions to features.
2017-09-12 07:45:15 -04:00
wohlganger 58fc71c447 bpo-27099: IDLE - Convert built-in extensions to regular features (#2494)
About 10 IDLE features were implemented as supposedly optional
extensions.  Their different behavior could be confusing or worse for
users and not good for maintenance.  Hence the conversion.

The main difference for users is that user configurable key bindings
for builtin features are now handled uniformly.  Now, editing a binding
in a keyset only affects its value in the keyset.  All bindings are
defined together in the system-specific default keysets in config-
extensions.def.  All custom keysets are saved as a whole in config-
extension.cfg.  All take effect as soon as one clicks Apply or Ok.

The affected events are '<<force-open-completions>>', '<<expand-word>>',
'<<force-open-calltip>>', '<<flash-paren>>', '<<format-paragraph>>',
'<<run-module>>', '<<check-module>>', and '<<zoom-height>>'.  Any
(global) customizations made before 3.6.3 will not affect their keyset-
specific customization after 3.6.3. and vice versa.

Inital patch by Charles Wohlganger, revised by Terry Jan Reedy.
2017-09-10 17:19:47 -04:00
Raymond Hettinger 8b57d73639 bpo-28638: Optimize namedtuple() creation time by minimizing use of exec() (#3454)
* Working draft without _source

* Re-use itemgetter() instances

* Speed-up calls to __new__() with a pre-bound tuple.__new__()

* Add note regarding string interning

* Remove unnecessary create function wrappers

* Minor sync-ups with PR-2736.  Mostly formatting and f-strings

* Bring-in qualname/__module fix-ups from PR-2736

* Formally remove the verbose flag and _source attribute

* Restore a test of potentially problematic field names

* Restore kwonly_args test but without the verbose option

* Adopt Inada's idea to reuse the docstrings for the itemgetters

* Neaten-up a bit

* Add news blurb

* Serhiy pointed-out the need for interning

* Jelle noticed as missing f on an f-string

* Add whatsnew entry for feature removal

* Accede to request for dict literals instead keyword arguments

* Leave the method.__module__ attribute pointing the actual location of the code

* Improve variable names and add a micro-optimization for an non-public helper function

* Simplify by in-lining reuse_itemgetter()

* Arrange steps in more logical order

* Save docstring in local cache instead of interning
2017-09-10 10:23:36 -07:00
Zhiming Wang 30644dee0c Improve IncrementalEncoder documentation (GH-2746)
getstate and setstate are instance methods, same as encode and reset.
2017-09-09 23:09:55 -07:00
Sergey Fedoseev a7fbad96c8 Make `json.dumps()` example to be PEP-8 compliant. (GH-3472) 2017-09-09 09:39:36 -07:00