Topics discussed: Differentiating between writing down dependencies using pyproject.toml and requirements.txt, PythonMonkey - a JavaScript engine embedded in Python, Python code certification, C++ compiled code vs native code in Python, upcoming conferences, Visual Studio Code update, Python 3.12 release candidate, and Python testing course.
The podcast discusses the difference between using requirements.txt files for applications and setup.py files for packaged projects, highlighting the need for a new file or section within setup.py to handle application-specific dependencies.
The podcast introduces Python Monkey, a project that allows JavaScript code to be used within Python applications, providing the ability to import and use JavaScript functions as Python functions, integrating the power of JavaScript libraries with Python applications.
Deep dives
Python packaging: Differentiating between writing down dependencies and packages themselves
The speaker discusses the difference between writing down dependencies for applications using requirements.txt files and packaging projects using setup.py files. They explore whether the existing tools like pip and setup.py are sufficient for both purposes or if there is a need for a new file or section within the setup.py file to handle application-specific dependencies.
Python Monkey: A compatibility layer for Python and JavaScript
The podcast episode introduces Python Monkey, a project that allows JavaScript code to be used within Python applications. This is achieved by hosting a high-performance JavaScript engine inside Python through pip and setuptools. With Python Monkey, JavaScript functions can be imported and used as Python functions, enabling developers to combine the power of JavaScript libraries with Python applications. The podcast also highlights the compatibility with WebAssembly and how it opens doors for running untrusted code and integrating the Python data science stack with JavaScript.
BearType: A runtime type checker for Python
BearType is introduced as a zero-cost pure Python runtime type checker that enforces type safety at the function and method level. By using decorators and type annotations, BearType accurately detects type mismatches during runtime and reports errors, preventing potential bugs and improving code quality. The podcast discusses the benefits of BearType for dynamic typing in Python, the importance of static-type checking, and the potential use cases for the tool.
Visual Studio Code update: Error-tolerant pytest discovery
The August release of Visual Studio Code brings an update to pytest discovery, enabling error tolerance during test discovery. Previously, test suites would fail to import if there were import or syntax errors in some tests. With the update, tests with errors are skipped, allowing the rest of the test suite to proceed. Although users currently need to manually enable this feature, it improves the development experience by isolating error-prone tests and ensuring smooth test discovery.