-
Notifications
You must be signed in to change notification settings - Fork 55
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
turn on github actions caching of pip environments #773
base: master
Are you sure you want to change the base?
turn on github actions caching of pip environments #773
Conversation
Co-authored-by: Antti Kaihola <[email protected]>
Co-authored-by: Antti Kaihola <[email protected]>
Co-authored-by: Antti Kaihola <[email protected]>
Signed-off-by: CJ Steiner <[email protected]>
41ca210
to
dd9dcf8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder what happened with the CI build, I see no checks run.
Co-authored-by: Antti Kaihola <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test-future.yml so far only runs by schedule. Could you add
on: # yamllint disable-line rule:truthy
schedule:
- cron: "05 20 * * 6"
workflow_dispatch: # Allow manual triggering
so we can trigger it at will on this branch before merging so we can ensure the modified workflow still runs?
done |
It wasn't just as simple as that. I needed to cherry-pick your Anyway, now the workflow ran, and we indeed have a problem: Run # strict dependency resolution added in pip 20.3
# strict dependency resolution added in pip 20.3
# CVE-2021-3572 fixed in pip 21.1
uv pip install \
--constraint=constraints-future.txt \
--upgrade \
--upgrade-strategy=eager \
-e '.[test]'
shell: /usr/bin/bash -e {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.12.8/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.8/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.8/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.8/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.8/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.8/x64/lib
UV_CACHE_DIR: /home/runner/work/_temp/setup-uv-cache
error: unexpected argument '--upgrade-strategy' found
tip: a similar argument exists: '--upgrade'
Usage: uv pip install --constraints <CONSTRAINTS> --upgrade <PACKAGE|--requirements <REQUIREMENTS>|--editable <EDITABLE>>
For more information, try '--help'.
Error: Process completed with exit code 2. Let's try to figure out what the equivalent to |
Also apparently import json
import os
import urllib.request
from distutils.version import LooseVersion
from importlib.metadata import version
from textwrap import dedent
for linenum, line in enumerate(open("setup.cfg"), 1):
constraint = line.strip()
if constraint.startswith("black>="):
column = line.index("black>=") + 1
end_column = len(line)
break
else:
raise RuntimeError("black>= line not found in setup.cfg")
response = urllib.request.urlopen(
'https://pypi.org/pypi/black/json'
).read().decode()
latest_version = max(
LooseVersion(s)
for s in json.loads(response)['releases'].keys()
)
print(
dedent(
f"""
### :x: Future Black incompatibility? :x:
You could add a maximum version constraint for Black on
`setup.cfg` line {linenum}, e.g.
`{constraint},<={latest_version}`
See [#382](/akaihola/darker/issues/382)
for more information
"""
),
file=open(os.getenv("GITHUB_STEP_SUMMARY"), "a"),
)
print(
"::notice "
"file=setup.cfg,"
f"line={linenum},"
f"col={column},"
f"endColumn={end_column},"
"title=Future Black incompatibility?::"
"You could add a maximum version constraint for Black here, "
f"e.g. {constraint},<={latest_version}"
)
shell: /opt/hostedtoolcache/Python/3.12.8/x64/bin/python {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.12.8/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.8/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.8/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.8/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.8/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.8/x64/lib
UV_CACHE_DIR: /home/runner/work/_temp/setup-uv-cache
Traceback (most recent call last):
File "/home/runner/work/_temp/f043726e-e943-4df1-a652-c950d5c5aadf.py", line 4, in <module>
from distutils.version import LooseVersion
ModuleNotFoundError: No module named 'distutils'
Error: Process completed with exit code 1. |
@akaihola the distutils is due to it not installing all the dependencies - needs setuptools installed |
@akaihola Thoughts on a chat about moving fully into pyproject.toml and uv? |
Apparently
Moving away from Setuptools is not yet possible due to dynamic removal of the contributors HTML table from |
See #803. |
@clintonsteiner I merged #803. Could you rebase on |
No description provided.