seanpianka / Zipcodes

A simple library for querying U.S. zipcodes.
MIT License
78 stars 15 forks source link

Automatic trailing newlines issues a setup warning. #12

Closed skeptycal closed 4 years ago

skeptycal commented 4 years ago

Running setup after cloning the repo locally shows the following warning:

/usr/local/lib/python3.8/site-packages/setuptools/dist.py:450: UserWarning: Normalizing '1.1.0
' to '1.1.0'

A newline was added to the version.txt file automatically. This is not uncommon behavior - Some editors (VSCode) or .gitconfig settings apply a trailing newline automatically to certain filetypes. It is likely to be configured this way in a reasonable amount of systems.

Setup still runs correctly, but issues the warning. The warning does not indicate if any further problems could occur, but passing the correct version format (PEP 404) is preferred.


To avoid the warning:

The version text should be stripped of trailing whitespace after loading the file data. (Another method is simply reading the first line of the version.txt file. While this may work, it could also interfere with future updates to the version storage methods. e.g. semver automation.)

seanpianka commented 4 years ago

Thanks for the help and your code contribution!

skeptycal commented 4 years ago

Thank you! Happy to contribute =)