Python Byte 69: Quantum, Notebooks, PyTest & Python 2 EOL
Notebooks and Python Development
Simplifying Notebooks with PYNB
• A listener recommendation highlighted PYNB, a tool that allows for a round-trip conversion between Jupyter Notebooks and plain Python code with embedded markdown.
• This approach makes notebooks much friendlier for version control systems and code reviews, as they become standard text files.
Advancements in Quantum Computing
Q# and Python Integration
• Microsoft has introduced Q# (Q Sharp), a language designed for quantum computing, which is now available for macOS and Linux.
• Despite the scarcity of physical quantum computers, developers can utilize an emulator to test code.
• Significantly, developers can now use Python to interface with and program these emulated quantum environments, bridging the gap between data science and experimental computing.
PyTest Best Practices and Tools
• Insights from a PyCon ES talk highlighted several useful PyTest plugins and testing utilities:
• PyTest Django: For seamless integration with Django projects.
• Model Mommy: Useful for mocking Django models.
• Freeze Gun: Allows developers to freeze time at a specific point in tests.
• Eradicate: An interesting tool that removes code comments for a cleaner look.
• A new, official reference page for the PyTest API is now available at PyTest.org for easier documentation access.
Industry Insights: Stack Overflow Survey 2018
"The future is already here. It's just not evenly distributed."
• Key trends from the 2018 Developer Survey include:
• Python usage has surpassed C# for the first time.
• 55% of professional developers contribute to open source projects.
• A significant drop in the feeling of competition occurs among developers as they gain more experience.
• Visual Studio Code has emerged as the most popular editor.
Python 2 End of Life
• A definitive statement from Guido van Rossum confirms that Python 2.7 will reach its absolute End of Life (EOL) on January 1st, 2020.
• There will be no security patches or updates provided by the PSF or core developers after this date, emphasizing the urgent need for migration planning.