testver
Programmatically edit python package versions for testing.
When publishing a python package from a continuous integration system, it can be useful to publish it to a test package repository such as test.pypi.org.
However, package repositories only accept a certain version of a package once.
To get around this, this package edits the python version in your python code
(defined as the <package>.__version__ variable).
This works well with systems such as flit, that require versions to be specified in the code.
Usage:
testver src/ --dryrun
This will print out all the changes the script would make. It goes through the
directory you pass, and searchers for python files called __init__.py or
__version__.py (common ways of naming the files in which version numbers
are specified).
Once found, if --dryrun is not specified, it will modify the python source
code. Make sure you can easily revert this locally if you are testing
(i.e. commit changes before you run this).
testver src/
For an example on how to use this in a continuous integration system, see the workflow file of this repository.
Metadata
Release files for testver 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| testver-0.3.1.tar.gz | 4.9 kB | Without provenance | Details for testver-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| testver-0.3.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for testver-0.3.1-py2.py3-none-any.whl |
Total release size: 9.0 kB
Release files / testver-0.3.1.tar.gz
| Download URL | testver-0.3.1.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4f8e3f2dffcce21251b70249e94ce01b815d4a0cba722fa26e23945600851ca6
|
|
BLAKE2b-256 checksum How to use checksums |
3b9f9406b4ddba46ba1948910c45bba8394eb9029a64ed90552327037e56d544
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.26.0
|
Release files / testver-0.3.1-py2.py3-none-any.whl
| Download URL | testver-0.3.1-py2.py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
0f66f16bd709fe2e4a35f546a1115c7f2772a1e2a1873101ea833de25d2fc4b6
|
|
BLAKE2b-256 checksum How to use checksums |
d2c94983d3b7e112a5c5f14aac28c0313947d080e11a566c7d911d2bfc966273
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.26.0
|
Security for testver 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.