Miss Islington (bot)
72927d0d17
Fix an incorrect check in compiler_try_except(). (GH-9810)
...
(cherry picked from commit 53ebf4b070 )
Co-authored-by: Zackery Spytz <zspytz@gmail.com >
2018-10-12 00:19:20 -07:00
Serhiy Storchaka
2641ee5040
bpo-32911: Revert bpo-29463. (GH-7121)
...
Remove the docstring attribute of AST types and restore docstring
expression as a first stmt in their body.
Co-authored-by: INADA Naoki <methane@users.noreply.github.com >
2018-05-29 10:49:10 +03:00
Serhiy Storchaka
b32f8897ea
[3.7] bpo-33475: Fix and improve converting annotations to strings. (GH-6774). (GH-6927)
...
(cherry picked from commit 64fddc423f )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com >
2018-05-20 18:06:08 +03:00
Zsolt Dollenstein
a93a663d6c
[3.7] bpo-33363: raise SyntaxError for async for/with outside async functions (GH-6616). (GH-6619)
2018-04-27 18:33:37 -04:00
Miss Islington (bot)
9e96e7b24e
bpo-33132: Fix more reference counting issues in the compiler. (GH-6323)
...
(cherry picked from commit aa8e51f5eb )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com >
2018-03-31 16:41:28 -07:00
Miss Islington (bot)
471364b4d9
bpo-33132: Fix reference counting issues in the compiler. (GH-6209)
...
(cherry picked from commit a95d98607e )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com >
2018-03-24 14:27:06 -07:00
Serhiy Storchaka
b9744e924c
bpo-33041: Fixed jumping if the function contains an "async for" loop. (GH-6154)
2018-03-23 14:35:33 +02:00
Serhiy Storchaka
9e94c0d3c7
[3.7] bpo-33041: Add missed error checks when compile "async for" (GH-6053) (GH-6060)
...
and remove redundant code.
(cherry picked from commit 67ee07795b )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com >
2018-03-10 20:45:05 +02:00
Mark Shannon
332cd5ee4f
bpo-32550. Remove the STORE_ANNOTATION bytecode. (GH-5181)
2018-01-29 16:41:04 -08:00
Guido van Rossum
95e4d58913
String annotations [PEP 563] ( #4390 )
...
* Document `from __future__ import annotations`
* Provide plumbing and tests for `from __future__ import annotations`
* Implement unparsing the AST back to string form
This is required for PEP 563 and as such only implements a part of the
unparsing process that covers expressions.
2018-01-26 08:20:18 -08:00
Serhiy Storchaka
782d6fe443
bpo-31113: Get rid of recursion in the compiler for normal control flow. ( #3015 )
2018-01-11 20:20:13 +02:00
Serhiy Storchaka
d4864c61e3
bpo-24340: Fix estimation of the code stack size. ( #5076 )
2018-01-09 21:54:52 +02:00
Serhiy Storchaka
02b9ef2775
bpo-32439: Clean up the code for compiling comparison expressions. ( #5029 )
2017-12-30 09:47:42 +02:00
Serhiy Storchaka
3dfbaf51f0
bpo-32372: Move __debug__ optimization to the AST level. ( #4925 )
2017-12-25 12:47:50 +02:00
Serhiy Storchaka
bd6ec4d79e
bpo-32365: Fix a reference leak when compile __debug__. ( #4916 )
...
It was introduced in bpo-27169.
2017-12-18 14:29:12 +02:00
Serhiy Storchaka
3325a6780c
bpo-27169: The __debug__ constant is now optimized out at compile time. ( #4880 )
...
This fixes also bpo-22091.
2017-12-15 12:35:48 +02:00
INADA Naoki
7ea143ae79
bpo-29469: Move constant folding to AST optimizer (GH-2858)
2017-12-14 16:47:20 +09:00
Nick Coghlan
078f1814f1
bpo-32176: Set CO_NOFREE in the code object constructor (GH-4675)
...
Previously, CO_NOFREE was set in the compiler, which meant
it could end up being set incorrectly when code objects
were created directly. Setting it in the constructor based
on freevars and cellvars ensures it is always accurate,
regardless of how the code object is defined.
2017-12-03 11:12:20 +10:00
Serhiy Storchaka
e2f92de6a9
Add the const qualifier to "char *" variables that refer to literal strings. ( #4370 )
2017-11-11 13:06:26 +02:00
Yury Selivanov
b8ab9d3fc8
bpo-31708: Allow async generator expressions in synchronous functions ( #3905 )
2017-10-06 02:58:28 -04:00
Yury Selivanov
faa135acbf
bpo-31709: Drop support for asynchronous __aiter__. ( #3903 )
2017-10-06 02:08:57 -04:00
Barry Warsaw
b2e5794870
bpo-31338 ( #3374 )
...
* Add Py_UNREACHABLE() as an alias to abort().
* Use Py_UNREACHABLE() instead of assert(0)
* Convert more unreachable code to use Py_UNREACHABLE()
* Document Py_UNREACHABLE() and a few other macros.
2017-09-14 18:13:16 -07:00
Serhiy Storchaka
265fcc5fc2
bpo-31286, bpo-30024: Fixed stack usage in absolute imports with ( #3217 )
...
binding a submodule to a name.
2017-08-29 15:47:44 +03:00
Stefan Krah
f432a3234f
bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0. ( #3157 )
2017-08-21 13:09:59 +02:00
Serhiy Storchaka
36ff451eba
bpo-30501: Make the compiler producing optimized code for condition expressions. ( #1851 )
2017-06-11 14:50:22 +03:00