dabapps / django-log-request-id

Django middleware and log filter to attach a unique ID to every log message generated as part of a request
BSD 2-Clause "Simplified" License
371 stars 64 forks source link

1.1.0 distribution on pypi contains __pycache__ folder for cpython-34 #12

Closed highflyingaction closed 8 years ago

highflyingaction commented 8 years ago

Downloading django-log-request-id-1.1.0.tar.gz from https://pypi.python.org/pypi/django-log-request-id/1.1.0 contains a __pycache__ folder of pyc files for cpython-34. That probably shouldn't be there. I think it is the reason I'm getting ValueError: bad marshal data (unknown type code) when trying to build on python 2.7.

franciscoruiz commented 8 years ago

Any progress on this? Simplest option would be building the package (e.g. python setup.py sdist) on a clean directory. Proper option would require altering setup.py to find_packages.

j4mie commented 8 years ago

Not sure why this happened. I'm cleaning up some issues at the moment so next time I do a release, I'll see if it happens again.

j4mie commented 8 years ago

@jamesodo @franciscoruiz can you check 1.2.0 please? I don't know enough about Python packaging to understand this fully, but I'll dig into it if I need to.

franciscoruiz commented 8 years ago

Hi @j4mie I've tried and it works in both Python 2.7.12 and 3.5.2. Thanks!

highflyingaction commented 8 years ago

Works for me too. Thanks. I think the problem in 1.1.0 was caused by loading the code in the directory into a python environment before packaging it. That created the __pycache__ and .pyc files for the version of python you were using, which won't work with other environments after others download the package.

j4mie commented 8 years ago

Thanks both!