1Answer
  • 13
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Update a PyPI package

Is there a way to update a PyPI package without changing the version number?

Imagine, for a second, that I've found a small bug in a package I recently uploaded to PyPI. Is there a way to edit/re-upload the code without incrementing the version number?

UPDATE I guess I should clarify that by "bug" I mean the version number in the actual source code is wrong - it's not a functional thing, it just means if you do package.version you get the previous version, not the current one (and yes I know this could cause a bug in someone else's code, but given we're in alpha I'd hope version dependencies haven't set in just yet...). For the record, clearly silent bug fixes are bad!

UPDATE 2 As of Jan 2015 the solution provided is no longer valid - see this post for more information.

      • 2
    • There's also testPyPI if you want to load your package, run pip3 install -i https://testpypi.python.org/pypi , and confirm the package passes unit tests before pushing to real PyPI. It works the same as PyPI -- so you also can't repeat uploads of the same version number there.

When you encountered a bug, always upload a new release.

Increase the version number, include a changelog, call it a brown-bag release (it wasn't me, it was someone wearing a brown bag over their heads, really, honestly).

You never know whom already may have downloaded a copy of the release (on a mirror, directly from your github page, whatever) that will never know that you fixed a bug quietly. Moreover, those that did figure out you replaced the release, now have to learn how to force a reinstall.

Don't replace a released package with a silent bugfix. Do not be tempted. Just make a new release.

If, on the other hand, you managed somehow to corrupt the distribution file itself, so the .zip or .tar.gz file is b0rken, then you need to manually remove the file using the PyPI web interface and re-upload.

As of the 24th of January, PyPI will not even let you reuse a filename anymore; that means that you cannot re-upload a new file with the same version number.

If all you did wrong was a packaging error, you can add a .postN postfix to the version number (so .post1, .post2, etc.) to indicate a post-release update.

  • 53
Reply Report

Trending Tags