File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33## [ Unreleased]
44
5+ - Added metrics for misspelled ` .python-version ` files. ([ #1904 ] ( https://github.com/heroku/heroku-buildpack-python/pull/1904 ) )
56
67## [ v308] - 2025-09-19
78
Original file line number Diff line number Diff line change @@ -50,6 +50,17 @@ function python_version::read_requested_python_version() {
5050 declare -n origin=" ${5} "
5151 local contents
5252
53+ # Record the names of files similar to .python-version in the root of the app, to determine
54+ # how often that file is misspelled, as a temporary first step before deciding whether to add
55+ # a new warning/error (and if so, which for which misspelled filenames it should check).
56+ local python_version_files
57+ python_version_files=" $(
58+ find . -maxdepth 1 -type f -iregex ' \./\.?python.?version.*' -printf ' %P\n' | sort | tr ' \n' ' ,' || true
59+ ) "
60+ if [[ -n " ${python_version_files} " ]]; then
61+ build_data::set_string " python_version_files" " ${python_version_files} "
62+ fi
63+
5364 local runtime_txt_path=" ${build_dir} /runtime.txt"
5465 if [[ -f " ${runtime_txt_path} " ]]; then
5566 contents=" $( utils::read_file_with_special_chars_substituted " ${runtime_txt_path} " ) "
Original file line number Diff line number Diff line change 7272 remote: "pre_compile_hook": false,
7373 remote: "python_install_duration": [0-9.]+,
7474 remote: "python_version": "#{ DEFAULT_PYTHON_FULL_VERSION } ",
75+ remote: "python_version_files": ".python-version,",
7576 remote: "python_version_major": "3.13",
7677 remote: "python_version_origin": ".python-version",
7778 remote: "python_version_outdated": false,
Original file line number Diff line number Diff line change 7474 remote: "pre_compile_hook": false,
7575 remote: "python_install_duration": [0-9.]+,
7676 remote: "python_version": "#{ DEFAULT_PYTHON_FULL_VERSION } ",
77+ remote: "python_version_files": ".python-version,",
7778 remote: "python_version_major": "3.13",
7879 remote: "python_version_origin": ".python-version",
7980 remote: "python_version_outdated": false,
Original file line number Diff line number Diff line change 7979 remote: "pre_compile_hook": false,
8080 remote: "python_install_duration": [0-9.]+,
8181 remote: "python_version": "#{ DEFAULT_PYTHON_FULL_VERSION } ",
82+ remote: "python_version_files": ".python-version,",
8283 remote: "python_version_major": "3.13",
8384 remote: "python_version_origin": ".python-version",
8485 remote: "python_version_outdated": false,
You can’t perform that action at this time.
0 commit comments