-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
setuptools >= 20.2 may break applications using pyparsing #580
Comments
Hi Sebastian. Sorry to hear this change is causing you problems. Unfortunately, removing pyparsing from the vendored packages isn't an easy operation. It's quite possible that the |
We so badly need a common, principled way to vendorize! pip's approach seems to be the current best in breed. |
@warsaw: Agreed. The setuptools implementation rose out of #229, which was originally based on the vendoring of |
I'm currently trying to investigate this problem a bit more, but creating a mininal example environment with cx_Freeze seems to be difficult. Theoretically having two pyparsing modules should to be just fine, as long as they have different, stable module names. There problem here seems to be that at some point the |
Also note that at no point the Both the modules |
That seems incorrect to me. Throughout the
The way the vendoring code works is it prefers the vendored version if available but will use the canonical version if the vendored version is not available and it installs this resolved package into the
This is expected. Due to the preference for the vendored package, a preference which @dstufft said was preferable because it meant that pkg_resources could more reliably depend on a specific version, there would have to be two modules.
Can you confirm that the uncaught ParseExceptions are coming from calls in |
I'm developing an application that uses
pyparsing
and after upgrading setuptools to the newest version I noticed some tests failing. In my main parser module I define an alias for theParseBaseException
which I then use in other parts of the application to catch exceptions:Now my tests were failing because the
ParseException
was never actually caught. Some investigation by comparing the id() of the objects showed that theParseException
alias was no longer the same object aspyparsing.ParseBaseException
. This was because the modulepyparsing
at the time of the alias definition was not the samepyparsing
module which is later used for parsing. Looking atsys.module
I can see that I have twopyparsing
modules:At the time of the alias definition
id(pyparsing)
is equal to theid()
ofpkg_resources.extern.pyparsing
. When I later importpyparsing
I get the other module. This whole problem only happens when I use the application packaged by cx_Freeze, so maybe some kind of race condition happens when importing from a ZIP file. I'm using 64 bit Python 3.4.4 on Windows.The first version of setuptools where I can see this problem is 20.2, until 20.1 everything is fine. Looking at the source I can see that starting with 20.2 setuptools also includes its own
pyparsing
copy, so most likely that change is related to my problem.The text was updated successfully, but these errors were encountered: