1 parent 4a2c61a commit 3cd9cc0Copy full SHA for 3cd9cc0
2 files changed
CHANGES/+py-version-parsing.bugfix
@@ -0,0 +1 @@
1
+Fixed a bug where the `python_version` field was not parsed correctly when Pulp workers had hyphens in their name.
pulp_python/app/utils.py
@@ -1,6 +1,7 @@
import hashlib
2
import json
3
import logging
4
+import os
5
import re
6
import shutil
7
import tempfile
@@ -206,7 +207,7 @@ def get_project_metadata_from_file(filename):
206
207
else:
208
pyver = ""
209
regex = DIST_REGEXES[extensions[pkg_type_index]]
- if bdist_name := regex.match(filename):
210
+ if bdist_name := regex.match(os.path.basename(filename)):
211
pyver = bdist_name.group("pyver") or ""
212
metadata.python_version = pyver
213
return metadata
0 commit comments