Core Electronics Forum

Python Releases

Hi all you Python Gurus out there.
Just thought I might have a bit of a look at Python as it seems pretty popular. Opened up the Python releases for Mac OS on the web site and took note of release dates for Mac OS 64 Bit Intel Installer.

I found a new release almost every month. For instance Python 3.9.1 released 07/12/20 and Python 3.9.7 released 30/08/21 with all the others in between.

Does this mean that to stay up to date one has to update the release every few weeks. Also would these new releases be backward compatible or does one have to start again with each new download.

I do appreciate that Python is an active live system but this seems pretty frequent.
Thanks in anticipation.
Cheers Bob

4 Likes

Hey Bob,

That’s a really good question :slight_smile:

Python uses semantic versioning (see: https://semver.org/ ). Thus version numbering scheme is: MAJOR.MINOR.PATCH

So the regular updates are mostly just bug fixes. Minor updates (a change to the second digit) are backwards compatible. Major updates break compatibility.

To stay fully up to date, yes, you should regularly update but most of the time the changes are non-critical so 99% of the time there’s no noticeable difference for the end users.

If you have a read over the changelog you can see most of the fixes in 3.9.7 from 3.9.6 are for edge cases: Changelog — Python 3.9.7 documentation

Cheers,
Oliver

5 Likes

Hi Oliver
Thanks for that. I thought as much as Python would not last long if you had to start from scratch every time there was a change.

I asked the question as browsing through the forum some have had problems with Python and RPi and some of the suggested fixes seem to be change the version of Python or RPi until you find a combination that works… Suggesting that different versions of RPi require different versions of Python. In my book a very unsatisfactory situation. Of course a good percentage of this is finger trouble and there are many thousands of RPis out there. But there seem to also be many people having compatibility and other problems. There seems to be enough of it to turn me off dabbling with RPi and Python in the past as it all seemed a bit too flakey. I actually get the impression sometimes that some of this maker (for want of a better word) stuff is put to market a bit early without extensive testing. In other words the maker community is the final test room. This is not singling out a specific device but that is the impression I get in general sometimes.

I also realise that some products are trying to be used in a way they were not designed for. That is not a good idea mostly. But, if I purchased an item that was supposed to do a specific job I would expect it to do that job with minimum of fuss. Not have to start swapping hardware and software versions around to get a match. To me that is not fixing a problem.

Having said all that I might just purchase a bit of hardware and download Python and try to get a bit of first hand knowledge for myself. On the TO DO list. Get in the queue.
Cheers Bob

4 Likes

Hi Bob,

Here’s a couple of tutorials that you may be interested in if you’re getting started with it. Once you’ve got enough of the basics and understanding of how the libraries can be applied as it’s quite high level you can very quickly and relatively easily use it for just about anything you’d like, from interpreting barcodes to automating RC vehicles.

Ah yes, the advantage of modern high-level programming. Specific hardware in most applications will always outperform generic solutions (look at crypto-mining for example), although the advantage in education for example or rapid deployment of solutions is very useful indeed.

3 Likes

Hi Bryce
Thanks for that. Will have a look. If I download the latest I should be able to have a fiddle before I go out and purchase too much hardware I think. There seems to be a wealth of info and tutorials around.

I always find this sort of thing easier if I have a goal to work towards. I have some difficulty getting the hang of anything if just sitting down inventing code for inventing’s sake. In other words for no apparent use
Cheers Bob

4 Likes

Hey Bob,
Another idea might be to go for a different variation of Python - Micropython; its a spin off with some parts stripped away for use with microcontrollers like the RPi Pico (not the single board computers that Raspberry Pi foundation are known for).

The setup is quite a bit easier (see Michael’s tutorial) and I have converted all of my super quick projects to the Pico’s for ease of use and cost.

All of the Core made sensors by the name of PiicoDev are compatible with Micropython and tutorials exist for all of them.
The documentation for the pre-made modules are also really well documented, feel free to check them out here: Quick reference for the RP2 — MicroPython 1.16 documentation

If you are after the full fledged version of Python depending on the project you usually are good with sticking with a Mac or PC.
For most Makers the RPi excels as a low cost and accessible computer to get into programming/robotics, running automation tasks like an adblocker(Pi Hole), 3D printing webserver or using the GPIO/other peripheral connectors to control things like relays etc

If you’re after some documentation on the Pi’s themselves there is lots to read through on their website: Raspberry Pi Documentation - Getting Started

4 Likes

Thanks Liam
A fair bit to look in to.
Cheers Bob

3 Likes

I’ve been playing this to learn new programming languages - nothing beats using them to solve a problem, and this is a quick way to learn syntax and builtin functions (mainly string handling, but still a good first step).

3 Likes

I’ve been working on my python too lately, and just came across this great resource:
https://www.pythonlikeyoumeanit.com/index.html

Really handy for when you’re looking to do more maths intensive projects with Python

1 Like

As far as Python releases go, Python is fully backwards-compatible within each major version. So if you get some code working in Python 3.9.1, it is guaranteed to still work under Python 3.23.7. Major releases do not maintain this, so code that works in Python2 is not guaranteed to work in Python3, but these major release bumps happen very rarely.

x.y.z

  • Change in x - possible breaking changes, redevelopment necessary
  • Change in y - adds features, so you can’t go backwards if you’ve used the new features
  • Change in z - bugfix only, unless you’re experiencing the specific bugs, no real difference in either direction
4 Likes

Hi All
Thanks to everyone for hints, information and links to tutorials etc.
If I can see some light at the end of the tunnel soon I will try to make some sort of a start. If only to gain some knowledge of what others are writing about.
Cheers and many thanks Bob

4 Likes