Releases: kwzrd/pypopulation
2020.3
Complete migration from Pipenv
to Poetry
for dependency management and release workflow. This release simplifies and improves the internal development processes, but makes no implementation changes. The README.md
file has been updated with instructions for developers. Thanks to Poetry, we can now easily run tests in CI on all supported Python versions, providing cross-version validation.
2020.2
This release brings a significant change to the internal implementation, and several small quality-of-life adjustments. The API remains unchanged and backwards-compatible with the initial 2020.1
release from earlier this year.
Import-time initialization
In the first release, the initialization from the countries.json
resource file was delayed until the first lookup. The intention was to ensure the slight init cost is not paid in situations where the module is imported, but never used. Although this makes some amount of sense, it complicates both the internal implementation and the tests, and may be unexpected from the user's point of view.
This release simplifies things: the package always initializes at import time, and all lookups therefore have the same cost. As a result, the implementation is simpler (no need for return value caching), and the behaviour more predictable. The cost to initialize from the resource file is negligible either way, and the user is responsible for importing the module only if it will be used. The tests were re-written to support this change.
Other changes
Several smaller changes were made:
LICENSE
is adjusted to mention the data source licenseREADME.md
now contains new badges, using a consistent flat style- Explicit declaration over what gets included in the distribution
- Instead of automatic discovery, we now explicitly declare the dist contents
- The
tests
package is no longer included with the dist - The inclusion of the resource file is declared in
setup.py
, we no longer needMANIFEST.in
Future plans
For the future, it is planned to begin using Poetry for project management over Pipenv, as it is more suited for distributing to PyPI and supporting multiple Python versions. This should also allow us to easily run CI tests on multiple versions, rather than just the Pipenv-locked one.