twisted / ampoule

Process pool for Twisted, using AMP
Other
12 stars 19 forks source link

Twisted warning after ampoule installation #18

Closed moshez closed 6 years ago

moshez commented 6 years ago

Since i installed ampoule i receive a warning when importing twisted.

This is always reproducible by issuing: $ python

import twisted import pkg_resources /usr/bin/ipython:1: UserWarning: Module twisted was already imported from /usr/lib64/python2.7/site-packages/twisted/init.pyc, but /usr/lib/python2.7/site-packages/ampoule-0.2.1-py2.7.egg is being added to sys.path

!/usr/bin/python

if i erase ampoule the warning disappears.

I think this is due to ampoule uncorrectly stating that he owns the twisted package: $ cat /usr/lib/python2.7/site-packages/ampoule-0.2.1-py2.7.egg/EGG-INFO/top_level.txt ampoule twisted

It also may be the same as this (see msg230): http://bugs.python.org/setuptools/issue36

I'm using the latest version from trunk, on fedora 14 with python-setuptools 0.6.14 (the Distribute fork) an python 2.7. Ampoule is installed using "python setup.py install".

A solution (which if i'm not wrong is what they're doing with nevow) could be to declare the twisted ampoule plugin as package data in setup.py.

moshez commented 6 years ago

Does not reproduce with

attrs==17.3.0
Automat==0.6.0
constantly==15.1.0
hyperlink==17.3.1
incremental==17.5.0
six==1.11.0
Twisted==17.9.0
zope.interface==4.4.3

and current HEAD (9232ffa43fcbb094f52dd9cf3e38d15027ab21b7)