Skip to content

Conversation

@bobwhitelock
Copy link

@bobwhitelock bobwhitelock commented Apr 5, 2022

This PR improves and fixes the testing/build setup, and updates the supported Python/Django versions to those that are currently maintained. I made these changes as part of investigating the issue in #65, as well as confirming to my satisfaction that this library works on more recent Python/Django versions as part of updating my own project. See each commit and the inline comments for full details of the changes being made and why.

You can see an example build for these changes, with #65 merged as well (otherwise tests would fail), here: https://app.travis-ci.com/github/bobwhitelock/django-passwords/builds/248969588

`six` isn't listed as a dependency of this package, and Python 2 is
end-of-life for several years anyway, so just switch to this method name
which works in all maintained Python versions.
- Fix the build so it runs on Travis, and runs for all supported Python
  and Django versions;

- DRY things up a bit, so dependencies are installed in one place, the
  Travis config uses Tox rather than independent configuration etc.;

- update test dependencies to latest versions;

- update supported Python and Django versions to only those that are
  currently maintained;

- some minor YAML/Python formatting.
This would have surfaced the issue fixed by
dstufft#65, and ensures there
is actually test coverage for `get_dictionary_words`. As such, this also
means tests will fail until that PR is merged as well.
Comment on lines +4 to +7
- "3.7"
- "3.8"
- "3.9"
- "3.10"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the currently supported Python versions according to https://www.python.org/downloads/

Comment on lines +3 to +6
py37-dj{22,32}
py38-dj{22,32,40}
py39-dj{22,32,40}
py310-dj{32,40}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the currently supported Django versions, with compatible Python versions, according to https://www.djangoproject.com/download/

@@ -1,29 +1,24 @@
dist: focal
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Travis runs on an old version (16) of Ubuntu by default, and some things didn't work with these changes on this, this switches to Ubuntu 20 which seems to work fine

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't actually know if you're still using Travis - the latest build I see linked from the README is https://travis-ci.org/github/dstufft/django-passwords/builds/751467158, which failed a year ago, and I don't see CI setup for PRs - possibly this was dropped when Travis scaled back their free plans? In any case, these changes should improve the build if you do want to use this, or could at least serve as a starting point to switch to using GitHub actions or similar in future

@darakian
Copy link
Contributor

darakian commented Apr 5, 2022

Not sure you'll get much movement on this. See: #59

Might be more worthwhile to fork the repo and create a derivative pypi package.

@bobwhitelock
Copy link
Author

@darakian Thanks, looks like there has been some recent activity in this repo, so I thought this and #65 might be able to be merged, but no recent releases for some reason. If these can't be merged we'll probably just merge and depend on our fork for now.

bobwhitelock added a commit to rescale/django-passwords that referenced this pull request Jul 8, 2022
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.

2 participants