mixmastamyk / console

Comprehensive utility library for terminals. “Better… Stronger… Faster.”
GNU Lesser General Public License v3.0
34 stars 5 forks source link

pip 24.1.1 doesn't like console #17

Open arkarkark opened 3 months ago

arkarkark commented 3 months ago

when I update pip to 24.1.1 it doesn't like console anymore.

WARNING: Error parsing dependencies of console: Invalid version: 'Darwin Kernel Version 23.5.0: Wed May  1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000'

pip says this is a valid warning

and you can no longer install console

#pip install console
Collecting console
  Using cached console-0.9907-py2.py3-none-any.whl.metadata (17 kB)
ERROR: Exception:
...
   raise InvalidVersion(f"Invalid version: '{version}'")
pip._vendor.packaging.version.InvalidVersion: Invalid version: 'Darwin Kernel Version 23.5.0: Wed May  1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000'
mixmastamyk commented 3 months ago

Hmm, I'll take a look, hopefully tomorrow. Thanks.

mixmastamyk commented 3 months ago

(copied for convenience.)

Believe the error it's coming from this in setup.py:

install_requires = (
    'colorama;            os_name == "nt" and platform_version < "10.0.10586" ',
)

1) I checked on Win/Lin/Mac and only on Windows does platform.version() return a version-like string. I think that's the root issue. A broken or at least inconsistent platform.version() result. Other available environment selectors are not sufficient to do this job.

(The job being to install colorama if using an older Windows 10 that doesn't support ANSI escape chars.)

2) This environment selector selects os_name == "nt" first, so on non-NT environments it should finish there and not go on. This is standard boolean logic, if it needs to run both tests when not necessary that's another bug/enhancement to be done.

3) Your pip/setuptools version parser can't handle real world output from platform.version. Setuptools shouldn't be strict here until platform or selectors can be fixed/redesigned.

mixmastamyk commented 3 months ago

I can remove this check, but it used to work. So in my opinion is a regression on their side.