Skip to content

Commit

Permalink
Update Python and dependency versions in test fixtures (#1571)
Browse files Browse the repository at this point in the history
* Switches any tests that aren't testing the Python version itself to
  using Python 3.12 (so that the Python version is available when the
  tests are run against newer stacks where older Python versions won't
  have been built).
* Refreshes the lockfiles for the Pipenv tests
* Fixes the Heroku CI test since `nose` doesn't work with modern Python,
  and the old test also didn't actually test the CI-specific
  `requirements-test.txt` feature.
* Replaces the unicode ellipsis character used in buildpack output with
  repeated ASCII periods (`"..."`) since:
   - Hatchet doesn't handle the unicode properly in its CI output logs
     (which could issues with the improved Heroku CI Hatchet test)
   - It's inconsistent with output elsewhere in the buildpack where the
     ASCII periods were already used.

(This change has been split out of the Heroku-24 PR for easier review.)

GUS-W-14667590.
  • Loading branch information
edmorley committed Apr 18, 2024
1 parent 2c35ea4 commit 4e9eac2
Show file tree
Hide file tree
Showing 34 changed files with 135 additions and 100 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
__pycache__/
.hatchet/repos/
.venv/
.DS_Store
.rspec_status
2 changes: 1 addition & 1 deletion bin/steps/nltk
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ source "$BIN_DIR/utils"

# Check that nltk was installed by pip, otherwise obviously not needed
if is_module_available 'nltk'; then
puts-step "Downloading NLTK corpora"
puts-step "Downloading NLTK corpora..."

nltk_packages_definition="$BUILD_DIR/nltk.txt"

Expand Down
2 changes: 1 addition & 1 deletion bin/steps/pip-install
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then
# Install test dependencies, for CI.
if [ "$INSTALL_TEST" ]; then
if [[ -f requirements-test.txt ]]; then
puts-step "Installing test dependencies"
puts-step "Installing test dependencies..."
/app/.heroku/python/bin/pip install -r requirements-test.txt --exists-action=w --src='/app/.heroku/src' --disable-pip-version-check --no-cache-dir 2>&1 | cleanup | indent
fi
fi
Expand Down
1 change: 0 additions & 1 deletion spec/fixtures/ci_nose/requirements.txt

This file was deleted.

1 change: 0 additions & 1 deletion spec/fixtures/ci_nose/runtime.txt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"environments": {
"test": {
"scripts": {
"test": "nosetests"
"test": "pytest --version"
}
}
}
Expand Down
1 change: 1 addition & 0 deletions spec/fixtures/ci_requirements/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest
1 change: 1 addition & 0 deletions spec/fixtures/ci_requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
urllib3
2 changes: 1 addition & 1 deletion spec/fixtures/pipenv_and_requirements_txt/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ urllib3 = "*"
[dev-packages]

[requires]
python_version = "3.10"
python_version = "3.12"
11 changes: 6 additions & 5 deletions spec/fixtures/pipenv_and_requirements_txt/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/fixtures/pipenv_and_runtime_txt/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ urllib3 = "*"
[dev-packages]

[requires]
python_version = "3.9"
python_version = "3.11"
11 changes: 6 additions & 5 deletions spec/fixtures/pipenv_and_runtime_txt/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/fixtures/pipenv_and_runtime_txt/runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.10.14
python-3.12.3
8 changes: 4 additions & 4 deletions spec/fixtures/pipenv_editable/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/fixtures/pipenv_lockfile_out_of_sync/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ urllib3 = "*"
[dev-packages]

[requires]
python_version = "3.10"
python_version = "3.12"
7 changes: 4 additions & 3 deletions spec/fixtures/pipenv_lockfile_out_of_sync/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions spec/fixtures/pipenv_python_3.10/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions spec/fixtures/pipenv_python_3.11/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions spec/fixtures/pipenv_python_3.12/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions spec/fixtures/pipenv_python_3.8/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions spec/fixtures/pipenv_python_3.9/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/fixtures/pipenv_python_full_version/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ urllib3 = "*"
[dev-packages]

[requires]
python_full_version = "3.10.7"
python_full_version = "3.12.2"
12 changes: 6 additions & 6 deletions spec/fixtures/pipenv_python_full_version/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions spec/fixtures/pipenv_python_full_version_invalid/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/fixtures/pipenv_python_version_invalid/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ urllib3 = "*"
[dev-packages]

[requires]
python_version = "^3.9"
python_version = "^3.12"
12 changes: 6 additions & 6 deletions spec/fixtures/pipenv_python_version_invalid/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions spec/fixtures/pipenv_python_version_unspecified/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/fixtures/runtime_txt_only/runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.10.14
python-3.12.3
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

python-3.10.14
python-3.12.3

Loading

0 comments on commit 4e9eac2

Please sign in to comment.