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

python3.12 failing on windows #2021

Open
joamatab opened this issue Nov 20, 2023 · 2 comments
Open

python3.12 failing on windows #2021

joamatab opened this issue Nov 20, 2023 · 2 comments
Labels
ci Related to continuous integration tasks dependency Related to a dependency help wanted Request help from the community maintenance Related to maintenance processes packaging Packaging related stuff

Comments

@joamatab
Copy link

python3.12 is failing on windows

https://github.com/heitzmann/gdstk/actions/runs/6926100983/job/18837734236

@chrysle
Copy link
Contributor

chrysle commented Nov 20, 2023

Note we haven't added official Python 3.12 support yet. A pull request adding that and fixing the compatibility issue would be welcome.

@chrysle chrysle added help wanted Request help from the community dependency Related to a dependency labels Nov 20, 2023
@webknjaz webknjaz added maintenance Related to maintenance processes ci Related to continuous integration tasks packaging Packaging related stuff labels Dec 19, 2023
@webknjaz
Copy link
Member

Hey, Joaquin! How are you doing?

Thanks for filing this! Your workflow has multiple shell commands in the same step, which makes it hard to match different bits of output with what produced them. Do you mind splitting them so that it's obvious what's actually happening?

For example, the PyYAML error is likely coming from one of your own pip invocations, and not from pip-tools.

AFAICS, the following is happening:

  • Your step uses Powershell on Windows which doesn't interrupt the execution after the failing commands and clearly behaves differently from Bash. A fix would be setting shell: bash explicitly so it's the same on all platforms.
  • One of your commands, pip install pip-tools pytest ninja conan==1.60, is what actually errors out: conan wants PyYAML as a dependency, pip attempts building it from sdist and crashes. Here's the last line of pip's output:
    note: This error originates from a subprocess, and is likely not a problem with pip.
  • Then, GHA proceeds to invoke pip-tools, but since the previous pip install failed to install it, you see the following error line in the log:
    C:\hostedtoolcache\windows\Python\3.12.0\x64\python.exe: No module named piptools
  • Finally, GHA proceeds to run pip install -r requirements.txt. And again, missing pip-tools didn't create requirements.txt so it failed too:
    ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'

To summarize, your problem isn't coming from pip-tools, but from something you're trying to install before invoking it.
My advice is to separate steps in GHA — it's really helpful to have env configuration and other commands distinguishable and I follow this practice everywhere, specifically because of confusions like this one.

I'll keep the issue open since we still need to update the trove classifiers in the packaging metadata and add a 3.12 job to CI (for which a PR is welcome, by the way!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Related to continuous integration tasks dependency Related to a dependency help wanted Request help from the community maintenance Related to maintenance processes packaging Packaging related stuff
Projects
None yet
Development

No branches or pull requests

3 participants