Pablo Galindo
13951c7f25
[3.8] bpo-39427: Document -X opt options in the CLI --help and the man page (GH-18131) (GH-18133)
...
https://bugs.python.org/issue39427
Automerge-Triggered-By: @pablogsal
(cherry picked from commit 41f0ef6abb )
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com >
2020-02-23 20:48:27 +00:00
Benjamin Peterson
0d860dd43c
[3.8] closes bpo-39630: Update pointers to string literals to be const char *. (GH-18511)
...
(cherry picked from commit 7386a70746 )
Co-authored-by: Andy Lester <andy@petdance.com >
2020-02-13 21:05:00 -08:00
Miss Islington (bot)
2076d4f97e
bpo-39474: Fix AST pos for expressions like (a)(b), (a)[b] and (a).b. (GH-18477)
...
(cherry picked from commit 6e619c48b8 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com >
2020-02-12 12:56:44 -08:00
Miss Islington (bot)
190433d815
closes bpo-39605: Fix some casts to not cast away const. (GH-18453)
...
gcc -Wcast-qual turns up a number of instances of casting away constness of pointers. Some of these can be safely modified, by either:
Adding the const to the type cast, as in:
- return _PyUnicode_FromUCS1((unsigned char*)s, size);
+ return _PyUnicode_FromUCS1((const unsigned char*)s, size);
or, Removing the cast entirely, because it's not necessary (but probably was at one time), as in:
- PyDTrace_FUNCTION_ENTRY((char *)filename, (char *)funcname, lineno);
+ PyDTrace_FUNCTION_ENTRY(filename, funcname, lineno);
These changes will not change code, but they will make it much easier to check for errors in consts
(cherry picked from commit e6be9b59a9 )
Co-authored-by: Andy Lester <andy@petdance.com >
2020-02-11 18:47:20 -08:00
Lysandros Nikolaou
8b9cebce09
[3.8] bpo-39579: Fix Attribute end_col_offset to point at the current node (GH-18405) (GH-18408)
...
(cherry picked from commit d2e1098641 )
https://bugs.python.org/issue39579
Automerge-Triggered-By: @gvanrossum
2020-02-07 16:21:38 -08:00
Miss Islington (bot)
92135775ce
Fix compiler warning on Windows (GH-18012)
...
Python-ast.h contains a macro named Yield that conflicts with the Yield macro
in Windows system headers. While Python-ast.h has an "undef Yield" directive
to prevent this, it means that Python-ast.h must be included before Windows
header files or we run into a re-declaration warning. In commit c96be811fa
an include for pycore_pystate.h was added which indirectly includes Windows
header files. In this commit we re-order the includes to fix this warning.
(cherry picked from commit e92d39303f )
Co-authored-by: Ammar Askar <ammar@ammaraskar.com >
2020-01-15 09:07:09 -08:00
Karthikeyan Singaravelan
9955f33cdb
[3.8] bpo-39033: Fix NameError in zipimport during hash validation (GH-17588) (GH-17642)
...
Fix `NameError` in `zipimport` during hash validation and add a regression test.
(cherry picked from commit 79f02fee1a )
https://bugs.python.org/issue39033
2020-01-14 03:39:19 -08:00
Miss Islington (bot)
33e033da3c
bpo-39235: Fix end location for genexp in call args (GH-17925)
...
The fix changes copy_location() to require an extra node from which to extract the end location, and fixing all 5 call sites.
https://bugs.python.org/issue39235
(cherry picked from commit a796d8ef9d )
Co-authored-by: Guido van Rossum <guido@python.org >
2020-01-09 11:39:00 -08:00
Miss Islington (bot)
a9a43c221b
bpo-29778: Fix incorrect NULL check in _PyPathConfig_InitDLLPath() (GH-17818)
...
(cherry picked from commit 7b79dc9200 )
Co-authored-by: Anthony Wee <awee@box.com >
2020-01-06 09:17:36 -08:00
Miss Islington (bot)
49c108c832
Fix constant folding optimization for positional only arguments (GH-17837)
...
(cherry picked from commit b121a4a45f )
Co-authored-by: Anthony Sottile <asottile@umich.edu >
2020-01-05 09:21:47 -08:00
Miss Islington (bot)
859525590c
Fix SystemError when nested function has annotation on positional-only argument (GH-17826)
...
(cherry picked from commit ec007cb43f )
Co-authored-by: Anthony Sottile <asottile@umich.edu >
2020-01-04 18:14:58 -08:00
Miss Islington (bot)
10dc738bda
Bring Python into the next decade. (GH-17801)
...
(cherry picked from commit 946b29ea0b )
Co-authored-by: Benjamin Peterson <benjamin@python.org >
2020-01-02 19:15:37 -08:00
Miss Islington (bot)
6c004955ac
bpo-39176: Improve error message for 'named assignment' (GH-17777) (GH-17778)
...
(cherry picked from commit 37143a8e3b )
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com >
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com >
2019-12-31 21:28:08 -06:00
Miss Islington (bot)
a278ae19b4
closes bpo-37446: resolve undefined behavior in Python/hamt.c (GH-17727)
...
(cherry picked from commit d0c92e81aa )
Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com >
2019-12-30 18:51:18 -08:00
Pablo Galindo
b1f2044710
[3.8] bpo-39080: Starred Expression's column offset fix when inside a CALL (GH-17645) (GH-17649)
...
…
Co-Authored-By: Pablo Galindo <Pablogsal@gmail.com >
(cherry picked from commit 50d4f12958 )
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com >
https://bugs.python.org/issue39080
2019-12-17 17:41:58 -08:00
Miss Islington (bot)
cd968dea28
The comment in ast_for_namedexpr shouldn't include if_stmt (GH-17586)
...
Automerge-Triggered-By: @gvanrossum
(cherry picked from commit b08d3f71be )
Co-authored-by: Guido van Rossum <guido@python.org >
2019-12-15 12:04:07 -08:00
Miss Islington (bot)
ce333cd7d5
Fix elif start column offset when there is an else following (GH-17596) (GH-17600)
...
(cherry picked from commit 5936a4ce91 )
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com >
2019-12-14 10:43:42 +00:00
Miss Islington (bot)
4a5db78c9a
Add PYTHONUTF8 to commandline usage. (GH-17587)
...
Co-Authored-By: Victor Stinner <vstinner@python.org >
(cherry picked from commit 95826c773a )
Co-authored-by: Inada Naoki <songofacandy@gmail.com >
2019-12-14 19:38:35 +09:00
Miss Islington (bot)
3b18b17efc
bpo-39031: Include elif keyword when producing lineno/col-offset info for if_stmt (GH-17582) (GH-17589)
...
When parsing an "elif" node, lineno and col_offset of the node now point to the "elif" keyword and not to its condition, making it consistent with the "if" node.
https://bugs.python.org/issue39031
Automerge-Triggered-By: @pablogsal
(cherry picked from commit 025a602af7 )
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com >
2019-12-13 16:21:54 +00:00
Miss Islington (bot)
c93d68bbb9
bpo-39008: Require Py_ssize_t for PySys_Audit formats rather than raise a deprecation warning (GH-17540)
...
(cherry picked from commit b8cbe74c34 )
Co-authored-by: Steve Dower <steve.dower@python.org >
2019-12-09 11:22:30 -08:00
Miss Islington (bot)
960fca1a58
bpo-38979: fix ContextVar "__class_getitem__" method (GH-17497)
...
now contextvars.ContextVar "__class_getitem__" method returns ContextVar class, not None.
https://bugs.python.org/issue38979
Automerge-Triggered-By: @asvetlov
(cherry picked from commit 28c91631c2 )
Co-authored-by: AMIR <31338382+amiremohamadi@users.noreply.github.com >
2019-12-08 04:49:07 -08:00
Steve Dower
b74a6f14b9
bpo-38920: Add audit hooks for when sys.excepthook and sys.unraisablehook are invoked (GH-17392)
...
Also fixes some potential segfaults in unraisable hook handling.
2019-11-28 08:46:23 -08:00
Miss Islington (bot)
2ea4c37c1e
bpo-38823: Fix refleak in marshal init error path (GH-17260)
...
(cherry picked from commit 33b671e724 )
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com >
2019-11-20 02:16:02 -08:00
Miss Islington (bot)
4c22e1665c
closes bpo-37633: Reëxport some function compatibility wrappers for macros in `pythonrun.h`. (GH-17056)
...
(cherry picked from commit 62161ce989 )
Co-authored-by: Benjamin Peterson <benjamin@python.org >
2019-11-04 21:52:59 -08:00
Miss Skeleton (bot)
dcb338ea1b
bpo-38640: Allow break and continue in always false while loops (GH-16992)
...
(cherry picked from commit 6c3e66a34b )
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com >
2019-10-30 05:11:41 -07:00