-
Notifications
You must be signed in to change notification settings - Fork 38
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
zipimport.zipimporter.get_filename used for python<2.7 #19
Comments
I just ran into this too on Python 2.6.7. It seems to work just fine for me on Python 2.6.5, but on Python 2.6.7 the zipimporter doesn't seem to have |
Python 2.6.5 and 2.6.7 have no substantive differences in the zipimport.c extension module. The following are from versions just built from source:
|
The codepath which is triggering that error isn't even supposed to be triggered on Python < 3.3: https://github.com/Pylons/venusian/blob/master/venusian/__init__.py#L187 |
Yeah that code path shouldn't be triggered on Python < 3.3 according to the comment. It checks for |
Here's how my Python 2.6.7
|
Hmmm, zipimporter in 2.6 and 2.7 look alike to me. I wonder if the problem is that in this particular environment with the problem I have zipped eggs in my site-packages and in my working envs, I didn't... |
Looking more closely: I don't think venusian actually supports zipped eggs (although a patch to make it work would be cool). |
If venusian does not support zipped eggs, than imho it is the wrong tool for what pyramid uses it for. It is highly impracticle (and takes about ten times longer for the feel of it), to upload the needed packages as directories via ftp. Some 1000 files in directory structures feels much more messy than putting up a few egg files. (sorry for closing this issue - I hit the wrong button. I'm still new to github...) |
I don't have much of a need to use zipped eggs, so I solved this problem by making sure that the two zipped eggs that crept into my site-packages were not zipped (e.g.: added I don't need zipped eggs so I probably won't tackle adding that to Venusian though if someone else did, I might help test/review it if it needed more eyes. |
Indeed, Venusian does not currently support zipped packages properly. Note that this isn't really a zipped eggs problem, as you can put zipfiles on the PYTHONPATH that are not eggs. I'd encourage anyone who wants to see Venusian support this to add the feature with a set of tests that makes sure it works as well as non-zipped packages. |
A note for a future implementer.. on Python 2.7, you can test if the importer is a zipimporter in
Note however that the |
It scans through a zip file (`zipped.zip`). See PylonsGH-19
See #43 Does Venusian support zipped packages now? |
They scan through a zip file (`zipped.zip`). See PylonsGH-19
They scan through a zip file (`zipped.zip`). See PylonsGH-19
Version 1.1.0 has just been uploaded to pypi: https://pypi.python.org/pypi/venusian/1.1.0 |
Just put pyramid project on webhoster server using python 2.6.6 (r266:84292, Dec 26 2010, 22:48:11) [GCC 4.4.5]. Since it has almost none of my needed packages, I was putting an egg-collection on the server as well, (containing venusian version: venusian-1.0a7-py2.6). Since I did not want to upload 4000 files, I used compressed eggs
wsgi failed with:
which is no surprise, since
get_filename
was introduced in python2.7. It look's like that code is supposed to be for python3.3, but still got executed in 2.6 there.Update:
Just tried out venusian-1.0a6-py2.6 (since the error producing line is new to a7), I got:
So, the expected attribute
etc
must be missing. Not sure why, but that's the problem in both cases, I guess.Update 2:
I was able do get my app running, by putting all eggs not as compressed files, but as directories (since problem was related to zipping, obviously). Still I think, there is something going wrong in venusian there.
The text was updated successfully, but these errors were encountered: