Skip to content

Commit d87b5d7

Browse files
committed
Remove outdated Django version warning
Since: - the version check was pretty broken (only matches against that exact requirements file version syntax, plus doesn't check unpinned but still outdated version etc) - it only warned for Django 1.x, when there are lots of other EOL Django versions since then - it feels inconsistent for us to warn about one framework being EOL when there are lots of other packages and frameworks out there that should also be kept up to date too -- that's best handled by services like Dependabot security alerts etc If at such time in the future our Django collectstatic feature requires a specific version of Django, any version checking/warning should occur as part of that feature. GUS-W-11593026.
1 parent 5f896a4 commit d87b5d7

File tree

5 files changed

+1
-38
lines changed

5 files changed

+1
-38
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Unreleased
44

5+
- Remove outdated Django version warning ([#1345](https://github.com/heroku/heroku-buildpack-python/pull/1345)).
56

67
## v214 (2022-08-02)
78

bin/steps/pip-install

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,6 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then
2929
mcount "failure.none-version"
3030
fi
3131

32-
# TODO: Either remove this or fix since it's pretty broken at the moment - for example it
33-
# doesn't match against a requirements specifier of 'Django >=1.11,<2' amongst others.
34-
if grep -qi '^django==1.*' requirements.txt; then
35-
puts-warn "Your Django version is nearing the end of its community support."
36-
puts-warn "Upgrade to continue to receive security updates and for the best experience with Django."
37-
puts-warn "For more information, check out https://www.djangoproject.com/download/#supported-versions"
38-
fi
39-
4032
if [ ! -f "$BUILD_DIR/.heroku/python/bin/pip" ]; then
4133
exit 1
4234
fi

spec/fixtures/requirements_django_1.11/requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

spec/fixtures/requirements_django_2.1/requirements.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

spec/hatchet/django_spec.rb

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,6 @@
33
require_relative '../spec_helper'
44

55
RSpec.describe 'Django support' do
6-
describe 'Unsupported version warnings' do
7-
context 'when requirements.txt contains Django==1.11' do
8-
let(:app) { Hatchet::Runner.new('spec/fixtures/requirements_django_1.11') }
9-
10-
it 'warns about Django end of support' do
11-
app.deploy do |app|
12-
expect(clean_output(app.output)).to include(<<~OUTPUT)
13-
remote: -----> Installing requirements with pip
14-
remote: ! Your Django version is nearing the end of its community support.
15-
remote: ! Upgrade to continue to receive security updates and for the best experience with Django.
16-
remote: ! For more information, check out https://www.djangoproject.com/download/#supported-versions
17-
OUTPUT
18-
end
19-
end
20-
end
21-
22-
context 'when requirements.txt contains Django==2.1' do
23-
let(:app) { Hatchet::Runner.new('spec/fixtures/requirements_django_2.1') }
24-
25-
it 'does not warn about Django end of support' do
26-
app.deploy do |app|
27-
expect(app.output).not_to include('https://www.djangoproject.com/download/#supported-versions')
28-
end
29-
end
30-
end
31-
end
32-
336
describe 'collectstatic' do
347
context 'when building a Django project' do
358
let(:app) { Hatchet::Runner.new('python-getting-started') }

0 commit comments

Comments
 (0)