Solved Upgrading py36-urllib3 getting Unknown flavor 'py36'

Hi all,

a daily run tells me net/py-urllib3 needs updating, so I run postmaster against it.

It upgrades the dependencies, including python36-3.6.9 to python36-3.6.9_3, but then bails at:

Code:
py36-urllib3-1.25.7,1 Unknown flavor 'py36', possible flavors: py37 py27..

So there USED TO BE a flavour of net/py-urllib3 but now it's saying there isn't. There's definitely python36 as it just upgraded it.

What's the recommended next step?

Thanks
 
Python 3.8 is current version. As far as I know Python 3.7 comes with py37 flavor(flavor ~is Python compiler). You have to upgrade Python to at least 3.7 first, and then update .lib imo (possible flavors: py37). You could also delete .lib and try to install with pip install urllib3, but you will propably get same error.

I have Python from standard pkg manager and urllib3 1.25.8 works installed from pip (Python version 3.7.4).
I hope that helps.

I'm new to FreeBSD, why do you have ported Python?? Does it give any advantage?? I don't know much about ports and I'm courious.

Cheers.
 
Python 3.8 is current version.
The default version is actually 3.7.


What's the recommended next step?
The default Python version changed from 3.6 to 3.7 some time ago.

why do you have ported Python?? Does it give any advantage?? I don't know much about ports and I'm courious.
There is very little to gain. The only reason to build from ports (or set up your own repository) is when you want to deviate from the default settings and options.
 
According to that, the 3.6 (and 3.5) are still allowed versions. So this makes me wonder why py36 would not be known as a flavor. Does portmaster honor only the current default version?

I for my part have built the urllib3 in py36 flavor the last time on feb. 8, then I switched to py37.
 
So against all logic and in spite of the original error message, I added the following to /etc/make.conf
Code:
DEFAULT_VERSIONS+=  perl5=5.28  python3=3.6 python=3.6

and portmaster went ahead and upgraded without complaint:
Code:
===>>> The following actions were performed:
        Upgrade of py36-certifi-2019.9.11 to py36-certifi-2019.11.28
        Upgrade of py36-urllib3-1.22,1 to py36-urllib3-1.25.7,1

So was the message about there being no 3.6 flavour a lie? Who knows? Upgrading ports in FreeBSD sometimes seems unnecessarily onerous.

Thanks for everyone's input.
 
The default version is actually 3.7.
You are right ofc. 3.8 is newest, but 3.7 is default right now.

I just threw my eye on mac-ports:
Code:
https://www.macports.org/ports.php?by=library&substr=py36-urllib3
https://www.macports.org/ports.php?by=library&substr=py37-urllib3

So as we can see in general there are files for both flavors, py36 and py37. But newest Urllib3 version is 1.25.8, you have 1.25.7.

I think that in first post it was looking for newest one for default version, so for Python 3.7. But after you declared default version 3.6 I think it searched only for py36 versions. Global default version is 3.7 but now you declared in makefile that your local default version is 3.6. So in fact it was quite logical, but bit looped in logic.

Look at SirDice link:
Code:
91 # Possible values: 3.5, 3.6, 3.7, 3.8
92 # PYTHON3_DEFAULT?=       3.7
See? Seems makefile overrides default values.

Still, seems that something is not ok, as everywhere newest version of urllib3 is 1.25.8. Did you tried earlier with pip? Or pip doesn't work for ports?

That is how I see it. I'm corious if its diffrent.

Cheers
 
See? Seems makefile overrides default values.

That is exactly the purpose of that makefile: to choose a local default to override the global one.

But then, the purpose of the flavors is that you can again require any of the available ones, disregarding a global or local default. (But there I don't know if this is meant only for other ports' dependency requirements or also for end users.)

Still, seems that something is not ok, as everywhere newest version of urllib3 is 1.25.8. Did you tried earlier with pip? Or pip doesn't work for ports?

It may take a little time. pip fetches directly from some python repo, the port is configured in the FreeBSD repo. So somebody has to take notice that there is an upgrade, edit the FreeBSD ports build makefile, rebuild and propagate. Basically this packaging is for all those ports that have some python lib as a requirement, so that users just get their desktop stuff (or whatever) installed without bothering (or even knowing) about pip etc.
Heavy python users who need always the most current files will usually know about pip and how to handle things individually.
 
Did you tried earlier with pip?

No - all the ports on this system have been installed from the ports tree.

Am I right in saying this is a bug in portmaster? My intent was to upgrade py36-urllib3 - actually at the prompting of the system as it came up in a vulnerability check. So why doesn't it upgrade py36-urllib3? There's a flavour for it.
 
Back
Top