tk0miya / testing.common.database

Apache License 2.0
6 stars 11 forks source link

.pth breaks pip and other tools #2

Closed georgevreilly closed 8 years ago

georgevreilly commented 8 years ago

I upgraded from testing.postgresql 1.1.2 to 1.3.0 and my app no longer installs on ElasticBeanstalk. I've narrowed it down to testing.common.database-1.1.0-py2.7-nspkg.pth:

[ec2-user@ip-redacted venv]$ ./bin/pip --version
pip 7.1.2 from /opt/python/run/venv/local/lib/python2.7/site-packages (python 2.7)

[ec2-user@ip-redacted venv]$ sudo ./bin/pip install testing.common.database
Collecting testing.common.database
  Using cached testing.common.database-1.1.0-py2.py3-none-any.whl
Installing collected packages: testing.common.database
Successfully installed testing.common.database-1.1.0
You are using pip version 7.1.2, however version 8.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

[ec2-user@ip-redacted venv]$ ./bin/pip --version
Traceback (most recent call last):
  File "/opt/python/run/venv/lib64/python2.7/site.py", line 890, in <module>
    main()
  File "/opt/python/run/venv/lib64/python2.7/site.py", line 848, in main
    virtualenv_search_paths(sys.prefix)
  File "/opt/python/run/venv/lib64/python2.7/site.py", line 638, in virtualenv_search_paths
    addsitedir(sitedir, known_paths)
  File "/opt/python/run/venv/lib64/python2.7/site.py", line 204, in addsitedir
    addpackage(sitedir, name, known_paths)
  File "/opt/python/run/venv/lib64/python2.7/site.py", line 173, in addpackage
    exec(line)
  File "<string>", line 1, in <module>
KeyError: 'testing'

[ec2-user@ip-redacted venv]$ sudo mv lib/python2.7/site-packages/testing.common.database-1.1.0-py2.7-nspkg.pth lib/python2.7/site-packages/testing.common.database-1.1.0-py2.7-nspkg.pth.bak

[ec2-user@ip-redacted venv]$ ./bin/pip --version
pip 7.1.2 from /opt/python/run/venv/local/lib/python2.7/site-packages (python 2.7)
georgevreilly commented 8 years ago

Here's some more information about the virtualenv and the system:

[ec2-user@ip-redacted venv]$ uname -a
Linux ip-redacted 4.1.10-17.31.amzn1.x86_64 #1 SMP Sat Oct 24 01:31:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

[ec2-user@ip-redacted venv]$ cat /etc/system-release
Amazon Linux AMI release 2015.09

[ec2-user@ip-redacted venv]$ bin/python --version
Python 2.7.10

[ec2-user@ip-172-31-45-106 venv]$ ./bin/pip freeze
alembic==0.8.4
amqp==1.4.9
anyjson==0.3.3
attrdict==2.0.0
bcrypt==2.0.0
beautifulsoup4==4.4.1
billiard==3.3.0.22
boto==2.39.0
cbcommon==0.3.0
cbmltk==0.0.5
celery==3.1.20
cffi==1.5.2
Chameleon==2.24
colander==1.2
contexttimer==0.3.1
Cookbrite==0.1
cornice==0.18.2
coverage==4.0.3
datadog==0.1.1
decorator==3.4.0
deform==2.0a2
docopt==0.4.0
ecdsa==0.13
elasticsearch==1.9.1
elasticsearch-dsl==0.0.11
Fabric==1.9.0
Flask==0.10.1
httpretty==0.8.10
interval==1.0.0
iso8601==0.1.11
itsdangerous==0.24
Jinja2==2.8
kombu==3.0.33
lxml==3.5.0
Mako==1.0.3
mandrill==1.0.57
MarkupSafe==0.23
mock==1.0.1
moto==0.4.21
networkx==1.9.1
nose==1.3.7
nose-xunitmp==0.3.2
objgraph==2.0.1
paramiko==1.16.0
passlib==1.6.5
PasteDeploy==1.5.2
Pattern==2.6
peppercorn==0.5
pg8000==1.10.3
Pillow==2.7.0
Pint==0.6
pip2pi==0.6.8
protobuf==2.6.1
psycopg2==2.6.1
py2neo==2.0.8
pycparser==2.14
pycrypto==2.6.1
Pygments==2.1.1
pyparsing==2.0.3
pyramid==1.6.1
pyramid-debugtoolbar==2.4.2
pyramid-mako==1.0.2
pyramid-tm==0.12.1
python-dateutil==2.2
python-editor==0.5
python-magic==0.4.10
pytz==2015.7
PyYAML==3.11
repoze.lru==0.6
requests==2.6.0
rollbar==0.11.2
sh==1.11
Shared==0.1
simpleflake==0.1.6
simplejson==3.8.2
siphash==0.0.1
six==1.10.0
SQLAlchemy==0.9.9
SQLAlchemy-Searchable==0.8.0
SQLAlchemy-Utils==0.29.8
sqlparse==0.1.18
sqltap==0.3.10
testing.common.database==1.1.0
testing.elasticsearch==0.3.0
testing.postgresql==1.3.0
titlecase==0.8.1
transaction==1.4.4
translationstring==1.3
unicodecsv==0.14.1
unittest-xml-reporting==2.0.0
urllib3==1.9.1
validators==0.10
venusian==1.0
waitress==0.8.10
WebOb==1.5.1
WebTest==2.0.20
Werkzeug==0.11.4
WSGIProxy2==0.4.2
xmltodict==0.9.2
zope.deprecation==4.1.2
zope.interface==4.1.3
You are using pip version 7.1.2, however version 8.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
tk0miya commented 8 years ago

It seems bug of testing.elasticsearch. It seems the package does not define any namespace_packages. So these packages get conflicts at the testing namespace. Could you let them about it.

(or use testing.elasticsearch2 package instead. It will work fine :-)