Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Valid package names are stored incorrectly with new version of bottle #102

Closed
virtuald opened this issue Jan 5, 2016 · 3 comments
Closed
Assignees
Labels
Milestone

Comments

@virtuald
Copy link
Contributor

virtuald commented Jan 5, 2016

Not sure when this was introduced, but pypiserver 1.1.2 didn't have this issue. From the bottle API docs:

Name of the file on the client file system, but normalized to ensure file system compatibility. An empty filename is returned as ‘empty’. Only ASCII letters, digits, dashes, underscores and dots are allowed in the final filename. Accents are removed, if possible. Whitespace is replaced by a single dash. Leading or tailing dots or dashes are removed. The filename is limited to 255 characters.

For example, the version 0.0.0+local is a valid package version, but bottle gets rid of the +. I'm sure there are other combinations that also break.

@ankostis
Copy link
Member

ankostis commented Jan 5, 2016

Any more patterns are highly appreciiated for when constructing TCs.

@virtuald
Copy link
Contributor Author

virtuald commented Jan 5, 2016

Well, PEP 440 has a lot to say about versioning... seems like for the most part its alpha-numeric, -, _, and +. I haven't given it a close reading.

My workaround for the moment is just to use the raw_filename from the FileUpload object. Obviously that's not a good long term solution.

@ankostis ankostis self-assigned this Jan 6, 2016
@ankostis
Copy link
Member

ankostis commented Jan 6, 2016

The latest v1.1.9 release has upgraded bottle from 1.11.6 --> 1.13-dev and this might be the cause of the problem. I will look into it the soonest.

@ankostis ankostis added this to the 1.2.0 milestone Jan 6, 2016
ankostis added a commit to ankostis/pypiserver that referenced this issue Jan 17, 2016
+ Use `content.raw_filename` for allowing PEP0440 chars.
+ Add upload app-TCs.
+ Improve parse-pkg core-TC.
+ Update CHANGES on forthcomming release.
ankostis added a commit to ankostis/pypiserver that referenced this issue Jan 17, 2016
+ Use `content.raw_filename` for allowing PEP0440 chars.
+ Add upload app-TCs.
+ Improve parse-pkg core-TC.
+ Update CHANGES on forthcomming release.
ankostis added a commit to ankostis/pypiserver that referenced this issue Jan 17, 2016
+ Use `content.raw_filename` for allowing PEP0440 chars.
+ Add upload app-TCs.
+ Improve parse-pkg core-TC.
+ Update CHANGES on forthcomming release.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants