Git Product home page Git Product logo

Comments (4)

vchiapaikeo avatar vchiapaikeo commented on August 11, 2024

This issue emerged slightly differently in some of our failing legacy builds:

  Downloading pyyaml-6.0.2rc1.tar.gz (130 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 130.6/130.6 kB 1.6 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [19 lines of output]
      Traceback (most recent call last):
        File "/usr/local/lib/python3.7/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/usr/local/lib/python3.7/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/usr/local/lib/python3.7/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-download-sc0zai2g/pyyaml_f571e0c609cd4ea296560fe5a4814e47/packaging/_pyyaml_pep517.py", line 47, in _expose_config_settings
          return real_method(*args, **kwargs)
        File "/tmp/pip-build-env-gt8xo81a/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-gt8xo81a/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-gt8xo81a/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<fstring>", line 1
          (self.include_dirs=)
                            ^
      SyntaxError: invalid syntax
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

from pyyaml.

ben-edna avatar ben-edna commented on August 11, 2024

This issue emerged slightly differently in some of our failing legacy builds:

  Downloading pyyaml-6.0.2rc1.tar.gz (130 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 130.6/130.6 kB 1.6 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [19 lines of output]
      Traceback (most recent call last):
        File "/usr/local/lib/python3.7/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/usr/local/lib/python3.7/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/usr/local/lib/python3.7/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-download-sc0zai2g/pyyaml_f571e0c609cd4ea296560fe5a4814e47/packaging/_pyyaml_pep517.py", line 47, in _expose_config_settings
          return real_method(*args, **kwargs)
        File "/tmp/pip-build-env-gt8xo81a/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-gt8xo81a/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-gt8xo81a/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<fstring>", line 1
          (self.include_dirs=)
                            ^
      SyntaxError: invalid syntax
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

We have same issue also using py 3.7

from pyyaml.

woutdenolf avatar woutdenolf commented on August 11, 2024

I could not reproduce the python setup.py test issue but I have pip install issues from pypi.

pyyaml/setup.py

Line 355 in a2d19c0

python_requires='>=3.6',

With pip it installs for all python versions up to 3.12, except 3.6 and 3.7:

pip install -U pip setuptools
pip install --pre pyyaml

Python 3.7 (fails)

Python 3.7.17
pip        24.0
setuptools 68.0.0


Collecting pyyaml
  Downloading pyyaml-6.0.2rc1.tar.gz (130 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 130.6/130.6 kB 583.2 kB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [19 lines of output]
      Traceback (most recent call last):
        File "/home/denolf/virtualenvs/pybox_PXIQMX/lib/python3.7/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/denolf/virtualenvs/pybox_PXIQMX/lib/python3.7/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/denolf/virtualenvs/pybox_PXIQMX/lib/python3.7/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-install-fcb2lvwm/pyyaml_642b39d7e27b4fea961033c121943a5b/packaging/_pyyaml_pep517.py", line 47, in _expose_config_settings
          return real_method(*args, **kwargs)
        File "/tmp/pip-build-env-dpq0y_ow/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-dpq0y_ow/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-dpq0y_ow/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<fstring>", line 1
          (self.include_dirs=)
                            ^
      SyntaxError: invalid syntax
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

caused by (f-string with '=' was introduced in python 3.8)

pyyaml/setup.py

Line 273 in a2d19c0

print(f"BUILDING CYTHON EXT; {self.include_dirs=} {self.library_dirs=} {self.define=}")

Python 3.6 (falls back to 6.0.1)

Python 3.6.15
pip        21.3.1
setuptools 59.6.0


Collecting pyyaml
  Downloading pyyaml-6.0.2rc1.tar.gz (130 kB)
     |████████████████████████████████| 130 kB 2.0 MB/s            
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /home/denolf/virtualenvs/pybox_mY2umA/bin/python /home/denolf/virtualenvs/pybox_mY2umA/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpnoo4bm78
       cwd: /tmp/pip-install-4afg380b/pyyaml_cc0e7d6bd07742d9ac417689267335f5
  Complete output (10 lines):
  Traceback (most recent call last):
    File "/home/denolf/virtualenvs/pybox_mY2umA/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
      main()
    File "/home/denolf/virtualenvs/pybox_mY2umA/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/home/denolf/virtualenvs/pybox_mY2umA/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/tmp/pip-install-4afg380b/pyyaml_cc0e7d6bd07742d9ac417689267335f5/packaging/_pyyaml_pep517.py", line 36, in _expose_config_settings
      from contextlib import nullcontext
  ImportError: cannot import name 'nullcontext'
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/ff/08/b6768d9f2da231c1396490e91471ffebb12b299a65cb369c27ec0e2a50c6/pyyaml-6.0.2rc1.tar.gz#sha256=826fb4d5ac2c48b9d6e71423def2669d4646c93b6c13612a71b3ac7bb345304b (from https://pypi.org/simple/pyyaml/) (requires-python:>=3.6). Command errored out with exit status 1: /home/denolf/virtualenvs/pybox_mY2umA/bin/python /home/denolf/virtualenvs/pybox_mY2umA/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpnoo4bm78 Check the logs for full command output.
  Using cached PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (677 kB)
Installing collected packages: pyyaml
Successfully installed pyyaml-6.0.1

caused by (contextlib.nullcontext was introduced in python 3.7)

from contextlib import nullcontext

from pyyaml.

nitzmahone avatar nitzmahone commented on August 11, 2024

Since it was an unintentional regression, PyYAML 6.0.2 restores setup.py test to its previous level of functionality (only runs the non-pytest subset of the legacy tests, as before), but also includes a deprecation warning, since setuptools long-ago deprecated all direct invocations of setup.py commands.

from pyyaml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.