Commit Graph

106812 Commits

Author SHA1 Message Date
Ammar Askar e263bb1e97
Fuzz struct.unpack and catch RecursionError in re.compile (GH-18679) 2020-02-27 23:05:02 -08:00
Andy Lester 384f3c536d
closes bpo-39721: Fix constness of members of tok_state struct. (GH-18600)
The function PyTokenizer_FromUTF8 from Parser/tokenizer.c had a comment:

    /* XXX: constify members. */

This patch addresses that.

In the tok_state struct:
    * end and start were non-const but could be made const
    * str and input were const but should have been non-const

Changes to support this include:
    * decode_str() now returns a char * since it is allocated.
    * PyTokenizer_FromString() and PyTokenizer_FromUTF8() each creates a
        new char * for an allocate string instead of reusing the input
        const char *.
    * PyTokenizer_Get() and tok_get() now take const char ** arguments.
    * Various local vars are const or non-const accordingly.

I was able to remove five casts that cast away constness.
2020-02-27 18:44:52 -08:00
Ammar Askar 766b7546a5
bpo-39704: Explicitly pass the path to codecov config (GH-18680) 2020-02-27 15:08:30 -08:00
Markus Mohrhard 374d998b50
bpo-39609: set the thread_name_prefix for the default asyncio executor (GH-18458)
Just a small debugging improvement to identify the asyncio executor threads.
2020-02-27 12:01:47 -08:00
Inada Naoki 02a4d57263
bpo-39087: Optimize PyUnicode_AsUTF8AndSize() (GH-18327)
Avoid using temporary bytes object.
2020-02-27 13:48:59 +09:00
Andrew Svetlov 0c6e3aa67b
Suppress the hang (#18457) 2020-02-27 00:15:12 +02:00
Brandt Bucher d0ca9bd93b
bpo-36144: Document PEP 584 (GH-18659) 2020-02-26 12:01:48 -08:00
Ammar Askar 6aa1f1ecf7
bpo-39699: Don't silence make on Azure and Github CIs (GH-18583) 2020-02-26 19:21:41 +00: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
sweeneyde be7ead62db
bpo-39737: Remove code repitition in list_richcompare (GH-18638)
I may speed up list comparison on some platforms.
2020-02-26 09:00:35 +02:00
Inada Naoki 57c7a0bdf4
Doc: int -> int or Py_ssize_t (GH-18663) 2020-02-26 15:04:39 +09:00
Łukasz Langa 541e0ffbc8
Post 3.9.0a4 2020-02-26 01:31:04 +01:00
Łukasz Langa 9e52330415 Python 3.9.0a4
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl5VnLMACgkQsmmV4xAl
 BWgOrxAAhpv1CJtFDT0st4Apksq6mZNvZ/Fn03wiKjoR88qGMQXlHLF0uI48Rh0Z
 AuxfzBu/PsuDo7JHCeMG4sEsaJ1OSD7nl6Xq4Q8EWFiiP6QwMQuS8yxQgTi8Vonf
 EjujegOT4HpD9gAnw8esjFK+ln89kaeTYWoUi62f9mEi3EMw9wFBt0JfZ0SWkQvf
 tuJ401zstVTNv2D0GV1l10QAKDEzjjxj/oelEGM1urxMAbv/Ztls6SEpCEvMQp3c
 cUP1GaHJcu1tQIXCDvUWeLDdEb+uW5mDzbRPTbMSwqcnTvr1HHdzsNMlJTwKcjpV
 wgJ88TraN9oonvv63oJ//38I1zxh+WnZHLc2jlh4aksLz6J98W/2rw0UT4LOoPdR
 6cdjL4jSkFAZqJb5+gEQ6iQBEF7Wz7FpPlaRjrX4ARJxj2EkvvYScyLqVfH5BFzu
 JrSR+FSfsXc1FpiQFmZXN2Fx+ci5WmJ2yzMV0kEriHdjRh+BMXNJEZUNJr5T1Ep/
 3DNTcnNSSlt8B+N4/lRaI+cgvtvIv5o0EdRKxXrchmsQz9gUb358Sid2XltQJZPC
 4baiv0/8mN8olljcVo4XkMASCx4g0u14mFtpOLOk43EJAmINTryGSrc2rAZ7vHDk
 QpiuFn16VROGHN0/1yAOSnSJT6t6r5OSz7DfYOiz+m55/Ve3pSc=
 =vwQR
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAl5VvAsQHGx1a2FzekBs
 YW5nYS5wbAAKCRCyaZXjECUFaKNdD/42ChJD3lR8atOaDMyioxF3gGqSmFZpizKC
 nuum61SbBlr3O2vbxVLROI49PZyZnCNyu2kxBAxnRtWabvCOWkpMNWxePQH2UTyI
 70upGno+buof3cVZIb4NZyqjkoQ9N2RZX95t9TC0vp/avT/cEf9/pRRFFSHfZhQm
 1awVZDXcuJzrgfswTKas9CbnjMWNcdjxXTtDRV1RBZ/72HnhPFM7uBYsQZSD8NeG
 674vsavGFToldZwFK1seYtSwzFoQpSiSKgkJUZvLpBUoqSxzfhu0K8FqmJCyWL1F
 IA/ORKKSrVxpspNqgqaMZjs722Nl7nYQM9SAB9X4tM07lopVt/hgCyv+ylsg26CN
 gqgypNLOLgj9EMODeEec04BPcCIjln3ASKyuO/HfOtH6zoUw+B+L7n/cPCC537Pv
 g4MwNOlTvWGjl3Ucfr5x4aoOo0vbfHG1WNbecq1+iPHxowMJMVbWiSUcjQmDn08p
 kjkztn1zCI9amrK/gNEBPRLdrxy614M1YZI8oD52OFFH1jpzq6zXKljX4T5VdUw2
 YGmvVnJyUPf3ovMqIoZSRVIO2N1tG02Dxm4H65XnO/zWkPPiDNxnJluY1ihzT1bP
 KHztUPVUgeQ4uHu267TqsYEAzv+lOL2OkA/4NcXzuBCD2GsoQTakBr3CLhC8BVht
 LegRXHDDmQ==
 =A6+h
 -----END PGP SIGNATURE-----

Merge tag 'v3.9.0a4'

Python 3.9.0a4
2020-02-26 01:30:02 +01:00
Łukasz Langa 6e02691f30
Python 3.9.0a4 2020-02-25 22:06:39 +01:00
Steve Dower d644891970
bpo-38403: Update nuspec file for deprecated field and git repository (GH-18657) 2020-02-25 20:07:00 +00:00
Brandt Bucher eb8ac57af2
bpo-36144: Dictionary Union (PEP 584) (#12088) 2020-02-24 19:47:34 -08:00
Berker Peksag ba22e8f174
bpo-30566: Fix IndexError when using punycode codec (GH-18632)
Trying to decode an invalid string with the punycode codec
shoud raise UnicodeError.
2020-02-25 06:19:03 +03: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
Ned Deily 514328480a
Add note to Mac installer ReadMe about macOS 10.15 Gatekeeper changes. (GH-18648) 2020-02-24 08:00:58 -05:00
Stefan Krah b942ba03b8
Give proper credit for figuring out and writing PEP-3118 tests. (#18644) 2020-02-24 12:24:43 +01:00
Stefan Krah ee3bac4cba
Give proper credits for the memoryview implementation. (#18626) 2020-02-24 11:15:26 +01:00
Andy Lester c3fa634096
closes bpo-39736: const strings in Modules/_datetimemodule.c and Modules/_testbuffer.c (GH-18637) 2020-02-23 22:40:43 -08:00
Daniel Hahler 4015d1cda3
bpo-39649: Remove obsolete check for `__args__` in bdb.Bdb.format_stack_entry (GH-18531)
Appears to be obsolete since 75bb54c3d8.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2020-02-23 22:14:53 -05: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
Antoine Pitrou 9f37872e30
bpo-39681: Fix C pickle regression with minimal file-like objects (#18592)
Fix a regression where the C pickle module wouldn't allow unpickling from a
file-like object that doesn't expose a readinto() method.
2020-02-23 23:33:53 +01: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
ananthan-123 fbe2e0bb8a
bpo-17422: Language reference should specify restrictions on class namespace (#18559)
The language reference now specifies restrictions on class namespaces.  Adapted from a patch by Ethan Furman.
2020-02-22 09:56:01 -08:00
Yonatan Goldschmidt 1c56f8ffad
bpo-39382: Avoid dangling object use in abstract_issubclass() (GH-18530)
Hold reference of __bases__ tuple until tuple item is done with, because by
dropping the reference the item may be destroyed.
2020-02-22 15:11:48 +02:00
Stefan Krah a025d4ca99
bpo-39576: docs: set context for decimal arbitrary precision arithmetic (#18594) 2020-02-21 21:27:37 +01:00
Berker Peksag fd5116c0e7
bpo-35950: Raise UnsupportedOperation in BufferedReader.truncate() (GH-18586)
The truncate() method of io.BufferedReader() should raise
UnsupportedOperation when it is called on a read-only
io.BufferedReader() instance.





https://bugs.python.org/issue35950



Automerge-Triggered-By: @methane
2020-02-21 09:57:26 -08:00
Julien Danjou d4d17fd2cf
fix(doc): set correct RST syntax for c:function (GH-18589)
The current content is not rendered since the syntax is not correct.
2020-02-21 11:47:41 +01:00
Christopher Hunt c2ac4cf040
bpo-35727: Use exit code 0 on sys.exit() in multiprocessing.Process. (GH-11538) 2020-02-21 10:33:04 +01:00
Denis Chernikov baf29b2216
Reuse identifier of PREDICT macros as PREDICT_ID (GH-17155)
In function `_PyEval_EvalFrameDefault`, macros PREDICT and PREDICTED use the same identifier creation scheme, which may be shared between them, reducing code repetition, and do ensure that the same identifier is generated.
2020-02-21 10:17:50 +01:00
alclarks d4331c56b4
bpo-9495: avoid confusing chained exception in argparse test (GH-17120) 2020-02-21 10:48:36 +02: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
Andy Lester 933fc53f3f
closes bpo-39684: Combine two if/thens and squash uninit var warning. (GH-18565) 2020-02-20 20:51:47 -08:00
Stefan Krah 90930e6545
bpo-39576: Prevent memory error for overly optimistic precisions (GH-18581) 2020-02-21 01:52:47 +01:00
Steve Dower 6c444d0dab
bpo-39184: Fix incorrect return value (GH-18580)
https://bugs.python.org/issue39184



Automerge-Triggered-By: @zooba
2020-02-20 14:24:43 -08:00
Stefan Krah 1246d89203
Use the new recommended number of repetitions in the refleak tests. (#18569) 2020-02-20 19:08:53 +01:00
Stefan Krah 9b833e00e4
Update runall.bat to the latest Windows build system. (#18571) 2020-02-20 19:07:31 +01:00
Stefan Krah c0cb8beb38
Valgrind no longer supports --db-attach=yes. (#18568) 2020-02-20 14:39:14 +01: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
Cheryl Sabella a4ba8a3983
Include subsections in TOC for PDF version of docs. (GH-9629) 2020-02-19 00:01:15 +01: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
Petr Viktorin 6e35da9763
bpo-37207: Use vectorcall for range() (GH-18464)
This continues the `range()` part of #13930. The complete pull request is stalled on discussions around dicts, but `range()` should not be controversial. (And I plan to open PRs for other parts if this is merged.)
On top of Mark's change, I unified `range_new` and `range_vectorcall`, which had a lot of duplicate code.


https://bugs.python.org/issue37207
2020-02-18 07:13:17 -08:00
Jeroen Demeyer 24bba8cf5b
bpo-36347: stop using RESTRICTED constants (GH-12684)
The constants `RESTRICTED` and `PY_WRITE_RESTRICTED` no longer have a meaning in Python 3. Therefore, CPython should not use them.

CC @matrixise 


https://bugs.python.org/issue36347
2020-02-18 05:14:46 -08:00
Hai Shi 5d38517aa1
bpo-1635741: Port _bz2 extension module to multiphase initialization(PEP 489) (GH-18050)
https://bugs.python.org/issue1635741
2020-02-18 03:17:38 -08:00