This changelog summarizes major changes between GraalVM versions of the Python language runtime. The main focus is on user-observable behavior of the engine.
- Escaping Unicode characters using the character names in strings like "\N{GREEK CAPITAL LETTER DELTA}".
- When a
*.pyfile is imported,*.pycfile is created. It contains binary data to speed up parsing. - Adding option
PyCachePrefix, which is equivalent to PYTHONPYCACHEPREFIX environment variable, which is also accepted now. - Adding optin
DontWriteBytecodeFlag. Equivalent to the Python -B flag. Don't write bytecode files. - Command option -B works
- Implement better reference counting for native extensions to fix memory leaks
- Fix a warning in pandas about size of datetime objects
- Make many more CPython unittests pass for core types
- Support parse requests with arguments for embedding Python to light up GraalVM Insight support
- Support basic tox usage when forcing virtualenv to use venv
- No longer support iterables as arrays in interop
- Add initial support for HPy native extensions
- Support magic encoding comments in Python files
- Improve chaining of exception tracebacks - the tracebacks should now be much closer to CPython and more helpful
- Update language support target and standard library to 3.8.2
- Improve performance of tuples with primitive elements
- Improve performance of using Python sequences from other GraalVM languages
- Improve performance of dictionaries and sets
- Improve performance of allocations for list comprehensions with range iterators
- Support
cProfileandtracemodules through the GraalVM CPU sampler and coverage, respectively - Support NumPy on macOS
- Support setuptools-scm and pytz.timezone
- Support new syntax for iterable unpacking from yield and return statements
- Fix issues with inspection and printing of non-Python numbers in the Chrome debugger
- Fix issues with AST sharing across different contexts, if these context run concurrently on multiple threads
- Fix code serialization and deserialization with pickle
- Fix DirEntry.stat
- Fix passing non-ASCII strings to
gethostbyname - Fix
help(numpy)to work again in the interactive REPL - Fix multi-line continuation in the REPL for opening parens
- Fix
select.selectfor pipes - Polyglot: Rethrow AttributeError as UnknownIdentifierException in invokeMember
- Jython mode: treat Java
nullas identical to PythonNonewhen comparing with theisoperator - Jython mode:
isinstancenow works with Java classes and objects - Improve errno handling in
posixmodule - Move all GraalPython specific functions on
sysorbuiltinsto the__graalpython__module
- Jython Compatiblity: Implement
from JavaType import *to import all static members of a Java class - Jython Compatiblity: Implement importing Python code from inside JAR files by adding
path/to/jarfile.jar!path/inside/jartosys.path - Added support for date and time interop.
- Added support for setting the time zone via
Context.Builder.timeZone. - PEP 570 - Python Positional-Only Parameters implemented
- Implement
gc.{enable,disable,isenabled}as stubs - Implement
charmap_buildfunction - Implement
hexversionin sys module - Implement
_lzmamodule - Implement enough of
socket.socketto rungraalpython -m http.serverand download non-encrypted http resources - Fix printing of Pandas data frames
- Fix a bug in
bytes.startswithfor tuple arguments - Fix destructuring assignments of arbitrary iterators
- Fix
dict.__contains__for dictionaries with onlystrkeys for subclasses ofstr - Support NumPy 1.16.4 and Pandas 0.25.0
- Support
timeitmodule - Support basic usage of
pytest - Improve performance across many Python and C extension benchmarks
- Improve performance of our parser
- Improve performance of catching exceptions when the exception does not leave the handler block and the traceback is not accessed
- Improve performance of Java interop when Python objects are accessed from Java
- Add a new
--python.EmulateJythonflag to support importing Java classes using normal Python import syntax and to catch Java exceptions from Python code - Update standard library to Python 3.7.4
- Initial implementatin of PEP 498 -- Literal String Interpolation
- Implement PyStructSequence_* C API functions
- Implement
_functools.partialas a class instead of a function - Implement
type.__base__ - Implement reading C API type attributes
nb_inplace_add,nb_remainder,nb_subtract, andnb_floor_dividefor builtin types - Implement C API functions
_PyObject_CallFunction_SizeT,PyEval_InitThreads, andPyEval_ThreadsInitialized - Implement writing to a function's
__dict__field - Implement the C API thread state fields
overflowedandrecursion_depth - Fix printing of errors in the REPL
- Fix printing full paths in traceback
- Support the C API varargs functions with arbitrary numbers of arguments instead of imposing an upper limit
- Improve performance of attribute reads and reading closure variables
- Add
java.add_to_classpathAPI to dynamically extend the host class path - Allow write access to main module bindings for embedder
- Swap arguments for
polyglot.export_valueto use the more natural (name, value) order and deprecate the previous argument order. - Update Python standard library files to Python 3.7.3
- Improve performance of exceptions that do not escape
- Fix str(None) to print "None" instead of an empty string
- Fix error messages on polyglot objects to not leak implementation class names of those objects
- Fix erroneously frozen package paths in pre-initialized python modules
- Fix caching of core sources in a native image with a preinitialized context for pre-built images and libpolyglot fast startup
- Implement pwd.getpwuid
- Implement os.exec, os.execv, and os.execl
- Add some missing C API headers needed for tensorflow compilation
- Fix an issue preventing use of encodings in the installable binary
- Fix return value of process when
os.exitis called with a boolean - Fix interpretation of foreign objects to prefer interpreting them as integer over double
- Fix performance regression when repeatedly creating a new function in a loop
- No user-facing changes
- Implement PEP 487
__init_subclass__ - Implement PEP 560
__class_getitem__and__mro_entries__ - Migrate to Truffle libraries for interop
- Support the buffer protocol for mmap
- Support importing java classes using normal Python import syntax
- Improve performance of literal dictionary creation when the first but not all keys are strings
- Improve performance of getting the length of a string
- Improve performance of accessing defaults, keyword-defaults, and code of a function
- Fix getting file separator from the Truffle filesystem rather than the operating system
- Fix constructing and calling methods with non-function callables
- Fix execution of subprocesses with non-default python homes on JVM
- Mark a subset of the Graal Python launcher options as "stable". All other options are subject to change and need to be unlocked explicitly on the commandline.
- Automatically install pip when creating a venv. The socket and ssl libraries are still not functional, so pip can only install from local sources or wheels.
- Update the standard library to Python 3.7.0 from 3.6.5.
- Support the
-Iflag to ignore the user environment and not add the working directory tosys.path - Fix an error preventing usage of the memtracer tool. If an object raised an exception in it's
__repr__method, it would abort the execution. - Fix issues around not being able to modify function defaults, keyword defaults, or re-defining a function with a different closure.
- Fix continuation prompt in the interactive Python shell when an incomplete statement was typed. Before it raised and ignored a SyntaxError.
- Fix frame restarting of Python functions in the Chrome debugger. Before, functions with closures would have their cells accidentally cleared.
- Support marshal.dumps and marshal.loads for code objects and some other built-in objects
- Fix installation of NumPy in a venv
- Initial support for module mmap
- Support debugging with workspace files in the Chrome debugger
- Support the PEP 553 breakpoint() message
- Support running weak reference callbacks and signals on the main thread
- Support the
__class__variable in the class scope - Support module-level docstrings
- Initial support for the
venvstandard-library tool - Initial support for the built-in
_bz2module - Initial support for the
pandaspackage - Initial support for OSError subclasses based on the
errnoof the exception - Fix bytearray inplace add to return the same object
- Fix access to standard Python methods (
__repr__,__str__,__len__and the like) for foreign objects
- Support running setuptools to build and install various packages
- Support running a source release version of NumPy out of the box
- Improve performance of member access to C API objects
- Improve performance of binary operations on C API objects
- Add support for
yield from - Support assignment to
object.__dict__and ensure that managed subclasses of native types also have a__dict__ - Fix
[]access with non-integer keys for array-like foreign objects - Fix various performance regressions introduced in the last RC
- Implement more built-in methods on the
timemodule - Python no longer exposes internal languages through
polyglot.eval - Improve performance of
os.scandirand functions that build on it (such asglob) - More correct implementation of standard streams, including buffering
- Properly support the
-mswitch to run modules - Support the standard
zipfilemodule - Add the built-in
_cvsmodule - Add support for
__slots__ - Allow arbitrary callable objects in methods, not only functions
- Report that we have a TTY console if we are launched on a Terminal through our launcher
- Add the
ginstallcustom module to install known packages such as NumPy and setuptools
- Improve performance of C API upcalls
- Improve performance of classmethods, staticmethods,
globals(), andlocals() - Improve performance of various string and bytes operations
- Initial support for the
_threadbuiltin module (actual multi-threading is still disabled, the API defaults to a dummy implementation) - Implement the
zipimportermodule - Support assignment to
object.__class__ - Use the new Truffle filesystem API to get/set the current working directory
- Attempt our best to report side-effects in KEY_INFO
- The KEYS message now responds with attributes and methods, never dict keys
- Support the
inputbuiltin - Add DEBUG launcher options for performance debugging
- Ensure context isolation for file descriptors and child PIDs
- Fix passing custom locals and globals through
execandeval - Fixes to builtin
help
- Support
helpin the builtin Python shell - Add
readlineto enable history and autocompletion in the Python shell - Add support for the -q, -E, -s, and -S Python launcher flags
- Improve display of foreign array-like objects
- Improve support for string and bytes regular expressions using our TRegex engine
- Support loading site-packages installed with easy_install
- Initial support for the
binasciimodule
- Report allocations when the
--memtraceroption is used - Initial support for
picklemodule
- Enhance the
javainterop builtin module with introspection utility methods
- Support regular expression patterns built from bytes by using CPython's sre module as a fallback engine to our own
- Support LLVM 5+ for C extension modules
- Introduce native sequence storage so that e.g. Python bytes exposed to C can be mutated
- Introduce lazy string concatenation to significantly speed up benchmarks where strings are concatenated repeatedly
- C-API improvements to support more scikit-learn code
- Fix our distinction between builtin functions, functions, and methods to make the classes for builtin functions equivalent to CPython
- Improve set, frozenset, and dict support
- Attach Python exceptions as cause to ImportErrors raised for C extension modules
- Update standard library to CPython 3.6.5
- Support more code object attributes
- Support constant type ids for objects that are interned on CPython
- Add collections.deque
- Document how to contribute
- Improve efficiency of generators
- Enable re-use of ASTs in multiple Contexts in the same Engine
- Generator expressions now properly evaluate their first iterator in the definition scope at definition time
- Fixes for embedders to ensure top scopes are stable and local scopes always contain TruffleObjects
- C-API improvements to support simple Cython modules
- Support recognition of Python source files with the polyglot launcher
- No changes
- Support for more String encodings
- Implement buffered I/O
- Remove our random module substitute and use the standard library implementation
- Fix a potential thread-safety problem with cached parse trees when multiple Python contexts are used from multiple threads
- Complete support for math module builtins
- C-API improvements to run simple scikit-learn and NumPy examples
- Support the buffer protocol to wrap arbitrary Python sequences with no copy into NumPy arrays
- Updates to the polyglot and embedding APIs
- Many additions to the language core implementation
- Performance improvements to the parser
- C-API improvements to compile and run simple C extensions
- Support breakpoints on caught and uncaught exceptions in debugger
- LICENSE set to The Universal Permissive License (UPL), Version 1.0.