| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Check that the size of the varnames tuple is enough at least for all arguments.
(cherry picked from commit bd47384e07bde38a8f18b90b4cea02a505d95c75)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
(#3452)
|
|
|
| |
Remove redundant PyUnicode_Check call. Use a static table for checking chars.
|
|
|
|
|
|
| |
* bpo-30789: Use a single memory block for co_extra.
* Address review comments.
|
|
|
| |
Free also co_extra->ce_extras, not only co_extra.
|
|
|
| |
bpo-30604: port fix from 3.6 dropping binary compatibility tweaks
|
| |
|
|
|
|
|
|
|
|
| |
allocated.
On PyMem_Realloc failure, _PyCode_SetExtra should free co_extra if
co_extra->ce_extras could not be allocated.
On PyMem_Realloc success, _PyCode_SetExtra should set all unused slots in
co_extra->ce_extras to NULL.
|
|\
| |
| |
| | |
Warnings could be emitted at compile time.
|
| |\
| | |
| | |
| | | |
Warnings could be emitted at compile time.
|
| | |
| | |
| | |
| | | |
Warnings could be emitted at compile time.
|
| | |
| | |
| | |
| | | |
collections.namedtuple() now supports tuples with more than 255 elements.
|
|/ /
| |
| |
| | |
functions.
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/
| |
| | |
frozensets.
|
| |
| |
| |
| | |
frozensets.
|
| | |
|
| |
| |
| |
| | |
proper API.
|
| | |
|
| | |
|
| |
| |
| |
| | |
This completes PEP 523.
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| | |
This affects documentation, code comments, and a debugging messages.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #25843: When compiling code, don't merge constants if they are equal but
have a different types. For example, "f1, f2 = lambda: 1, lambda: 1.0" is now
correctly compiled to two different functions: f1() returns 1 (int) and f2()
returns 1.0 (int), even if 1 and 1.0 are equal.
Add a new _PyCode_ConstantKey() private function.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #25843: When compiling code, don't merge constants if they are equal but
have a different types. For example, "f1, f2 = lambda: 1, lambda: 1.0" is now
correctly compiled to two different functions: f1() returns 1 (int) and f2()
returns 1.0 (int), even if 1 and 1.0 are equal.
Add a new _PyCode_ConstantKey() private function.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue #26107: The format of the co_lnotab attribute of code objects changes to
support negative line number delta.
Changes:
* assemble_lnotab(): if line number delta is less than -128 or greater than
127, emit multiple (offset_delta, lineno_delta) in co_lnotab
* update functions decoding co_lnotab to use signed 8-bit integers
- dis.findlinestarts()
- PyCode_Addr2Line()
- _PyCode_CheckLineNumber()
- frame_setlineno()
* update lnotab_notes.txt
* increase importlib MAGIC_NUMBER to 3361
* document the change in What's New in Python 3.6
* cleanup also PyCode_Optimize() to use better variable names
|
|
|
|
|
| |
This allows sys.getsize() to work correctly with their subclasses with
__slots__ defined.
|
|
|
|
|
| |
string. This change does nothing is most cases, but it is useful on Windows in
some cases.
|
|
|
|
| |
Patch by Serhiy Storchaka.
|
|
|
|
|
|
| |
Undocument the function.
Make also decode_utf8_errors() as private (static).
|
| |
|
| |
|
|
|
|
| |
The macro was introduced in #12724.
|
|
|
|
| |
This removes nested loops in PyEval_EvalCodeEx.
|
|
|
|
|
| |
PyUnicode_FromFormat() and PyErr_Format() allocates a buffer of the needed
size, it is no more a fixed-buffer of 500 bytes.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* PyUnicode_EncodeFSDefault(), PyUnicode_DecodeFSDefaultAndSize() and
PyUnicode_DecodeFSDefault() use the locale encoding instead of UTF-8 if
Py_FileSystemDefaultEncoding is NULL
* redecode_filenames() functions and _Py_code_object_list (issue #9630)
are no more needed: remove them
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Redecode the filenames of:
- all modules: __file__ and __path__ attributes
- all code objects: co_filename attribute
- sys.path
- sys.meta_path
- sys.executable
- sys.path_importer_cache (keys)
Keep weak references to all code objects until initfsencoding() is called, to
be able to redecode co_filename attribute of all code objects.
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
|
|
|
|
| |
Avoid useless unicode decoding/recoding of the filename.
|
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79060 | collin.winter | 2010-03-18 14:54:01 -0700 (Thu, 18 Mar 2010) | 4 lines
Add support for weak references to code objects. This will be used by an optimization in the incoming Python 3 JIT.
Patch by Reid Kleckner!
........
|