Can you upgrade python to latest version

Hey @hackerbaby41 I’ve merged your request with an existing one; I suggest you add your vote here.

For Python / pip and Python3 / pip3 we rely on the Ubuntu Xenial package sources, and to get the most recent release of any of the Python libraries we would need to rely on a non-Ubuntu ppa or we would have to install from a tarball. That’s probably not something we’re going to add in the near future, particularly since Python support isn’t our main focus right now.

You might be able to install into user space (i.e. without needing sudo) from a tarball of the latest, but I haven’t tried that, and it would take up project disk space, which might also be problematic.

3 Likes

I’d love to see python 3.7 support on Glitch!

1 Like

I wanted to know is Glitch even planning to support Python3.6+ anytime soon

1 Like

Hey @FireFeathers06, welcome to the Glitch forum!

You might want to keep an eye on Can you upgrade python to latest version. I’m going to move this post to that topic, too. Feel free to add your vote!

1 Like

yes, i really need this in order to add some needed projects to glitch
i can’t install from the tarball because i run out of disk space

This is a real pain point for me.

I’m building open source tooling (Datasette and many associated projects) which I want to work well with Glitch - I’ve already built https://glitch.com/~datasette-csvs and I want to get into the habit of creating remixable Glitch demos of every new feature I ship.

Increasingly the Python open source ecosystem is releasing libraries that no longer support 3.5. The most recent example is http3 - I used that for my https://github.com/simonw/datasette-auth-github plugin and as a result it doesn’t work on Glitch.

I’m committed to getting my stuff to work on Glitch, but that means that increasingly I can’t rely on other open source Python projects. I’d love to see Glitch upgrade to 3.6 or (even better) 3.7 at some point soon.

2 Likes

Hi @simonw, welcome to the Glitch forum!

Upgrading python to a better-supported version is high on our list of packages to update when we release our next container update, and we know it’s important to a lot of y’all too. We’re actively working on it, and hope to be able to release it “soon”, although I can’t guarantee any particular timeline.

Sorry for the inconvenience!

2 Likes

+1 on python3.6+ support! To add to what @simonw said, any package that uses in-code typehints or f-strings won’t work on 3.5, both of which are frequently used in new python packages.

(Also, i learned that glitch supports python from a @simonw datasette tweet, so +1 to helping him share more features & spread the word!)

1 Like

I’m still trying to make asyncio HTTP requests from Glitch - I thought I could do it by switching from http3 to aiohttp - but I just found out that aiohttp requires 3.5.3 at least: https://aiohttp.readthedocs.io/en/stable/faq.html#why-is-python-3-5-3-the-lowest-supported-version - and Glitch is running 3.5.2!

The quest continues.

2 Likes

I got my stuff working! I ended up having to roll my own asyncio HTTP request function because none of the existing libraries for that support Python 3.5.2 - details here: https://github.com/simonw/datasette-auth-github/pull/40

2 Likes

I have aiohttp working on Glitch. aiohttp==2.3.10

Hey,

Just pitching in that I also think adding 3.6 compatibility would be a real killer improvement for running Python apps on Glitch.

3.6 introduced inline type hints along with other now widely-used syntax additions such as f-strings. As a result, a lot of modern libraries and projects can’t be used below 3.6.

My personal use case is a Starlette demo app which I can’t get to run on 3.5.

Do you guys have any timeline visibility on when Python containers are going to be upgraded?

Thanks!

Hello @florimondmanca, we don’t have an estimate of when our next container update will be released, but updating Python is high on the list of changes we hope to make when we do release an update; sorry for the delay!

I don’t know that we can help getting your project running on Python 3.5, but I can’t find a project there if you did want someone to take a look.

1 Like

Yeah some modules like discord.py (a main module I use for my projects) only have support for 3.5 with the older versions of the module. Using the updated version requires 3.6+ so Ive been using other services for the time being to host my projects, when python 3.6 support is released Ill be sure to move it all over as the glitch site is way better organised and doesnt require me to use sites like GitHub to host my code.

2 Likes

Not piling in, but I’m also seeing this too. (Not as a Glitch user, but as someone wanting to make sure my packages are supported on Glitch. :smiley:)

The latest Python ‘websockets’ package just dropped 3.5 support, which means I’m probably also dropping 3.5 support from the ‘uvicorn’ webserver. There’s a few corners of the Python ecosystem that’re still supporting it (eg. aiohttp), but for anything using async it’s generally 3.6+ since there’s some big pain points associated with attempting to support 3.5. (Eg. no async generators.)

Also worth noting that EOL for security updates to 3.5 is only 12 months away now… https://devguide.python.org/#status-of-python-branches

Hiya @tomchristie, welcome to the Glitch forum and thanks for the additional context!

Vote for 3.7, as the minimal python version :wink:

3 Likes

I think this has happened! I just launched a new Glitch project and it appears to have Python 3.7.5!

1 Like

Yeah! We only updated it earlier this week and have been monitoring how it’s going before widely saying anything - do let us know if you encounter any unexpected issues!

2 Likes

I’m getting an error right now when running “pip3 install datasette --user” - which worked before.

Looks like the problem is the httptools dependency which is trying to compile a C dependency, but failing because the Python.h header file (usually installed using “apt-get install python3-dev”) isn’t available.