Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Inconsistent versioning of non-release python packages cause resolution issues for newer versions of pip #2473

Closed
WadeBarnes opened this issue Jan 21, 2022 · 3 comments · Fixed by #2492

Comments

@WadeBarnes
Copy link
Contributor

WadeBarnes commented Jan 21, 2022

Example message from pip (for indy-plenum):

  WARNING: Requested python3-indy==1.15.0-dev-1625 from https://files.pythonhosted.org/packages/a0/78/74c1d6206c1eae93f677abd6ff03bd6357412716615f0df6858bd655b6a1/python3-indy-1.15.0-dev-1625.tar.gz#sha256=821729e796a47fd591520c8c73fefc91dce7bfc9f784c6702ca9d03d82f2e76a (from indy-plenum==1.13.0.dev0), but installing version 1.15.0
WARNING: Discarding https://files.pythonhosted.org/packages/a0/78/74c1d6206c1eae93f677abd6ff03bd6357412716615f0df6858bd655b6a1/python3-indy-1.15.0-dev-1625.tar.gz#sha256=821729e796a47fd591520c8c73fefc91dce7bfc9f784c6702ca9d03d82f2e76a (from https://pypi.org/simple/python3-indy/). Requested python3-indy==1.15.0-dev-1625 from https://files.pythonhosted.org/packages/a0/78/74c1d6206c1eae93f677abd6ff03bd6357412716615f0df6858bd655b6a1/python3-indy-1.15.0-dev-1625.tar.gz#sha256=821729e796a47fd591520c8c73fefc91dce7bfc9f784c6702ca9d03d82f2e76a (from indy-plenum==1.13.0.dev0) has inconsistent version: filename has '1.15.0.dev1625', but metadata has '1.15.0'

ERROR: Could not find a version that satisfies the requirement python3-indy==1.15.0-dev-1625 (from indy-plenum[tests]) (from versions: 
...
...
 1.12.0.dev1370, 1.12.0.dev1371, 1.12.0.dev1373, 1.12.0.dev1379, 1.12.0.dev1382, 1.12.0.dev1386, 1.12.0rc95, 1.12.0rc96, 1.12.0, 1.13.0.dev1387, 1.13.0.dev1389, 1.13.0.dev1390, 1.13.0.dev1391, 1.13.0.dev1396, 1.13.0.dev1397, 1.13.0.dev1400, 1.13.0.dev1402, 1.13.0.dev1404, 1.13.0.dev1414, 1.13.0.dev1415, 1.13.0.dev1420, 1.13.0.dev1423, 1.13.0rc111, 1.13.0, 1.14.0.dev1424, 1.14.0rc117, 1.14.0, 1.14.1.dev1425, 1.14.1.dev1427, 1.14.1.dev1432, 1.14.1.dev1433, 1.14.1.dev1437, 1.14.1.dev1440, 1.14.1.dev1450, 1.14.1.dev1454, 1.14.1.dev1459, 1.14.1.dev1467, 1.14.1rc120, 1.14.1, 1.14.2.dev1496, 1.14.2.dev1498, 1.14.2.dev1499, 1.14.2.dev1500, 1.14.2.dev1504, 1.14.2.dev1507, 1.14.2.dev1510, 1.14.2.dev1523, 1.14.2.dev1524, 1.14.2rc123, 1.14.2, 1.14.3rc124, 1.14.3rc127, 1.14.3, 1.14.4rc130, 1.14.4rc131, 1.14.4rc135, 1.14.4rc137, 1.14.4rc138, 1.14.4rc139, 1.15.0.dev1528, 1.15.0.dev1532, 1.15.0.dev1533, 1.15.0.dev1535, 1.15.0.dev1536, 1.15.0.dev1541, 1.15.0.dev1542, 1.15.0.dev1543, 1.15.0.dev1544, 1.15.0.dev1545, 1.15.0.dev1546, 1.15.0.dev1547, 1.15.0.dev1548, 1.15.0.dev1549, 1.15.0.dev1551, 1.15.0.dev1552, 1.15.0.dev1553, 1.15.0.dev1554, 1.15.0.dev1555, 1.15.0.dev1557, 1.15.0.dev1558, 1.15.0.dev1560, 1.15.0.dev1563, 1.15.0.dev1565, 1.15.0.dev1567, 1.15.0.dev1568, 1.15.0.dev1595, 1.15.0.dev1597, 1.15.0.dev1604, 1.15.0.dev1605, 1.15.0.dev1606, 1.15.0.dev1607, 1.15.0.dev1608, 1.15.0.dev1609, 1.15.0.dev1618, 1.15.0.dev1624, 1.15.0.dev1625, 1.15.0.dev1626, 1.15.0.dev1627, 1.15.0.dev1628, 1.15.0.dev1629, 1.15.0rc144, 1.15.0, 1.15.0.post17, 1.15.0.post31, 1.15.0.post37, 1.16.0.dev1631, 1.16.0.dev1632, 1.16.0.dev1633, 1.16.0.dev1634, 1.16.0.dev1636, 1.16.0.dev1638, 1.16.0rc161, 1.16.0rc162, 1.16.0rc170, 1.16.0rc172, 1.16.0, 1.16.0.post40, 1.16.0.post47, 1.16.0.post51, 1.16.0.post54, 1.16.0.post56, 1.16.0.post59, 1.16.0.post60, 1.16.0.post64, 1.16.0.post80)
ERROR: No matching distribution found for python3-indy==1.15.0-dev-1625

This error is caused by an inconsistency in the package version and the version listed in the package's setup.py.

The package version is set correctly by the build:
image

However the version in setup.py is not updated with the matching version number:
image

The build process and/or code needs to be updated to set the code's version numbers consistently.

@WadeBarnes
Copy link
Contributor Author

WadeBarnes commented Jan 21, 2022

indy-plenum uses a more consistent approach to versioning (though more complicated). indy-node uses the same approach as indy-plenum.

@pSchlarb
Copy link
Contributor

I think the problem lies here in L936:
https://github.com/hyperledger/indy-sdk/blob/a1095be324d4fd6e678fdcb73476ee6d5130ba86/.github/workflows/main.yml#L934-L937

The Version is set via the environment variable PACKAGE_VERSION.
But on the enduser side this variable isn't set and the version is set to the fallback from:
https://github.com/hyperledger/indy-sdk/blob/a1095be324d4fd6e678fdcb73476ee6d5130ba86/wrappers/python/setup.py#L4

Is it possible to store the env.publish version variable in a file and in the setup.py read the version from that file?
The only problem i see with that is, that the version is set by the action but the file in the repository if tracked at all would be out of date.

@WadeBarnes
Copy link
Contributor Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging a pull request may close this issue.

3 participants