| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
(GH-17596) (GH-17601)
(cherry picked from commit 5936a4ce914d42af97b9238e5090dedc8d5b0bd2)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
for if_stmt (GH-17582) (#17584)
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 025a602af7ee284d8db6955c26016f3f27d35536)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
|
| |
|
|
|
|
| |
decorators. (GH-16861). (GH-16930)
(cherry picked from commit 26ae9f6d3d755734c9f371b9356325afe5764813)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bpo-9566: Fix compiler warnings in gcmodule.c (GH-11010)
Change PyDTrace_GC_DONE() argument type from int to Py_ssize_t.
(cherry picked from commit edad38e3e05586ba58291f47756eb3fb808f5577)
* bpo-30465: Fix C downcast warning on Windows in ast.c (#6593)
ast.c: fstring_fix_node_location() downcasts a pointer difference to
a C int. Replace int with Py_ssize_t to fix the compiler warning.
(cherry picked from commit fb7e7992beec7f76cc2db77ab6ce1e86446bfccf)
* bpo-9566: Fix compiler warnings in peephole.c (GH-10652)
(cherry picked from commit 028f0ef4f3111d2b3fc5b971642e337ba7990873)
* bpo-27645, sqlite: Fix integer overflow on sleep (#6594)
Use the _PyTime_t type and round away from zero (ROUND_UP,
_PyTime_ROUND_TIMEOUT) the sleep duration, when converting a Python
object to seconds and then to milliseconds. Raise an OverflowError in
case of overflow.
Previously the (int)double conversion rounded towards zero
(ROUND_DOWN).
(cherry picked from commit ca405017d5e776a2e3d9291236e62d2e09489dd2)
|
| |
|
|
|
| |
(GH-11015) (GH-11020)
(cherry picked from commit 4c49da0cb7434c676d70b9ccf38aca82ac0d64a9)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Followup to 90fc8980bbcc5c7dcced3627fe172b0bfd193a3b.
<!--
Thanks for your contribution!
Please read this comment in its entirety. It's quite important.
GH- Pull Request title
It should be in the following format:
```
bpo-NNNN: Summary of the changes made
```
Where: bpo-NNNN refers to the issue number in the https://bugs.python.org.
Most PRs will require an issue number. Trivial changes, like fixing a typo, do not need an issue.
GH- Backport Pull Request title
If this is a backport PR (PR made against branches other than `master`),
please ensure that the PR title is in the following format:
```
[X.Y] <title from the original PR> (GH-NNNN)
```
Where: [X.Y] is the branch name, e.g. [3.6].
GH-NNNN refers to the PR number from `master`.
-->
(cherry picked from commit d13e59c1b512069d90efe7ee9b613d3913e79c56)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
| |
|
|
|
|
|
|
| |
to the "async" keyword. (GH-4175)
Previously, col_offset points to the keyword after "async".
(cherry picked from commit 90fc8980bbcc5c7dcced3627fe172b0bfd193a3b)
Co-authored-by: guoci <zguoci@gmail.com>
|
| |
|
|
|
|
|
|
| |
(GH-8852)
Reported by Svace static analyzer.
(cherry picked from commit 28853a249b1d0c890b7e9ca345290bb8c1756446)
Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
|
| |
|
|
|
|
|
| |
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>
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
and in codecs.escape_decode() when decode an escaped non-ascii byte.
|
| |
|
| |
Per PEP 492, 'async' and 'await' should become proper keywords in 3.7.
|
| |
|
|
| |
unicodedata.normalize(). (#3767)
|
| |
|
|
|
|
|
| |
* 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.
|
| |
|
| |
For f-string ast nodes, fix the line and columns so that tools such as flake8 can identify them correctly.
|
| |
|
|
| |
(#3157)
|
| |
|
|
|
|
| |
(#2232)
This caused a segfault on eval("f'\\\n'") and eval("f'\\\r'") in debug build.
|
| |
|
|
|
|
|
|
| |
(#1888)
'invalid character in identifier' now is raised instead of
'f-string: empty expression not allowed' if a subexpression contains
only whitespaces and they are not accepted by Python parser.
|
| | |
|
| |
|
|
| |
(#748)
|
| |
|
|
|
|
|
|
|
|
|
| |
* bpo-29463: Add docstring field to some AST nodes.
ClassDef, ModuleDef, FunctionDef, and AsyncFunctionDef has docstring
field for now. It was first statement of there body.
* fix document. thanks travis!
* doc fixes
|
| |
|
|
| |
collections.namedtuple() now supports tuples with more than 255 elements.
|
| |\
| |
| |
| | |
by ast.literal_eval() even if they do not include subexpressions.
|
| | |
| |
| |
| | |
by ast.literal_eval() even if they do not include subexpressions.
|
| |/ |
|
| |\ |
|
| | | |
|
| |\ \
| |/
| |
| |
| |
| | |
_PyUnicode_EqualToASCIIString.
The latter function is more readable, faster and doesn't raise exceptions.
|
| | |
| |
| |
| |
| |
| | |
_PyUnicode_EqualToASCIIString.
The latter function is more readable, faster and doesn't raise exceptions.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Issue #28691: Fix warn_invalid_escape_sequence(): handle correctly
DeprecationWarning raised as an exception. First clear the current exception to
replace the DeprecationWarning exception with a SyntaxError exception.
Unit test written by Serhiy Storchaka.
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
escapes. Backport to 3.6.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
but not in the expressions. Also, require expressions to begin and end with literal curly braces.
|
| | |
| |
| |
| | |
Thanks to Georg Brandl for the patch.
|
| | | |
|
| | |
| |
| |
| | |
Patch by Ivan Levkivskyi.
|
| | | |
|
| | |
| |
| |
| | |
temporary restriction. In 3.6 beta 2, the plan is to again allow backslashes in the string parts of f-strings, but disallow them in the expression parts.
|
| |\ \
| |/ |
|
| | | |
|
| | |
| |
| |
| | |
the implementation of the IMPORT_NAME opcode.
|
| | |
| |
| |
| | |
Documentation updates by Martin Panter.
|