Sometime, installed pip package is not the latest

Hi,

I store my python package wheels on the gitlab pypi registry. I upload the wheel with :

TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --verbose --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*

When the package is installed, with the following command :

sudo pip3 install --force-reinstall --pre MyProjectName --index-url http://QA-build-token:glpat-***********@gitlab.********************/api/v4/projects/127/packages/pypi/simple --trusted-host gitlab.********************

Sometimes, the latest version 4.0.dev0 is installed. For example, correct version installed log is :

Looking in indexes: http://QA-build-token:****@gitlab.********************/api/v4/projects/127/packages/pypi/simple
Collecting MyProjectName
  Downloading http://gitlab.********************/api/v4/projects/127/packages/pypi/files/b3386f735bcf678b912d695af71e13825c38bafffa04169ca87e0567c10f7d3f/MyProjectName-4.0.dev0-cp38-cp38-linux_x86_64.whl (2.5 MB)
Installing collected packages: MyProjectName
  Attempting uninstall: MyProjectName
    Found existing installation: MyProjectName 4.0.dev0
    Uninstalling MyProjectName-4.0.dev0:
      Successfully uninstalled MyProjectName-4.0.dev0
Successfully installed MyProjectName-4.0.dev0

But sometime, an old version 3.7.dev0 is installed :

Looking in indexes: http://QA-build-token:****@gitlab.********************/api/v4/projects/127/packages/pypi/simple
Collecting MyProjectName
  Downloading http://gitlab.********************/api/v4/projects/127/packages/pypi/files/faaf3caa6d6a25f96f1862cdb098271f49b02a1fd2e8382c6cd394c6082690e1/MyProjectName-3.7.dev0-cp38-cp38-linux_x86_64.whl (2.5 MB)
Installing collected packages: MyProjectName
Successfully installed MyProjectName-3.7.dev0

The http://QA-build-token:****@gitlab.********************/api/v4/projects/127/packages/pypi/simple contains following links :

<a href="http://gitlab.********************/api/v4/projects/127/packages/pypi/simple/MyProjectName" data-requires-python="">MyProjectName</a>
<a href="http://gitlab.********************/api/v4/projects/127/packages/pypi/simple/MyProjectName" data-requires-python="">MyProjectName</a>
<a href="http://gitlab.********************/api/v4/projects/127/packages/pypi/simple/MyProjectName" data-requires-python="">MyProjectName</a>
<a href="http://gitlab.********************/api/v4/projects/127/packages/pypi/simple/MyProjectName" data-requires-python="">MyProjectName</a>
<a href="http://gitlab.********************/api/v4/projects/127/packages/pypi/simple/MyProjectName" data-requires-python="">MyProjectName</a>
<a href="http://gitlab.********************/api/v4/projects/127/packages/pypi/simple/MyProjectName" data-requires-python="">MyProjectName</a>

And the http://gitlab.********************/api/v4/projects/127/packages/pypi/simple/MyProjectName contains (short version) :

<a href="http://gitlab.********************/api/v4/projects/127/packages/pypi/files/faaf3caa6d6a25f96f1862cdb098271f49b02a1fd2e8382c6cd394c6082690e1/MyProjectName-3.7.dev0-cp38-cp38-linux_x86_64.whl#sha256=faaf3caa6d6a25f96f1862cdb098271f49b02a1fd2e8382c6cd394c6082690e1" data-requires-python="">MyProjectName-3.7.dev0-cp38-cp38-linux_x86_64.whl</a>
<a href="http://gitlab.********************/api/v4/projects/127/packages/pypi/files/10c1c32aed0c3d64118e0e85b1a02090ef6204235730c9c4dc346fd1e1b29f5a/MyProjectName-3.3.tar.gz#sha256=10c1c32aed0c3d64118e0e85b1a02090ef6204235730c9c4dc346fd1e1b29f5a" data-requires-python="">MyProjectName-3.3.tar.gz</a>
<a href="http://gitlab.********************/api/v4/projects/127/packages/pypi/files/b3386f735bcf678b912d695af71e13825c38bafffa04169ca87e0567c10f7d3f/MyProjectName-4.0.dev0-cp38-cp38-linux_x86_64.whl#sha256=b3386f735bcf678b912d695af71e13825c38bafffa04169ca87e0567c10f7d3f" data-requires-python="">MyProjectName-4.0.dev0-cp38-cp38-linux_x86_64.whl</a>

The Gitlab pypi registry looks correct ? The wrong latest version install problem can be from Gitlab ?

Thanks in advance for your time.
bux.