Skip to content

Migrate from runtime.txt to .python-version#277

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/migrate-runtime-txt-to-python-version
Draft

Migrate from runtime.txt to .python-version#277
Copilot wants to merge 3 commits intomainfrom
copilot/migrate-runtime-txt-to-python-version

Conversation

Copy link

Copilot AI commented Feb 2, 2026

Heroku deprecated runtime.txt in favor of .python-version. Using major version only enables automatic patch updates.

Changes

  • Removed runtime.txt (was pinned to python-3.12.6)
  • Added .python-version with 3.12

App will now receive Python 3.12 patch updates automatically on each build.

Original prompt

This section details on the original issue you should resolve

<issue_title>Migrate runtime.txt to .python-version</issue_title>
<issue_description>We are currently using Python 3.12.6 as specified in runtime.txt. Heroku has deprecated the runtime.txt file and recommends switching to a .python-version file:

-----> Building on the Heroku-22 stack
-----> Using buildpacks:
       1. https://github.com/heroku/heroku-geo-buildpack.git
       2. heroku/python
-----> Geo Packages (GDAL/GEOS/PROJ) app detected
-----> GDAL_VERSION is not set. Using the same version as the last build: 3.5.0.
-----> GEOS_VERSION is not set. Using the same version as the last build: 3.10.2.
-----> PROJ_VERSION is not set. Using the same version as the last build: 8.2.1.
-----> Installing GDAL-3.5.0
-----> Installing GEOS-3.10.2
-----> Installing PROJ-8.2.1
-----> Python app detected
-----> Using Python 3.12.6 specified in runtime.txt
 !     Warning: The runtime.txt file is deprecated.
 !     
 !     The runtime.txt file is deprecated since it has been replaced
 !     by the more widely supported .python-version file:
 !     https://devcenter.heroku.com/changelog-items/3141
 !     
 !     Please switch to using a .python-version file instead.
 !     
 !     Delete your runtime.txt file and create a new file in the
 !     root directory of your app named:
 !     .python-version
 !     
 !     Make sure to include the '.' character at the start of the
 !     filename. Don't add a file extension such as '.txt'.
 !     
 !     In the new file, specify your app's major Python version number
 !     only. Don't include quotes or a 'python-' prefix.
 !     
 !     For example, to request the latest version of Python 3.12,
 !     update your .python-version file so it contains exactly:
 !     3.12
 !     
 !     We strongly recommend that you don't specify the Python patch
 !     version number, since it will pin your app to an exact Python
 !     version and so stop your app from receiving security updates
 !     each time it builds.
 !     
 !     In the future support for runtime.txt will be removed and
 !     this warning will be made an error.
 !     Warning: A Python patch update is available!
 !     
 !     Your app is using Python 3.12.6, however, there is a newer
 !     patch release of Python 3.12 available: 3.12.12
 !     
 !     It is important to always use the latest patch version of
 !     Python to keep your app secure.
 !     
 !     Update your runtime.txt file to use the new version.
 !     
 !     We strongly recommend that you don't pin your app to an
 !     exact Python version such as 3.12.6, and instead only specify
 !     the major Python version of 3.12 in your runtime.txt file.
 !     This will allow your app to receive the latest available Python
 !     patch version automatically and prevent this warning.
-----> Discarding cache since:
       - The contents of Pipfile.lock changed
-----> Installing Python 3.12.6
-----> Installing Pipenv 2026.0.3
-----> Installing dependencies using 'pipenv install --deploy'
```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 2, 2026 17:24
Co-authored-by: Debakel <2857237+Debakel@users.noreply.github.com>
Co-authored-by: Debakel <2857237+Debakel@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate runtime.txt to .python-version file Migrate from runtime.txt to .python-version Feb 2, 2026
Copilot AI requested a review from Debakel February 2, 2026 17:26
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.

Migrate runtime.txt to .python-version

2 participants