PyPi does not allow duplicate file names -- this makes lots of sense,
because you really don't want people to go to PyPi one day and grab a file,
and then go there another day, grab a file with exactly the same name, and
have it be a different file.
We are all too human, and make mistakes when doing a release. All to often
someone pushed a broken file up to PyPi, often realizes it pretty quickly
-- before anyone has a chance to even download it (or only the dev team as,
In fact, I was in a sprint last summer, and we decided to push our package
up to PyPi -- granted, we were all careless amateurish noobs, but we ended
up making I think 4! minor version bumps because we had done something
stupid in the sdist.
Also -- the latest numpy release got caught in this, too:
* We ran into a problem with pipy not allowing reuse of filenames and a
resulting proliferation of *.*.*.postN releases. Not only were the names
getting out of hand, some packages were unable to work with the postN
So -- I propose that PyPi allow projects to replace existing files if they
REALLY REALLY want to.
You should have to jump through all sorts of hoops, and make it really
clear that it is a BAD IDEA in the general case, but it'd be good to have
it be possible.
After all -- PyPi does not take on responsibility for anything else about
what's in those packages, and Python itself is all about "we're all
consenting adults here"
I suppose we could even put in some heuristics about how long the file as
been there, how many times it's been downloaded, etc.
Just a thought.....I really hate systems that don't let me roll back
mistakes, even when I discover them almost immediately...
Christopher Barker, Ph.D.
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
I've got two projects: mynamespace.myprojectA and mynamespace.myprojectB
myprojectB depends on myprojectA. I'm using setuptools 0.6c8 to manage both
Both projects are registered using 'setup develop'. Both projects are
accessible from an interactive interpreter:
PS C:\Users\me\projects> python
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Type "help", "copyright", "credits" or "license" for more information.
>>> import mynamespace.myprojectA
>>> import mynamespace.myprojectB
>>> from mynamespace.myprojectA import mymoduleZ
However, when I run 'setup test' in myprojectB, the tests fail with
File ".mymoduleZ.py", line NNN, in [some context]
from mynamespace.myprojectA.mymoduleZ import MyClassC
ImportError: No module named myprojectA.mymoduleZ
In setup.py, the test_suite is nose.collector.
I searched and couldn't find anyone else with this problem. Is this a
supported configuration? Is there something I can do to make tests work
with interdependent projects with the same root namespace?
If there's not something obvious I should be doing differently, I'm happy to
put together a minimal test case that reproduces the problem. Any
suggestions are appreciated.
Jason R. Coombs
I am a research programmer at the NYU School of Engineering. My colleagues
(Trishank Kuppusamy and Justin Cappos) and I are requesting community
feedback on our proposal, "Surviving a Compromise of PyPI." The two-stage
proposal can be reviewed online at:
Summary of the Proposal:
"Surviving a Compromise of PyPI" proposes how the Python Package Index
(PyPI) can be amended to better protect end users from altered or malicious
packages, and to minimize the extent of PyPI compromises against affected
users. The proposed integration allows package managers such as pip to be
more secure against various types of security attacks on PyPI and defend
end users from attackers responding to package requests. Specifically,
these PEPs describe how PyPI processes should be adapted to generate and
incorporate repository metadata, which are signed text files that describe
the packages and metadata available on PyPI. Package managers request
(along with the packages) the metadata on PyPI to verify the authenticity
of packages before they are installed. The changes to PyPI and tools will
be minimal by leveraging a library, The Update Framework
<https://github.com/theupdateframework/tuf>, that generates and
transparently validates the relevant metadata.
The first stage of the proposal (PEP 458
<http://legacy.python.org/dev/peps/pep-0458/>) uses a basic security model
that supports verification of PyPI packages signed with cryptographic keys
stored on PyPI, requires no action from developers and end users, and
protects against malicious CDNs and public mirrors. To support continuous
delivery of uploaded packages, PyPI administrators sign for uploaded
packages with an online key stored on PyPI infrastructure. This level of
security prevents packages from being accidentally or deliberately tampered
with by a mirror or a CDN because the mirror or CDN will not have any of
the keys required to sign for projects.
The second stage of the proposal (PEP 480
<http://legacy.python.org/dev/peps/pep-0480/>) is an extension to the basic
security model (discussed in PEP 458) that supports end-to-end verification
of signed packages. End-to-end signing allows both PyPI and developers to
sign for the packages that are downloaded by end users. If the PyPI
infrastructure were to be compromised, attackers would be unable to serve
malicious versions of these packages without access to the project's
developer key. As in PEP 458, no additional action is required by end
users. However, PyPI administrators will need to periodically (perhaps
every few months) sign metadata with an offline key. PEP 480 also proposes
an easy-to-use key management solution for developers, how to interface
with a potential build farm on PyPI infrastructure, and discusses the
security benefits of end-to-end signing. The second stage of the proposal
simultaneously supports real-time project registration and developer
signatures, and when configured to maximize security on PyPI, less than 1%
of end users will be at risk even if an attacker controls PyPI and goes
undetected for a month.
We thank Nick Coghlan and Donald Stufft for their valuable contributions,
and Giovanni Bajo and Anatoly Techtonik for their feedback.
PEP 458 & 480 authors.
Is it currently possible to upgrade dependencies as well when
upgrading a packages? If not, this would be a really nice feature to
add to easy_install. Maybe a call like:
easy_install --upgrade --upgrade-deps Package
Obviously it makes sense to leave this off by default.
Elvelind Grandin reported a problem with the "develop" command that turned
out to be a flaw in its --find-links support. Specifically, it wasn't ever
processing the links. :)
In the process of fixing it, I wound up cleaning up an annoying (to me, at
least) quirk of the previous workings of --find-links. It used to be that
find-links would always be processed first, no matter what, even if you
were doing a completely local operation. This would've been especially
annoying if it carried over into "develop", so I made some changes.
Now, if an item passed to --find-links is local (a filename or file: URL),
or a direct link to an egg or other distribution, it is indexed
immediately. Remote URLs are now only retrieved if a dependency can't be
resolved locally, or if you use the -U or --upgrade options (this goes for
Note that this is a behavior change for easy_install, which was effectively
treating --find-links as though you'd specified --upgrade in certain
cases. So, if you're used to getting upgrades downloaded as a result of
using --find-links, please note that this will no longer
happen. EasyInstall will now *only* go online if a dependency can't be
resolved locally, if -U or --upgrade is used, or if you provided suitable
direct URLs via an argument or --find-links, or via a link in a local .html
I´m trying to do "easy_install setuptools==dev" in a windows box but have
an error with svn command.
"""... 'svn' is not recognized as an internal or external command, ..."""
I have installed TortoiseSVN but it seems that don't have command line, is
all with the Explorer.
Can you tell me what client I may use in windows?
Thanks for all,
Sharky @ PTNet
-----BEGIN PGP SIGNED MESSAGE-----
I'm new to distutils/and the egg system. I have not researched the
archives as much as I should, so please excuse me if this is familiar
Q: Is it possible for dependency checks to work for non pipy deployed eggs?
- B.egg (setup_requires and install_requires A.egg)
- email A and B eggs to friend
- tell friend to : easy_install B
- but B.egg does not install A...in fact, in my test case, it fails b/c
it cannot find A in pipy
- in this example, what happens if friend does not have net connection
on target machine? how can they install from the eggs alone and get the
dep checking to work?
Q: How does my friend run the unittests on the egg that they have just
installed? As I am developing, I frequently run the unittests and after
every bdist_egg build, I also run the unit tests that way, too. How can
the consumer do the same?
Q: One of my apps is a command line app, say foo.py is a command line
app that takes arg1, arg2,... How can the user run this app when it is
encased in an egg?
Q: How do I define my own pipy? While I like the idea of deploying there
for the overall community, I don't want to send my half baked code into
the wild. But I'd like to try the general functionality of having a
deploy site for my beta customers. How can I set this up?
Thanks in advance.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
-----END PGP SIGNATURE-----
Is it possible for a package to depend on one of several packages, with
the user having the option to pick? For example, my package P might
depend on package A, plus either package B or package C.
I know I could (ab)use extras_require, but in my case this is a real
dependency rather than an optional extra. The other option I have is to
just pick one of the dependencies (B or C in my example above), and
thereby force people to install it even though it's not strictly required.
Neither option seems particularly attractive.
The comma removed by the patch below implies that users working from a
Subversion checkout should not use EasyInstall to periodically fetch the
latest version. That's not what you intended to say, I assume?
You should also inform your users of the need to run this command, if they
-are working from a Subversion checkout, rather than using EasyInstall to
+are working from a Subversion checkout rather than using EasyInstall to
periodically fetch the latest version.
Hmm, probably much better than the patch above:
-You should also inform your users of the need to run this command, if they
-are working from a Subversion checkout, rather than using EasyInstall to
-periodically fetch the latest version.
+If your users are working from a Subversion checkout rather than using
+EasyInstall, you should also inform them of the need to run this command
+to periodically fetch the latest version.
At 05:43 AM 5/18/2004, David Handy wrote:
>On Tue, 18 May 2004, Floris van der Tak wrote:
>> my attempt to install the distutils on suse 9.0 (which provides python
>> 2.3) fails:
>Why are you installing distutils on a system that already has Python 2.3
>installed? Python 2.3 normally comes with distutils as part of the Python
>Did suse distribute a version of Python that had distutils removed?
It should come from python-devel