Skip to content

Commit

Permalink
Fix bug in create_django_issue
Browse files Browse the repository at this point in the history
Parsing doesn't work for classifiers that only
include the Django major version, e.g.:
``'Framework :: Django :: 3'`

We need a '.' in the 4th part of the classifier
to be able to parse it:
``'Framework :: Django :: 3.2'`
  • Loading branch information
browniebroke committed Dec 7, 2023
1 parent 7d5a14d commit 52d25ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/create_django_issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def get_compatibility(self, package_name: str, package_info: dict, needed_dj_ver
for classifier in package_info["info"]["classifiers"]:
# Usually in the form of "Framework :: Django :: 3.2"
tokens = classifier.split(" ")
if len(tokens) >= 5 and tokens[2].lower() == "django":
if len(tokens) >= 5 and tokens[2].lower() == "django" and "." in tokens[4]:
version = DjVersion.parse(tokens[4])
if len(version) == 2:
supported_dj_versions.append(version)
Expand Down

0 comments on commit 52d25ad

Please sign in to comment.