Skip to content

Conversation

@miketheman
Copy link
Member

Source: https://github.com/github/gitignore/blob/4488915eec0b3a45b5c63ead28f286819c0917de/Python.gitignore

Remove local .python-version file so we can leave that choice to the developer. The GitHub Actions have their own versions specificed.

@di
Copy link
Member

di commented Jul 5, 2023

The .python-version file is necessary to make sure local development happens with the same version of Python that we're deploying to:

'--runtime', 'python311',

@miketheman
Copy link
Member Author

Does the .python-version file actually come into play for deployment, or is the directive you linked to control the behavior?

@di
Copy link
Member

di commented Jul 6, 2023

It is used by buildpack that Google Cloud Functions uses: https://github.com/GoogleCloudPlatform/buildpacks/blob/2e0fe5617660645f8327eaba4428728c0067a938/pkg/python/python.go#L47C18-L47C18

but it's not strictly required, it's mostly here so that local development uses the right version if you're using something like https://github.com/pyenv/pyenv.

@miketheman
Copy link
Member Author

Coolio, thanks for the pointer. I dug around a bit to see if I could figure out if we supply this file, we could remove the --runtime directive, so as to control the version in one place, but didn't find it readily enough.

I've excluded .python-version from the changeset.

@di
Copy link
Member

di commented Feb 23, 2024

FYI @miketheman, this PR still removes .python-version.

@miketheman
Copy link
Member Author

@di restored!

@di di merged commit 472b4c7 into pypi:main Feb 26, 2024
@miketheman miketheman deleted the gitignore branch February 26, 2024 20:47
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