I see FreeBSD already rolled out Python 3.12 , how quickly modules are build for it ? like py-cffi, py-cairocffi they are all 3.11 and will be there 311 versions or once 312 build - 311 will be removed ?
DEFAULT_VERSIONS += python=3.12
will build everything based on Python 3.12.pkg search . | grep ^py | wc -l
returns 4000.
Meaning there are 4000 python ports...
Where should i set it and how ? Its in Makefile of actual package ?Many, but not all, python ports have different flavors with different Python versions. Not always possible though.
But if you build your own repository (or build from ports) you can set your own defaults;DEFAULT_VERSIONS += python=3.12
will build everything based on Python 3.12.
PutI have python 3.12 i need to build py-cffi port, i go there, i run: env "DEFAULT_VERSIONS += python=3.12" make install clean - but it still builds for 3.11
DEFAULT_VERSIONS+= PYTHON=3.12
in /etc/make.confI would love to.Any chances this shakes out before the December release of FreeBSD 15?
Not sure it's possible or not.Any chances this shakes out before the December release of FreeBSD 15?
Breaking compatibility between v2 and v3 was intentional, not accidental. No such break would occur going from v3.11 to v3.12. One should always test, of course. And note that python stable version is at 3.13.7, with 3.14 to be released in a week or so.It was a major upgrade, but Python devs did a CRIME on upgrading from 2.x to 3.y, BREAKING LANGUAGE ITSELF! So I can't trust Python upgrades from the point of view with backward compatibilities.
If it was an accident, I shouldn't have used the too evil term, CRIMINAL.Breaking compatibility between v2 and v3 was intentional, not accidental.
That’s a sane thing to want but we have no real control over what language designers do. There was enough blowback that such breakage is unlikely to happen again in python.No backward compatibilities SHALL be broken until it is called as the same language of different version.
Important deprecations, removals or restrictions:
PEP 623: Remove wstr from Unicode objects in Python’s C API, reducing the size of every str object by at least 8 bytes.
PEP 632: Remove the distutils package.
...
Other Language Changes
The parser now raises SyntaxError when parsing source code containing null bytes.
...
That is a matter of opinion. I think the change from Python 2 to 3 was the right thing to do. Obviously, the details of some of the changes can be argued (was the string -> unicode design optimal?), but overall, it is a good thing to deprecate old mechanisms. The change was intended to have a 10 year (!) compatibility period during which Python 2 syntax was supported; that period ended up being significantly longer.If it was an accident, I shouldn't have used the too evil term, CRIMINAL.
I used the term because it was intentional.
> doas pkg install -q python312 uv
The most recent versions of packages are already installed
> cat cffi_test.py
from cffi import FFI
ffi = FFI()
ffi.cdef("""
int printf(const char *format, ...);
""")
C = ffi.dlopen(None)
arg = ffi.new("char[]", b"world")
C.printf(b"hi there, %s.\n", arg)
> command time uv run --with cffi --python 3.12 cffi_test.py
Built cffi==2.0.0
Installed 2 packages in 0.91ms
hi there, world.
4.17 real 2.32 user 0.28 sys
> command time uv run --with cffi --python 3.12 cffi_test.py
hi there, world.
0.06 real 0.04 user 0.02 sys
I could but i wont as then i have to start my WM inside virtual environment and i dont want.Note that if a module builds on FreeBSD unpatched, you can use it easily with devel/uv. uv will build it for you on first use and cache the build for subsequent uses.
Code:> doas pkg install -q python312 uv The most recent versions of packages are already installed > cat cffi_test.py from cffi import FFI ffi = FFI() ffi.cdef(""" int printf(const char *format, ...); """) C = ffi.dlopen(None) arg = ffi.new("char[]", b"world") C.printf(b"hi there, %s.\n", arg) > command time uv run --with cffi --python 3.12 cffi_test.py Built cffi==2.0.0 Installed 2 packages in 0.91ms hi there, world. 4.17 real 2.32 user 0.28 sys > command time uv run --with cffi --python 3.12 cffi_test.py hi there, world. 0.06 real 0.04 user 0.02 sys
I dont have make.conf and if i make one , is it ok to have just only one line in it without anything else or its not advised ?PutDEFAULT_VERSIONS+= PYTHON=3.12
in /etc/make.conf
.
Yes. But note that it may bite you in future, when the default python moves to 3.13 or higher (when you will have to remember to delete that line or change it to something newer). Basically for a long time Unix has been a beautiful idea wrapped in layers and layers of such duct tape.I dont have make.conf and if i make one , is it ok to have just only one line in it without anything else or its not advised ?
Python is far from being ultimateThat biting is exactly why I didn't give permission to release that animal:
View attachment 23810
_ _ _ _ _ _ _ _
(please fill with printed letters), there are some things down in .au that will swallow them whole.