Commit Graph

10140 Commits

Author SHA1 Message Date
Russell Owen 6000087fe9
closes bpo-40017: Add CLOCK_TAI constant to the time module. (GH-19096)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
2020-03-23 22:41:40 -05:00
laike9m 70d9d74411
Updated documentation for FOR_ITER (GH-19113)
Added a comma to make the sentence less confusing.
2020-03-24 09:03:06 +08:00
Curtis Bucher 25e580a73c
bpo-36144: Add union operators to WeakKeyDictionary (#19106) 2020-03-23 13:49:46 -07:00
Curtis Bucher f393b2c588
bpo-36144: Add PEP 584 operators to collections.ChainMap (#18832)
* Update ChainMap to include | and |=

Created __ior__, __or__ and __ror__ methods in ChainMap class.

* Update ACKS

* Update docs

* Update test_collections.py to include test_issue584().

Added testing for | and |= operators for ChainMap objects.

* Update test_union_operators

Renamed test_union operators, fixed errors and style problems raised by brandtbucher.

* Update test_union_operators in TestChainMap

Added testing for union operator between ChainMap and iterable of key-value pairs.

* Update test_union operators in test_collections.py

Gave more descriptive variable names and eliminated unnecessary tmp variable.

* Update test_union_operators in test_collections.py

Added cm3

* Check .maps rather than Chainmap equality.

* Add news entry

* Update Lib/test/test_collections.py

Co-Authored-By: Brandt Bucher <brandtbucher@gmail.com>

* Removed whitespace

* Added Guido's changes

* Fixed Docs

* Removed whitespace

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
2020-03-23 12:02:05 -07:00
Serhiy Storchaka b146568dfc
bpo-39652: Truncate the column name after '[' only if PARSE_COLNAMES is set. (GH-18942) 2020-03-21 15:53:28 +02:00
Victor Stinner d2a8e5b42c
bpo-40010: COMPUTE_EVAL_BREAKER() checks for subinterpreter (GH-19087)
COMPUTE_EVAL_BREAKER() now also checks if the Python thread state
belongs to the main interpreter. Don't break the evaluation loop if
there are pending signals but the Python thread state it belongs to a
subinterpeter.

* Add _Py_IsMainThread() function.
* Add _Py_ThreadCanHandleSignals() function.
2020-03-20 13:38:58 +01:00
amaajemyfren 2de7ac9798
bpo-39797 Changes to socketserver.BaseServer's shutdown() method. (GH-18929)
Automerge-Triggered-By: @ned-deily
2020-03-20 01:03:18 -07:00
Mark Dickinson c691f20952
Fix "versionchanged" for pow named arguments (GH-19042)
The ability to use named arguments in "pow" was introduced in Python 3.8, not Python 3.9. See https://bugs.python.org/issue38237
2020-03-19 18:12:59 +00:00
Ross 61ac612e78
bpo-39507: Add HTTP status 418 "I'm a Teapot" (GH-18291) 2020-03-15 14:24:23 +02:00
Борис Верховский 33238ec2af
Link to list of keywords in the laguage reference (GH-18024) 2020-03-14 21:09:15 +02:00
Taine Zhao 6672c16b1d
bpo-39677: dis: rename the operand of MAKE_FUNCTION from `argc` to `flags` for 3.6+ (GC-18550) 2020-03-14 16:24:06 +02:00
Dong-hee Na da52be4769
bpo-39509: Update HTTP status code to follow IANA (GH-18294)
Add status codes 103 EARLY_HINTS and 425 TOO_EARLY.
2020-03-14 16:12:01 +02:00
Brandt Bucher 6d674a1bf4
bpo-36144: OrderedDict Union (PEP 584) (#18967) 2020-03-13 09:06:04 -07:00
Charles Burkland d648ef10c5
bpo-36144: Update os.environ and os.environb for PEP 584 (#18911) 2020-03-13 09:04:43 -07:00
Pablo Galindo c00c86b904
Fix syntax error in an example in the ast documentation and sync docstrings (GH-18946) 2020-03-12 00:48:19 +00:00
Benjamin Peterson 51796e5d26
Update some www.unicode.org URLs to use HTTPS. (GH-18912) 2020-03-10 21:10:59 -07:00
Benjamin Peterson 051b9d08d1
closes bpo-39926: Update Unicode to 13.0.0. (GH-18910) 2020-03-10 20:41:34 -07:00
Adam Johnson d06eec218e
tracemalloc: 'pretty top' example no longer changes the filename (GH-18903)
I've used this recipe a couple times and the filename editing has always
been less than useful and something I've removed. This is because many
modules end up losing which package they are located in, e.g. `util/date.py`.
2020-03-10 19:18:50 +01:00
Serhiy Storchaka 13d52c2686
bpo-34822: Simplify AST for subscription. (GH-9605)
* Remove the slice type.
* Make Slice a kind of the expr type instead of the slice type.
* Replace ExtSlice(slices) with Tuple(slices, Load()).
* Replace Index(value) with a value itself.

All non-terminal nodes in AST for expressions are now of the expr type.
2020-03-10 18:52:34 +02:00
Victor Stinner 8510f43078
bpo-1294959: Add sys.platlibdir attribute (GH-18381)
Add --with-platlibdir option to the configure script: name of the
platform-specific library directory, stored in the new sys.platlitdir
attribute. It is used to build the path of platform-specific dynamic
libraries and the path of the standard library.

It is equal to "lib" on most platforms. On Fedora and SuSE, it is
equal to "lib64" on 64-bit systems.

Co-Authored-By: Jan Matějek <jmatejek@suse.com>
Co-Authored-By: Matěj Cepl <mcepl@cepl.eu>
Co-Authored-By: Charalampos Stratakis <cstratak@redhat.com>
2020-03-10 09:53:09 +01:00
Pete Wicken 8e9c47a947
bpo-28577: Special case added to IP v4 and v6 hosts for /32 and /128 networks (GH-18757)
The `.hosts()` method now returns the single address present in a /32 or /128 network.
2020-03-09 15:33:45 -07:00
Serhiy Storchaka b7e9525f9c
bpo-36287: Make ast.dump() not output optional fields and attributes with default values. (GH-18843)
The default values for optional fields and attributes of AST nodes are now set
as class attributes (e.g. Constant.kind is set to None).
2020-03-10 00:07:47 +02:00
idomic fc72ab6913
bpo-38691: importlib ignores PYTHONCASEOK if -E is used (GH-18627)
The importlib module now ignores the PYTHONCASEOK
environment variable when the -E or -I command line
options are being used.
2020-03-09 12:57:53 +01:00
Terry Jan Reedy 2522db11df
bpo-39852: IDLE 'Go to line' deletes selection, updates status (GH-18801)
It appears standard that moving the text insert cursor away from a selection clears the
selection.  Clearing prevents accidental deletion of a possibly off-screen bit of text.
The update is for Ln and Col on the status bar.
2020-03-08 14:32:42 -04:00
Serhiy Storchaka db283b32e7
bpo-39567: Document audit for os.walk, os.fwalk, Path.glob and Path.rglob. (GH-18499) 2020-03-08 14:31:47 +02:00
Brandt Bucher 4663f66f35
bpo-36144: Update MappingProxyType with PEP 584's operators (#18814)
We make `|=` raise TypeError, since it would be surprising if `C.__dict__ |= {'x': 0}` silently did nothing, while `C.__dict__.update({'x': 0})` is an error.
2020-03-07 11:03:09 -08:00
Pablo Galindo 02f64cb791
bpo-39199: Use 'eval' mode for the examples with expression nodes (GH-18828)
Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
2020-03-07 18:22:58 +00:00
Brandt Bucher 57c9d17256
bpo-36144: Implement defaultdict union (GH-18729)
For PEP 585 (this isn't in the PEP but is an obvious follow-up).
2020-03-06 09:24:08 -08:00
Jules Lasne (jlasne) ce305d6410
IDLE doc: improve Startup failure subsection. (#18771)
Eliminate repeat of 'Options', reported by Jules Lasne, and improve wording elsewhere.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-03-05 20:28:14 -05:00
Miss Islington (bot) d4a09c13dd
Add a missing space after a period in 'typing.TypedDict' documentation (GH-18784) 2020-03-04 16:12:28 -08:00
Brett Cannon 67152d0ed6
bpo-39808: Improve docs for pathlib.Path.stat() (GH-18719) 2020-03-04 14:51:50 -08:00
Victor Stinner 942f7a2dea
bpo-39674: Revert "bpo-37330: open() no longer accept 'U' in file mode (GH-16959)" (GH-18767)
This reverts commit e471e72977.

The mode will be removed from Python 3.10.
2020-03-04 18:50:22 +01:00
MojoVampire 469325c30e
bpo-35712: Make using NotImplemented in a boolean context issue a deprecation warning (GH-13195) 2020-03-03 20:50:17 +02:00
Victor Stinner 91fe414264
bpo-39674: Update collections ABC deprecation doc (GH-18747) 2020-03-03 17:31:11 +01:00
Inada Naoki 2110551761
bpo-39775: inspect: Change Signature.parameters back to OrderedDict. (GH-18684) 2020-03-02 18:54:48 +09:00
Mark Dickinson 9f1cb1bb49
Fix misleading statement about mixed-type numeric comparisons (GH-18615) 2020-03-02 08:57:27 +00:00
Pablo Galindo 114081f8ad
bpo-39199: Add descriptions of non-deprecated nodes to the AST module documentation (GH-17812)
Adapted from https://greentreesnakes.readthedocs.io

Co-authored-by: Karthikeyan Singaravelan <tir.karthi@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2020-03-02 03:14:06 +00:00
Stefan Krah 0b0d29fce5
Mention backports (GH-18715) 2020-02-29 22:39:23 +01:00
Stefan Krah 815280eb16
bpo-39794: Add --without-decimal-contextvar (#18702) 2020-02-29 19:43:42 +01:00
Jason R. Coombs 0aeab5c438
bpo-39667: Sync zipp 3.0 (GH-18540)
* bpo-39667: Improve pathlib.Path compatibility on zipfile.Path and correct performance degradation as found in zipp 3.0

* 📜🤖 Added by blurb_it.

* Update docs for new zipfile.Path.open

* Rely on dict, faster than OrderedDict.

* Syntax edits on docs

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2020-02-29 10:34:11 -06:00
Henry Harutyunyan dc04a0571e
bpo-37534: Allow adding Standalone Document Declaration when generating XML documents (GH-14912) 2020-02-29 09:22:19 +01:00
Gregory P. Smith 02673352b5
bpo-39769: Fix compileall ddir for subpkgs. (GH-18676)
Fix compileall.compile_dir() ddir= behavior on sub-packages.

Fixes compileall.compile_dir's ddir parameter and compileall command
line flag `-d` to no longer write the wrong pathname to the generated
pyc file for submodules beneath the root of the directory tree being
compiled.  This fixes a regression introduced with Python 3.5.

Also marks the _new_ in 3.9 from PR #16012 parameters to compile_dir as keyword only (as that is the only way they will be used) and fixes an omission of them in one place from the docs.
2020-02-28 17:28:37 -08:00
Shantanu c2f7eb254b
bpo-39718: add TYPE_IGNORE, COLONEQUAL to py38 changes in token (GH-18598) 2020-02-28 18:25:36 -05:00
Terry Jan Reedy 916895f939
bpo-13790: Change 'string' to 'specification' in format doc (GH-18690) 2020-02-28 14:59:16 -05:00
Brandt Bucher d0ca9bd93b
bpo-36144: Document PEP 584 (GH-18659) 2020-02-26 12:01:48 -08:00
opavlyuk 21da76d1f1
bpo-34788: Add support for scoped IPv6 addresses (GH-13772)
Automerge-Triggered-By: @asvetlov
2020-02-26 06:33:57 -08:00
idomic 8af4712a16
bpo-39128: Added algorithm description (GH-18624)
# [bpo-39128](https://bugs.python.org/issue39128): happy eyeballs description

# [3.9] 39128 - happy eyeballs description (GH-18624)
# [3.8] 39128 - happy eyeballs description (GH-18624)



https://bugs.python.org/issue39128
2020-02-24 06:59:40 -08:00
Hakan Çelik aea045adb8
bpo-39654: Update pyclbr doc to reflect additional information returned (GH-18528)
Full nested function and class info makes it a module browser.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-02-23 21:00:40 -05:00
Stefan Krah b76518d43f
bpo-39576: Clarify the word size for the 32-bit build. (#18616) 2020-02-23 14:36:54 +01:00
Serhiy Storchaka 559e7f165a
bpo-39648: Expand math.gcd() and math.lcm() to handle multiple arguments. (GH-18604)
* bpo-39648: Expand math.gcd() and math.lcm() to handle multiple arguments.

* Simplify fast path.

* Difine lcm() without arguments returning 1.

* Apply suggestions from code review

Co-Authored-By: Mark Dickinson <dickinsm@gmail.com>

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
2020-02-23 11:21:29 +00:00