Commit Graph

10188 Commits

Author SHA1 Message Date
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
Stefan Krah a025d4ca99
bpo-39576: docs: set context for decimal arbitrary precision arithmetic (#18594) 2020-02-21 21:27:37 +01:00
Pete Wicken 424e5686d8
bpo-38657: Clarify numeric padding behaviour in string formatting (GH-17036)
Make the definition of the width more explicit that it includes any
extra signs added by other options.


https://bugs.python.org/issue38657



Automerge-Triggered-By: @Mariatta
2020-02-20 21:53:12 -08:00
ananthan-123 f2ee21d858
bpo-39479:Add math.lcm() function: Least Common Multiple (#18547)
* Update math.rst

* Update math.rst

* updated whats new

* Update test_math.py

* Update mathmodule.c

* Update mathmodule.c.h

* Update ACKS

* 📜🤖 Added by blurb_it.

* Update 3.9.rst

* Update 2020-02-18-12-37-16.bpo-39479.j3UcCq.rst

* Update math.rst

* Update 2020-02-18-12-37-16.bpo-39479.j3UcCq.rst

* Update test_math.py

* Update ACKS

* Update mathmodule.c.h

* Update mathmodule.c

* Update mathmodule.c.h

* Update mathmodule.c.h

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2020-02-19 18:21:37 +00:00
Victor Stinner 4dee92b0ad
Revert "bpo-38691 Added a switch to ignore PYTHONCASEOK when -E or -I flags passed (#18314)" (GH-18553)
This reverts commit d83b6600b2.
2020-02-19 14:23:47 +01:00
ananthan-123 ab6423fe2d
bpo-39572: Document ’total’ flag of TypedDict (GH-18554) 2020-02-18 20:33:05 -08:00
Victor Stinner af5ee3ff61
bpo-39674: Revert "bpo-25988: Do not expose abstract collection classes in the collections module. (GH-10596)" (GH-18545)
This reverts commit ef092fe990.

Update collections __getattr__() and documentation to defer aliases
removal to Python 3.10.
2020-02-18 16:28:53 +01:00
idomic d83b6600b2
bpo-38691 Added a switch to ignore PYTHONCASEOK when -E or -I flags passed (#18314)
* Hard reset + cherry piciking the changes.

* 📜🤖 Added by blurb_it.

* Added @vstinner News

* Update Misc/NEWS.d/next/Library/2020-02-11-13-01-38.bpo-38691.oND8Sk.rst

Co-Authored-By: Victor Stinner <vstinner@python.org>

* Hard reset to master

* Hard reset to master + latest changes

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2020-02-17 10:05:11 +01:00
Serhiy Storchaka 85a2eef473
bpo-32892: Update the documentation for handling constants in AST. (GH-18514) 2020-02-17 11:03:00 +02:00
Vinay Sajip 1ed61617a4
bpo-12915: Add pkgutil.resolve_name (GH-18310) 2020-02-14 22:02:13 +00:00
Saiyang Gou 7514f4f625
bpo-39184: Add audit events to functions in `fcntl`, `msvcrt`, `os`, `resource`, `shutil`, `signal`, `syslog` (GH-18407) 2020-02-13 07:47:42 +00:00
Roger Hurwitz 4eb9f4313c
bpo-38374: Remove weakref.ReferenceError from docs (GH-18452)
Reflecting changes to the code, removed weakref.ReferenceError from weakref.rst and exceptions.rst.

Issue submitter provided evidence that the `weakref.ReferenceError` alias for `ReferenceError` was removed from the code in 2007.  Working with @gvanrossum at PyCascades CPython sprint we looked at the code and confirmed that `weakref.ReferenceError` was no longer in `weakref.py`.

Based on that analysis I removed references `weakref.ReferenceError` from the two documents where it was still being referenced: `weakref.rst` and `exceptions.rst`. 


https://bugs.python.org/issue38374
2020-02-10 22:56:02 -08:00
Ogi Moore c4a65ed7fe
bpo-39417: Fix broken link to guide to building venvs (GH-18432) 2020-02-10 15:51:01 -08:00
Tim D. Smith 95d024d585
bpo-13826: Clarify Popen constructor example (GH-18438)
Clarifies that the use of `shlex.split` is more instructive than
normative, and provides a simpler example.





https://bugs.python.org/issue13826
2020-02-10 14:51:01 -08:00
Roger Hurwitz 37c55b2b49
bpo-39594: Fix typo in os.times documentation (GH-18443)
There was an extra space in the url markup, causing the documentation not rendered properly.

https://bugs.python.org/issue39594
2020-02-10 14:50:19 -08:00
Carl d68e0a8a16
Issue3950: Fix docs for default locale used by gettext to match implementation (#18435)
documentation for default locale directory Doc/library/gettext.rst changed to match gettext implementation line 63.
2020-02-10 13:15:34 -08:00
Christophe Nanteuil 3c5dec65e9
Remove redundant references in struct doc (GH-18053) 2020-02-10 12:17:54 -08:00
Wellington Pardim 6c9974e12c
bpo-39369 Doc: Update mmap readline method documentation (GH-17957)
* Update mmap readline method documentation

Update mmap `readline` method description. The fact that the `readline` method does update the file position should not be ignored since this might give the impression for the programmer that it doesn't update it.

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2020-02-10 12:13:41 -08:00
Brian Curtin e00c1d0c45
Remove note saying patch is straightforward (#18431)
While `unittest.mock.patch` is a great thing, it is not straightforward.
If it were straightforward there wouldn't be such a huge amount of
documentation for it, and frankly, when myself and others who I've
read about often struggle to figure out what on earth `patch()` wants,
coming to the docs to read that it's straightforward is not helpful.
2020-02-10 10:47:17 -07:00
idomic 5305cc9dbf bpo-39128: Added happy_eyeballs_delay, interleave to function signature (GH-18315) 2020-02-10 10:48:40 +01:00
Saiyang Gou 0edc2c7678
Doc: sys.__unraisablehook__ and bytearray.hex separators are new in 3.8 (GH-17884)
Minor fix in documentation:

- `sys.__unraisablehook__` is new in version 3.8
- Optional `sep` and `bytes_per_sep` parameters for `bytearray.hex` is also supported in Python 3.8 (just like `bytes.hex`)
2020-02-07 16:48:06 -08:00
Victor Stinner dc7a50d73a
bpo-39350: Fix fractions for int subclasses (GH-18375)
Fix regression in fractions.Fraction if the numerator and/or the
denominator is an int subclass. The math.gcd() function is now
used to normalize the numerator and denominator. math.gcd() always
return a int type. Previously, the GCD type depended on numerator
and denominator.
2020-02-07 23:42:51 +01:00
Jakub Stasiak cf5b109dbb
bpo-39491: Merge PEP 593 (typing.Annotated) support (#18260)
* bpo-39491: Merge PEP 593 (typing.Annotated) support

PEP 593 has been accepted some time ago. I got a green light for merging
this from Till, so I went ahead and combined the code contributed to
typing_extensions[1] and the documentation from the PEP 593 text[2].

My changes were limited to:

* removing code designed for typing_extensions to run on older Python
  versions
* removing some irrelevant parts of the PEP text when copying it over as
  documentation and otherwise changing few small bits to better serve
  the purpose
* changing the get_type_hints signature to match reality (parameter
  names)

I wasn't entirely sure how to go about crediting the authors but I used
my best judgment, let me know if something needs changing in this
regard.

[1] 8280de241f/typing_extensions/src_py3/typing_extensions.py
[2] 17710b8798/pep-0593.rst
2020-02-04 17:10:19 -08:00
Saiyang Gou 95f6001021
bpo-39184: Add audit events to command execution functions in os and pty modules (GH-17824) 2020-02-05 11:15:00 +11:00
Kyle Stanley 339fd46cb7
bpo-39349: Add *cancel_futures* to Executor.shutdown() (GH-18057) 2020-02-02 13:49:00 +01:00
James Corbett b94737a4af
fixes typos in http.client documentation (#18300) 2020-02-01 04:31:00 -08:00
Andrew Svetlov 90d9ba6ef1
bpo-34793: Drop old-style context managers in asyncio.locks (GH-17533) 2020-02-01 13:12:52 +02:00
Julien Palard 58a4054760
Doc: Fix s/pseudo random/pseudo-random/ (GH-18289) 2020-01-31 10:50:14 +01:00
Victor Stinner c38fd0df2b
bpo-39353: binascii.crc_hqx() is no longer deprecated (GH-18276)
The binascii.crc_hqx() function is no longer deprecated.
2020-01-30 09:56:40 +01:00
Rémi Lapeyre 2cca8efe46 bpo-36350: inspect: Replace OrderedDict with dict. (GH-12412) 2020-01-28 21:47:03 +09:00
Raymond Hettinger 01bf2196d8
bpo-36018: Minor fixes to the NormalDist() examples and recipes. (GH-18226)
* Change the source for the SAT data to a primary source.
* Fix typo in the standard deviation
* Clarify that the binomial probabalities are just for the Python room.
2020-01-27 18:31:46 -08:00
Terry Jan Reedy 2824c45a0a
bpo-39392: Turtle overlap fill depends on OS (#18223)
Whether or not overlap regions for self-intersecting polygons
or multiple shapes are filled depends on the operating system graphics,
typeof overlap, and number of overlaps.
2020-01-27 18:41:18 -05:00
Mark Shannon 8a4cd700a7
bpo-39320: Handle unpacking of **values in compiler (GH-18141)
* Add DICT_UPDATE and DICT_MERGE bytecodes. Use them for ** unpacking.

* Remove BUILD_MAP_UNPACK and BUILD_MAP_UNPACK_WITH_CALL, as they are now unused.

* Update magic number for ** unpacking opcodes.

* Update dis.rst to incorporate new bytecodes.

* Add blurb entry.
2020-01-27 09:57:45 +00:00
Raymond Hettinger 10355ed7f1
bpo-36018: Add another example for NormalDist() (#18191) 2020-01-25 20:21:17 -08:00
Windson yang 4b09dc79f4 bpo-36654: Add examples for using tokenize module programmically (#12947) 2020-01-25 22:23:00 +03:00
Paulo Henrique Silva 40c080934b bpo-37955: correct mock.patch docs with respect to the returned type (GH-15521) 2020-01-25 10:53:54 +00:00
Victor Stinner b8d1262e8a
bpo-39395: putenv() and unsetenv() always available (GH-18135)
The os.putenv() and os.unsetenv() functions are now always available.

On non-Windows platforms, Python now requires setenv() and unsetenv()
functions to build.

Remove putenv_dict from posixmodule.c: it's not longer needed.
2020-01-24 14:05:48 +01:00
Victor Stinner 161e7b36b1
bpo-39413: Implement os.unsetenv() on Windows (GH-18163)
The os.unsetenv() function is now also available on Windows.
2020-01-24 11:53:44 +01:00
Victor Stinner b9783d2e03
bpo-39429: Add a new "Python Development Mode" doc page (GH-18132) 2020-01-24 10:22:18 +01:00
Pablo Galindo 65ecc390c1
bpo-17005: Minor improvements to the documentation of TopologicalSorter (GH-18155) 2020-01-23 21:01:50 +00:00
Pablo Galindo 99e6c260d6
bpo-17005: Add a class to perform topological sorting to the standard library (GH-11583)
Co-Authored-By: Tim Peters <tim.peters@gmail.com>
2020-01-23 15:29:52 +00:00
Mark Shannon 13bc13960c
bpo-39320: Handle unpacking of *values in compiler (GH-17984)
* Add three new bytecodes: LIST_TO_TUPLE, LIST_EXTEND, SET_UPDATE. Use them to implement star unpacking expressions.

* Remove four bytecodes BUILD_LIST_UNPACK, BUILD_TUPLE_UNPACK, BUILD_SET_UNPACK and  BUILD_TUPLE_UNPACK_WITH_CALL opcodes as they are now unused.

* Update magic number and dis.rst for new bytecodes.
2020-01-23 09:25:17 +00:00
William Woodruff dd754caf14 bpo-29435: Allow is_tarfile to take a filelike obj (GH-18090)
`is_tarfile()` now supports `name` being a file or file-like object.
2020-01-22 18:24:16 -08:00
Dong-hee Na 1f0f102dec bpo-39366: Remove xpath() and xgtitle() methods of NNTP (GH-18035) 2020-01-23 00:59:43 +03:00
Victor Stinner b73dd02ea7
Revert "bpo-39413: Implement os.unsetenv() on Windows (GH-18104)" (GH-18124)
This reverts commit 56cd3710a1.
2020-01-22 21:11:17 +01:00
Victor Stinner beea26b57e
bpo-39353: Deprecate the binhex module (GH-18025)
Deprecate binhex4 and hexbin4 standards. Deprecate the binhex module
and the following binascii functions:

* b2a_hqx(), a2b_hqx()
* rlecode_hqx(), rledecode_hqx()
* crc_hqx()
2020-01-22 20:44:22 +01:00
Inada Naoki 5bbac8cbdf
bpo-39377: json: Update doc about the encoding option. (GH-18076)
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2020-01-22 19:01:24 +09:00
Victor Stinner 56cd3710a1
bpo-39413: Implement os.unsetenv() on Windows (GH-18104)
The os.unsetenv() function is now also available on Windows.

It is implemented with SetEnvironmentVariableW(name, NULL).
2020-01-21 16:13:09 +01:00
Carl Friedrich Bolz-Tereick 8698b34b68 improve the documentation of the LOAD_METHOD and CALL_METHOD (GH-18079) 2020-01-21 09:41:16 +09:00
Peter Bittner 8d57a4182f bpo-39383: Mention Darwin as a potential value for platform.system() (GH-18054) 2020-01-20 18:22:56 -05:00
Andrew Svetlov 2c49becc69
Fix asyncio.get_event_loop() documentation (GH-18051)
Mention that the function implicitly creates new event loop only if called from the main thread.
2020-01-21 00:46:38 +02:00
Grant Jenks ef8844f1bc Fix Lock.locked() to remove extra bold highlighting (#18042) 2020-01-17 14:54:44 -08:00
Victor Stinner 9baf242fc7
bpo-39357: Remove buffering parameter of bz2.BZ2File (GH-18028)
Remove the buffering parameter of bz2.BZ2File. Since Python 3.0, it
was ignored and using it was emitting a DeprecationWarning. Pass an
open file object to control how the file is opened.

The compresslevel parameter becomes keyword-only.
2020-01-16 15:33:30 +01:00