Skip to content

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

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

EmanElsaban
Copy link
Contributor

@EmanElsaban EmanElsaban commented May 14, 2025

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"

@EmanElsaban EmanElsaban requested a review from a team as a code owner May 14, 2025 16:20
Copy link
Member

@nemacysts nemacysts left a 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
Copy link
Member

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

Copy link
Member

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

@EmanElsaban EmanElsaban marked this pull request as draft May 14, 2025 18:13
@EmanElsaban EmanElsaban force-pushed the u/emanelsabban/upgrade-python-3.10 branch from df78a71 to fd78847 Compare May 15, 2025 20:55
@@ -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
Copy link
Member

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

Comment on lines +980 to +985
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
Copy link
Member

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?

Copy link
Member

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

@@ -1,3 +1,3 @@
pip==24.0
setuptools==68.0.0
setuptools==57.5.0
Copy link
Member

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?

Copy link
Member

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

Comment on lines +2926 to +2931
pv = kubernetes_tools.PersistentVolume(
mode="rw",
size=1000,
container_path="/tmp",
storage_class_name="ebs",
)
Copy link
Member

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
Copy link
Member

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)

Comment on lines +157 to +158
# starting from setuptools >= 58.0.0, use_2to3 wont be supported
# as behave includes use_2to3 in setup.py, it will fail to install
Copy link
Member

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
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants