Closed fungi closed 9 years ago
Note pathlib is not in stdlib for python < 3.4. You can install it from pypi but django-pyscss does not list pathlib as a dependency in its setup.py so it does not get installed on older python.
Thanks for the report guys. Patch incoming.
Hi,
Thanks for bringing this up. Can I ask what version of pyScss you are using? I'm liking at their choice and it seems to depend on pathlib for Python < 3.4. We're running the tests on Python 3.3 and 3.4 and it seems to be working.
Thanks again! -Rocky Meza 2015年4月22日 下午6:10于 "Clark Boylan" notifications@github.com写道:
Note pathlib is not in stdlib for python < 3.4. You can install it from pypi but django-pyscss does not list pathlib as a dependency in its setup.py so it does not get installed on older python.
— Reply to this email directly or view it on GitHub https://github.com/fusionbox/django-pyscss/issues/33#issuecomment-95372506 .
That is pretty strange since pyScss 1.3 has pathlib as a dependency. How did you install django-pyscss?
django-pyscss should probably have it as a dependency no matter what since it does import it.
I think I see what's going on. You guys are requiring pyScss<1.3: https://github.com/openstack/requirements/blob/8c0ff9178c367c5749100fdf00e3a61815c81baa/global-requirements.txt#L48. django-pyscss 2.0 requires pyScss>=1.3. (See the changelog for 2.0.0: https://pypi.python.org/pypi/django-pyscss/2.0.0#id1). You should stay on the 1.x series of django-pyscss if you really need pyScss 1.2, or allow pyScss 1.3 in your requirements.
I can explicitly require pathlib and release 2.0.1 if it will help at all, but you're still going to have to change your pin. I'm going to close this since pathlib does get installed with the right version of pyScss, but feel free to comment if you want 2.0.1.
Good find, I believe you are correct about our requirements mismatch.
From what I can tell the backtrace originates from django-pyscss calling into pathlib directly so I do think adding a dependency on pathlib is something that should happen in django-pyscss, reguardless.
Thanks!
Agreed. If django-pyscss imports a module then it should ideally have the package providing that module listed as a direct dependency, not simply rely on it being provided as a transitive dependency (this is an insurance policy against a future update to pyScss dropping its use of pathlib).
It's still odd that the versioned install_requires on pyScss>=1.3.4 didn't raise an error during installation.
Anyway, thanks for spotting the mismatch! I'll get our requirements adjusted to accomodate that.
Fixed in the 2.0.1 release! Thanks for bringing this up!
New in 2.0.0: import Py3K stdlib module pathlib even on Python 2.x where it does not exist