A question on upgrading

130 views
Skip to first unread message

David Manns

unread,
May 29, 2025, 5:09:34 PM5/29/25
to py4web
The docs suggest that to upgrade a source code installation (such as in development or on pythonanywhere as per the tutorial), now that everything is uv based, one should essentially start over from scratch.

This seems a bit onerous, to say the least.

Pre uv I would simply do a 'git pull' and possible "pip install --upgrade -r requirements.txt" and all was fine.

Is there an equivalent lightweight process?

Thanks
David


Massimo

unread,
May 30, 2025, 1:59:16 AM5/30/25
to py4web
It is indeed a different workflow but it not heaver. uv maintains it own cache of packages and will not reinstall things that have not changed. 

I have not tried but you should be able to generate a requirements.txt from the provided lock file:

David Manns

unread,
Jun 1, 2025, 8:56:44 AM6/1/25
to py4web
It would be nice to have a standard process for updating a development environment in vscode that gives a lightweight way to update master AND it's dependencies. I've seen different suggestions as to how to generate a requirements.txt file? Would running 'make assets' on the make any necessary changes to the venv after a git pull?

David Manns

unread,
Jun 1, 2025, 9:33:24 AM6/1/25
to py4web
for "on the make" please read "on the terminal"!

Massimo DiPierro

unread,
Jun 1, 2025, 11:41:42 AM6/1/25
to David Manns, py4web

I will add a make option "make requirements"

You should never really need to use make assets. It is only used to build for publish to pypi


On Sun, Jun 1, 2025, 6:33 AM David Manns <dgm...@gmail.com> wrote:
for "on the make" please read "on the terminal"!

--
You received this message because you are subscribed to the Google Groups "py4web" group.
To unsubscribe from this group and stop receiving emails from it, send an email to py4web+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/py4web/317f5214-1d8f-4f3d-a24b-249bc15d5f6bn%40googlegroups.com.

David Manns

unread,
Jun 2, 2025, 8:23:45 AM6/2/25
to py4web
Sounds good.

I note that in the docs https://py4web.com/_documentation/static/en/chapter-03.html#setup-procedures 'Installing from source (globally)' calls for using 'make assets' and 'make test'.

Massimo DiPierro

unread,
Jun 2, 2025, 10:46:03 AM6/2/25
to David Manns, py4web

Now that I think about it. It needs "make assets" in order to be able make new apps. Anyway, will review the instructions


David Manns

unread,
Jun 4, 2025, 2:25:54 PM6/4/25
to py4web
Another question is what is the most recent version of python supported. The docs simply state it needs python>=3.8. Wanting to make sure that potential users of my app don't run into problems with py4web installation, I created a new test account on pythonanywhere and installed py4web using the instructions for Installing from source (globally):

cd py4web 
make assets 
make test 
python -m pip install . 
py4web setup apps 
py4web set_password 

Pythonanywhere defaults new accounts to run using python 3.13
In make test there was an error, and 2 tests failed. I attach the recorded session (quite verbose as all the dynamic updates are recorded), stopped after 'make test'.

One can set the Pythonanywhere account to use different versions of python. I redid this using python 3.10 and it ran error free. I haven't tested with 3.11 or 3.12. What is officially supported?
session.txt

David Manns

unread,
Jun 4, 2025, 2:51:38 PM6/4/25
to py4web
... I continued to complete the installation on 3.13 and installed my app. While I haven't tested exhaustively, it seems to be working fine in that environment, so perhaps the problems with 'make test' are not too significant?

David

Nico Zanferrari

unread,
Jun 4, 2025, 4:06:13 PM6/4/25
to David Manns, py4web
Hi David,

the most recent version of python (3.13.4) is supported - and I think that no compatibility problem is known. Except the "make test", it seems ;-(

Nico

Nico Zanferrari

unread,
Jun 4, 2025, 4:15:59 PM6/4/25
to David Manns, py4web
Also, on my latest Ubuntu, and a venv Installing from source (locally), it seems I have no problem:

================================ tests coverage ================================
_______________ coverage: platform linux, python 3.13.3-final-0 ________________

Coverage HTML written to dir cov.html
============================= 27 passed in 27.02s ==============================

Looking at your session.txt, I see "OSError: [Errno 98] Address already in use" - maybe port 8001 was already in use?

Nico

David Manns

unread,
Jun 4, 2025, 4:24:19 PM6/4/25
to py4web
I think its quite possible that there was some kind of leftover process involved. Looks like there is no real problem, I will keep going with 3.13, time for a new venv on my development system.

David

David Manns

unread,
Jun 7, 2025, 4:43:13 PM6/7/25
to py4web
A couple of notes on "make requirements". I'm using it in my vscode development environment where I have py4web installed from source.

1) if requirements.txt already exists it says that requirements.txt is up to date. I had to delete requirements.txt and rerun make requirements to update the pydal requirement for the latest version.

2) it seems that the requirements.txt redundantly installed the latest release of py4web into my venv via pip install. I pip uninstall'ed it and everything is fine.

Ali

unread,
Jun 8, 2025, 6:12:49 PM6/8/25
to py4web
I'm a bit confused—does the following command no longer work for upgrading py4web? I believe I recently used it without any issues.

 python -m pip install --upgrade py4web --no-cache-dir

Tom Clerckx

unread,
Jun 9, 2025, 6:28:47 AM6/9/25
to py4web
The command you provided is OK.
Installing it via pip is the standard way of installing (and updating) py4web

As mentioned in the documentation, there are also other ways to install py4web (e.g. from source or from binaries)
Reply all
Reply to author
Forward
0 new messages