Lambda Python 3.10 Runtime Supported
The Python 3.10 runtime brings the latest and greatest LTS version of Python 3.10 to Lambda, and as of today, it is officially supported in Lumigo!
What's new in the Python 3.10 runtime
What makes the Python 3.10 runtime very interesting is the structural pattern matching addition allowing to use patterns to match against data structures such as lists, tuples, and dictionaries and run code based on the match. Structural pattern matching lets you write code that processes complex data structures more easily and can help you improve code readability and maintainability.
Python 3.10 has also improved error messages providing more context about the error, such as the line number, the location where the error occurred, and the exact nature of the error. Additionally, Python 3.10 error messages provide more helpful information about how to fix the error, such as suggestions for correct syntax or usage.
Other nice additions to Python 3.10 are a new syntax for parenthesized context managers, making it easier to read and write code that uses the “with” statement, which simplifies managing resources such as file handles or database connections, ensuring they are released correctly, writing union types as
X | Y instead of the previous versions’ syntax of typing
Union[X, Y] and use user-defined type guards to handle custom data types or to refine the types of built-in types that aim to reduce boilerplate code and improve readability and maintainability.
What do you need to do in Lumigo to use the Python 3.10 runtime?
Just turn on Lumigo autotracing as always. If you went ahead and adopted Python 3.10 already, and Lumigo told you the runtime is not supported, by now you will have noticed that Lumigo set up autotracing for your Python 3.10 functions that you selected for autotracing in the UI. Of course, also using the
lumigo:auto-trace=true AWS Tag is supported. Nice and easy :-)