-
Notifications
You must be signed in to change notification settings - Fork 246
Upgrade paasta to python 3.10 #4065
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
base: master
Are you sure you want to change the base?
Conversation
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.
(just a note, might wanna put this PR in draft mode)
@@ -1,3 +1,4 @@ | |||
appdirs |
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.
just a note: the -minimal files should only contain libraries that we directly import - and it looks like this is most likely a transitive dependency
requirements-minimal.txt
Outdated
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.
note: i'm not quite sure why we ever bother with lower-bound pins in this file: we really should only ever have upper-bounds/explicit pins with comments - I don't think we ever really knowingly want to downgrade things and there's almost no way that we'll be disciplined enough to have truly accurate lower-bounds :P
df78a71
to
fd78847
Compare
@@ -69,15 +69,16 @@ def __call__(self, request: Request) -> Response: | |||
) | |||
return self.handler(request) | |||
|
|||
@cachetools.func.ttl_cache(maxsize=AUTH_CACHE_SIZE, ttl=AUTH_CACHE_TTL) | |||
@cachetools.func.ttl_cache(maxsize=AUTH_CACHE_SIZE, ttl=AUTH_CACHE_TTL) # type: ignore |
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 think that we might be able to get rid of this ignore if we install types-cachetools
in requirements-dev
f.write(secret_content) # type: ignore | ||
except TypeError: | ||
# If that fails, try to write it as bytes | ||
# This is for binary files like TLS keys | ||
with open(temp_secret_filename, "wb") as fb: | ||
fb.write(secret_content) | ||
fb.write(secret_content) # type: ignore |
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.
just curious: why were these ignored?
paasta_tools/instance/kubernetes.py
Outdated
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.
there's a lot of ignores here - we'll probably want to circle back to fixing these or add some comments about why the ignores are there
requirements-bootstrap.txt
Outdated
@@ -1,3 +1,3 @@ | |||
pip==24.0 | |||
setuptools==68.0.0 | |||
setuptools==57.5.0 |
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.
huh, how come we're downgrading setuptools?
requirements-minimal.txt
Outdated
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.
note: a bunch of these additions shouldn't be here - requirements-minimal is only for libraries we directly import
pv = kubernetes_tools.PersistentVolume( | ||
mode="rw", | ||
size=1000, | ||
container_path="/tmp", | ||
storage_class_name="ebs", | ||
) |
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 think this is changing the test behavior - what was the error here?
# Build /etc/paasta used by docker-compose | ||
{toxinidir}/k8s_itests/scripts/setup.sh | ||
# Fail fast if Docker Compose V2 is not available | ||
docker compose version |
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.
huh, this doesn't work on our devbox (at least, for me)
# starting from setuptools >= 58.0.0, use_2to3 wont be supported | ||
# as behave includes use_2to3 in setup.py, it will fail to install |
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.
huh, how does this work now that we're on a newer setuptools already?
deps = | ||
{[testenv]deps} | ||
mypy==0.720 | ||
mypy==0.790 |
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 dunno why we have a separate tox env for this and don't install mypy in requirements-dev - but that's a later us problem
Upgrade paasta to support python 3.10 and deleted this test: :tests/test_task_processing.py since we don't use task-processing in paasta.
All tests were passing locally using "make test"