| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| | |
tok_nextc() (12601)
Remove the PyMem_FREE() call added in cb90c89. The buffer will be
freed when PyTokenizer_Free() is called on the tokenizer state.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
(GH-10605)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
bpo-36443, bpo-36202: Since Python 3.7.0, calling Py_DecodeLocale()
before Py_Initialize() produces mojibake if the LC_CTYPE locale is
coerced and/or if the UTF-8 Mode is enabled by the user
configuration. This change fix the issue by disabling LC_CTYPE
coercion and UTF-8 Mode by default. They must now be enabled
explicitly (opt-in) using the new _Py_PreInitialize() API with
_PyPreConfig.
When embedding Python, set coerce_c_locale and utf8_mode attributes
of _PyPreConfig to -1 to enable automatically these parameters
depending on the LC_CTYPE locale, environment variables and command
line arguments
Alternative: Setting Py_UTF8Mode to 1 always explicitly enables the
UTF-8 Mode.
Changes:
* _PyPreConfig_INIT now sets coerce_c_locale and utf8_mode to 0 by
default.
* _Py_InitializeFromArgs() and _Py_InitializeFromWideArgs() can now
be called with config=NULL.
|
| | |
|
| |
| |
| | |
Python always use UTF-8 on VxWorks.
|
| |
| |
| |
| |
| | |
* Incref heap-allocated types in PyObject_Init
* Add documentation and porting notes to What's New
|
| |
| |
| |
| | |
(GH-12514)
|
| | |
|
| |
| |
| |
| |
| | |
Add idlelib.pyshell alias at top; remove pyshell alias at bottom.
Remove obsolete __name__=='__main__' command.
|
| |
| |
| | |
Handle memory allocation failure.
|
| |
| |
| | |
https://bugs.python.org/issue36433
|
| |\
| | |
| | |
| | | |
Python 3.8.0a3
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
pgen (GH-12456)
Now that the parser generator is written in Python (Parser/pgen) we can make use of it to regenerate the Lib/keyword file that contains the language keywords instead of parsing the autogenerated grammar files. This also allows checking in the CI that the autogenerated files are up to date.
|
| |/ |
|
| |
| |
| |
| |
| |
| |
| | |
(GH-12530)
Set type_attr to NULL after the assignment to stgdict->proto (like
what is done with stgdict after the Py_SETREF() call) so that it is
not decrefed twice on error.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Fix error in commit 2b75155 noticed by Serhiy Storchaka.
|
| | |
|
| |
| |
| |
| | |
Check for sys.abiflags before using since not all platforms have it defined.
|
| |
| |
| | |
We will remove int support from 3.10 or 4.0.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add tests for grep findfiles.
* Move findfiles to module function.
* Change findfiles to use os.walk.
Based on a patch by Al Sweigart.
|
| |
| |
| | |
Remove now unneeded imports.
|
| |
| |
| |
| | |
This param was only used once and changed the return type.
|
| |
| |
| |
| |
| |
| |
| |
| | |
(GH-12358)
Before, an `AttributeError` was raised due to trying to access an attribute that exists on specs but having received `None` instead for a non-existent module.
https://bugs.python.org/issue36298
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
If the first PyUnicode_DecodeUTF8() call fails in structseq_repr(),
_PyUnicodeWriter_Dealloc() will be called on an uninitialized
_PyUnicodeWriter.
|
| |
| |
| |
| |
| |
| | |
bpo-36256: Fix bug in parsermodule when parsing if statements
In the parser module, when validating nodes before starting the parsing with to create a ST in "parser_newstobject" there is a problem that appears when two arcs in the same DFA state has transitions with labels with the same type. For example, the DFA for if_stmt has a state with
two labels with the same type: "elif" and "else" (type NAME). The algorithm tries one by one the arcs until the label that starts the arc transition has a label with the same type of the current child label we are trying to accept. In this case, the arc for "elif" comes before the arc for "else"and passes this test (because the current child label is "else" and has the same type as "elif"). This lead to expecting a namedexpr_test (305) instead of a colon (11). The solution is to compare also the string representation (in case there is one) of the labels to see if the transition that we have is the correct one.
|
| | |
|
| | |
|
| | |
|
| |
| |
| | |
https://bugs.python.org/issue36374
|
| |
| |
| |
| |
| | |
No longer limit repr(structseq) to 512 bytes. Use _PyUnicodeWriter
for better performance and to write directly Unicode rather than
encoding repr() value to UTF-8 and then decoding from UTF-8.
|
| |
| |
| |
| |
| |
| |
| |
| | |
At Python initialization, the current directory is no longer
prepended to sys.path if it has been removed.
Rename _PyPathConfig_ComputeArgv0() to
_PyPathConfig_ComputeSysPath0() to avoid confusion between argv[0]
and sys.path[0].
|
| | |
|
| |
| |
| | |
_PyPreConfig_Read() now free 'old_old' at exit.
|
| | |
|
| |
| |
| |
| | |
* Use Py_ARRAY_LENGTH() rather than hardcoded MAXPATHLEN in getpath.c.
* Pass string length to functions modifying strings.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Python initialization now fails if decoding pybuilddir.txt
configuration file fails at startup.
_PyPathConfig_Calculate() now reports memory allocation failure and
decoding error on decoding pybuilddir.txt content from
UTF-8/surrogateescape.
|
| |
| |
| |
| |
| |
| | |
Also, deprecate the *_field_types* attributes which duplicated the information in *\__annotations__*.
https://bugs.python.org/issue36320
|
| |
| |
| |
| |
| |
| | |
(GH-12398)
|