datapythonista – Telegram
datapythonista
218 subscribers
69 photos
1 video
22 links
Data, Python, Free Software and Memes
Download Telegram
Channel created
A short introduction to versions. This convention is widely used in Python, but not always, and not limited

The version as 3 numbers, separated by periods: <major>.<minor>.<release>. For example: 3.1.2.

- 0.1.0: A first value (named major) 0 shows that the software is still not considered mature, and also big changes can happen to the API, that could possibly break our code. The use of the two other values will be used in a not standardized way.
- 1.0.0: Reaching the version 1 means that the software is considered mature for production use (even if in many cases very mature software use a 0 major for years), and that the convention below will start to be used
- 1.0.1: The increase in the last number (named release) shows that bugs were fixed, and nothing was added (like new features). As a user, you should also use the latest release available for your version.
- 1.1.0: The increase in the middle number (named minor) means that this new version contains new features, not only bug fixes, but that code working in an older version of the same major, should still work.
- 2.0.0: The increase in the major, means that new features have been implemented, possibly with major changes or additions. But that code of older majors may break. Before updating to a major, you should update to the immediate version before, and make sure you address any FutureWarning or DeprecationWarning in your code.

Versions can have suffix such as:
- pre: for a release candidate, to let users try it and report possible errors before the release
- post: to fix errors in a release not affecting the code
- dev: usually for unreleased code, and after dev it's included the last commit in the repository

The full Python standard for versioning is: https://www.python.org/dev/peps/pep-0440/
😁2
👍1
Some notes on Python package managers:

- pip works fine for Python dependencies, but if you have a package that depends on a C library, pip will fail with a not so useful error, and you will have to go to your OS package manager (apt-get, brew...) and find and install the missing package before you run pip again.

- Also pip does not allow to install different Python versions.

- conda was created by Anaconda to address the first issue. With it's own repository of packages, and then conda-forge was created as a community maintained repository of packages, making the original Anaconda repository obsolete for most cases.

- As the number of packages grew, the conda solver became slower, and for the last years, a simple conda install command can take forever. Conda seems mostly unusable today.

- Mamba is a wrapper around conda, using the same command line options, with several performance improvings. The main one is a totally different solver which seems to be immediate in most cases.

- For simple environments pip and virtualenv is a good choice, since it's disk requirements are much smaller than conda or mamba. For environments with specific Python versions, or non-Python dependencies, mamba is the best approach. I'm not aware of any use case where I'd recommend conda.

To install mamba use mambaforge: https://github.com/conda-forge/miniforge#mambaforge
In-person Python conferences are back. Still some uncertainty, and not all them confirmed, but those are on the works:

- PyCon DE / PyData Berlin, April 11, Berlin

- PyCon US, April 27, Salt Lake City

- @europython, July 11, Dublin

- @euroscipy, beginning of September, Basel, unconfirmed

- @scipyla, September 26, Salta
👍1
Same with pandas... 😅
😁2
For several years it's been possible to have a Python terminal in the browser. pythonanywhere.com was probably among the first to provide this. More recently, mybinder.org offered a full Jupyter experience without the need to install anything locally. All these technologies had a JavaScript terminal in the browser, and a backend able to run Python code, that was costly to host.

Just few days ago it was announced a new paradigm to the game: JupyterLite. A JavaScript terminal, powered by WebAssembly (using Pyodide). The idea is similar for the terminal, but there is no need for a backend, since Python is executed in the client browser using WebAssembly. You can deploy a 100% static site, and your users will be able to execute Python code. It also can provide complex dependencies like numpy and pandas.

You can read more in this blog post: https://blog.jupyter.org/jupyter-everywhere-f8151c2cc6e8 and you can try it in numpy.org. It takes a while to execute the first cell, while it needs to download and load all files internally required, but after that wait, it's fast and seems to work quite nicely.
🔥2👍1
If reading programming books was just as effective....
👍2😁1
A short list of movie classics about free software, computers and data:

2001: A Space Odyssey (1968)

TRON (1982)

WarGames (1983)

The Matrix (1999)

Pirates of Silicon Valley (1999)

Revolution OS (2001)

Antitrust (2001)

The Code (2001)

CitizenFour (2014)

The Imitation Game (2014)

More suggestions? Add a comment.
🔥1
Thanks Linus and team for 17 years of amazing version control
🎉7