localshop
localshop copied to clipboard
localshop no longer accepts namespaced packages
Hi, it looks like localshop stopped accepting namespaced packages. I have localshop==0.9.3
.
(package) jchen@hobbes-(master|✔)> ./setup.py sdist upload -r int
running sdist
running egg_info
writing requirements to namespaced.package.egg-info/requires.txt
writing namespaced.package.egg-info/PKG-INFO
writing top-level names to namespaced.package.egg-info/top_level.txt
writing dependency_links to namespaced.package.egg-info/dependency_links.txt
reading manifest file 'namespaced.package.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'namespaced.package.egg-info/SOURCES.txt'
warning: sdist: standard file not found: should have one of README, README.rst, README.txt
running check
creating namespaced.package-0.0.21
creating namespaced.package-0.0.21/bin
creating namespaced.package-0.0.21/systems
creating namespaced.package-0.0.21/namespaced.package.egg-info
creating namespaced.package-0.0.21/namespaced.package
creating namespaced.package-0.0.21/tests
making hard links in namespaced.package-0.0.21...
hard linking MANIFEST.in -> namespaced.package-0.0.21
hard linking README.md -> namespaced.package-0.0.21
hard linking setup.cfg -> namespaced.package-0.0.21
hard linking setup.py -> namespaced.package-0.0.21
hard linking bin/inventory -> namespaced.package-0.0.21/bin
hard linking bin/qrcodegen -> namespaced.package-0.0.21/bin
hard linking systems/__init__.py -> namespaced.package-0.0.21/systems
hard linking namespaced.package.egg-info/PKG-INFO -> namespaced.package-0.0.21/namespaced.package.egg-info
hard linking namespaced.package.egg-info/SOURCES.txt -> namespaced.package-0.0.21/namespaced.package.egg-info
hard linking namespaced.package.egg-info/dependency_links.txt -> namespaced.package-0.0.21/namespaced.package.egg-info
hard linking namespaced.package.egg-info/requires.txt -> namespaced.package-0.0.21/namespaced.package.egg-info
hard linking namespaced.package.egg-info/top_level.txt -> namespaced.package-0.0.21/namespaced.package.egg-info
hard linking namespaced.package/__init__.py -> namespaced.package-0.0.21/namespaced.package
hard linking namespaced.package/arbitrary.py -> namespaced.package-0.0.21/namespaced.package
hard linking namespaced.package/colors.py -> namespaced.package-0.0.21/namespaced.package
hard linking namespaced.package/label.py -> namespaced.package-0.0.21/namespaced.package
hard linking namespaced.package/repl.py -> namespaced.package-0.0.21/namespaced.package
hard linking namespaced.package/templates.py -> namespaced.package-0.0.21/namespaced.package
hard linking namespaced.package/util.py -> namespaced.package-0.0.21/namespaced.package
hard linking tests/__init__.py -> namespaced.package-0.0.21/tests
hard linking tests/test_util.py -> namespaced.package-0.0.21/tests
copying setup.cfg -> namespaced.package-0.0.21
Writing namespaced.package-0.0.21/setup.cfg
Creating tar archive
removing 'namespaced.package-0.0.21' (and everything under it)
running upload
Submitting dist/namespaced.package-0.0.21.tar.gz to https://pypi/simple/
Upload failed (400): Enter a valid name consisting of letters, numbers, underscores or hyphens
error: Upload failed (400): Enter a valid name consisting of letters, numbers, underscores or hyphens
Seems like the usage of the SlugField
type is causing the issue:
https://github.com/mvantellingen/localshop/blob/3ebb5869dffe82c34d7e3cc004b8b9ccd064daa3/localshop/apps/packages/models.py#L39
.
is a valid character in a namespaced python package PEP-0420
this issue does not exist in 0.9.0
.
Thanks, i'll look into it!
You probably set your LOCALSHOP_VERSIONING_TYPE
to something else than None
.
I don't have that key in my localshop.conf.py
. Does it default to something other than None
? The docs claim if the key is not defined it defaults to None
.
Thanks fly.
@mvantellingen This issue was caused by PR number 147 which fixed a problem in the Index view but now stops package with "invalid" names from being uploaded.
Maybe we should change the SlugField validation rules or just stop using it at all.