Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch library not maintained anymore #872

Open
1 task done
ShuffleWire opened this issue Dec 29, 2024 · 2 comments
Open
1 task done

Patch library not maintained anymore #872

ShuffleWire opened this issue Dec 29, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@ShuffleWire
Copy link

Bug description

Hello,

From what I'm seeing, https://github.com/techtonik/python-patch is not maintained anymore, is it possible to switch to https://github.com/conan-io/python-patch-ng ?
Detected it because it cause me trouble while installing aqt
on Debian 12, it's already packaged by python3-patch-ng

Expected behavior

Patch-ng should be used

aqt and python version

3.1.21 on python 3.11.2

Operating System

Linux/Unix

Relevant log output

the log about patch not installing correctly

Collecting patch>=1.16 (from aqtinstall)
  Using cached patch-1.16.zip (12 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [36 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-_tobogrf/patch_ec02cd6138d548d48ad403b42fcd3249/setup.py", line 3, in <module>
          setup(
        File "/home/yann/.local/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 145, in setup
          _setup_distribution = dist = klass(attrs)
                                       ^^^^^^^^^^^^
        File "/home/yann/.local/lib/python3.11/site-packages/setuptools/dist.py", line 313, in __init__
          for ep in metadata.entry_points(group='distutils.setup_keywords'):
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 1040, in entry_points
          return SelectableGroups.load(eps).select(**params)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 476, in load
          ordered = sorted(eps, key=by_group)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 1037, in <genexpr>
          eps = itertools.chain.from_iterable(
                                             ^
        File "/usr/lib/python3.11/importlib/metadata/_itertools.py", line 16, in unique_everseen
          k = key(element)
              ^^^^^^^^^^^^
        File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 954, in _normalized_name
          or super()._normalized_name
             ^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 627, in _normalized_name
          return Prepared.normalize(self.name)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 882, in normalize
          return re.sub(r"[-_.]+", "-", name).lower().replace('-', '_')
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3.11/re/__init__.py", line 185, in sub
          return _compile(pattern, flags).sub(repl, string, count)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      TypeError: expected string or bytes-like object, got 'NoneType'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

Code of Conduct

  • I agree to follow this project's Code of Conduct
@ShuffleWire ShuffleWire added bug Something isn't working triage labels Dec 29, 2024
@tsteven4
Copy link
Contributor

tsteven4 commented Dec 30, 2024

perhaps using pathc-ng is a good idea, but I can't reproduce your problem. I tested with bookworm from https://hub.docker.com/_/debian. I tried with wheel installed. I also tried with pip-24.3.1.

root@913242b70303:~# python3 -m venv ~/venv
root@913242b70303:~# . ~/venv/bin/activate
(venv) root@913242b70303:~# pip3 install aqtinstall
Collecting aqtinstall
  Using cached aqtinstall-3.1.21-py3-none-any.whl (59 kB)
Collecting bs4
  Using cached bs4-0.0.2-py2.py3-none-any.whl (1.2 kB)
Collecting defusedxml
  Using cached defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
Collecting humanize
  Using cached humanize-4.11.0-py3-none-any.whl (128 kB)
Collecting patch>=1.16
  Using cached patch-1.16.zip (12 kB)
  Preparing metadata (setup.py) ... done
Collecting py7zr>=0.22.0
  Using cached py7zr-0.22.0-py3-none-any.whl (67 kB)
Collecting requests>=2.31.0
  Using cached requests-2.32.3-py3-none-any.whl (64 kB)
Collecting semantic-version
  Using cached semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)
Collecting texttable
  Using cached texttable-1.7.0-py2.py3-none-any.whl (10 kB)
Collecting pycryptodomex>=3.16.0
  Using cached pycryptodomex-3.21.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB)
Collecting pyzstd>=0.15.9
  Using cached pyzstd-0.16.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (413 kB)
Collecting pyppmd<1.2.0,>=1.1.0
  Using cached pyppmd-1.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (141 kB)
Collecting pybcj<1.1.0,>=1.0.0
  Using cached pybcj-1.0.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (50 kB)
Collecting multivolumefile>=0.2.3
  Using cached multivolumefile-0.2.3-py3-none-any.whl (17 kB)
Collecting inflate64<1.1.0,>=1.0.0
  Using cached inflate64-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (96 kB)
Collecting brotli>=1.1.0
  Using cached Brotli-1.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.9 MB)
Collecting psutil
  Using cached psutil-6.1.1-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (287 kB)
Collecting charset-normalizer<4,>=2
  Using cached charset_normalizer-3.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (143 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.10-py3-none-any.whl (70 kB)
Collecting urllib3<3,>=1.21.1
  Using cached urllib3-2.3.0-py3-none-any.whl (128 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2024.12.14-py3-none-any.whl (164 kB)
Collecting beautifulsoup4
  Using cached beautifulsoup4-4.12.3-py3-none-any.whl (147 kB)
Collecting soupsieve>1.2
  Using cached soupsieve-2.6-py3-none-any.whl (36 kB)
Installing collected packages: texttable, patch, brotli, urllib3, soupsieve, semantic-version, pyzstd, pyppmd, pycryptodomex, pybcj, psutil, multivolumefile, inflate64, idna, humanize, defusedxml, charset-normalizer, certifi, requests, py7zr, beautifulsoup4, bs4, aqtinstall
  DEPRECATION: patch is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for patch ... done
Successfully installed aqtinstall-3.1.21 beautifulsoup4-4.12.3 brotli-1.1.0 bs4-0.0.2 certifi-2024.12.14 charset-normalizer-3.4.1 defusedxml-0.7.1 humanize-4.11.0 idna-3.10 inflate64-1.0.1 multivolumefile-0.2.3 patch-1.16 psutil-6.1.1 py7zr-0.22.0 pybcj-1.0.3 pycryptodomex-3.21.0 pyppmd-1.1.1 pyzstd-0.16.2 requests-2.32.3 semantic-version-2.10.0 soupsieve-2.6 texttable-1.7.0 urllib3-2.3.0

@miurahr miurahr removed the triage label Jan 3, 2025
@ShuffleWire
Copy link
Author

That my fault, I was installing it outside a venv. Wherever it should work or not is out of scope for you; Working in a venv is okay.

The initial point remains, I let you manage this thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants