• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

GavinHuttley / scinexus / 34671055637
100%

Build:
DEFAULT BRANCH: main
Ran 12 Sep 2026 03:42AM UTC
Jobs 0
Files 0
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
  cancel
34671055637

push

github

GavinHuttley
MAINT: failure cleanup is registered rather than caught

Four places acquired a resource, did something that could fail, and
released the resource in an except Exception that re-raised. The
pattern is a poor one, and the objection that we ought to know which
exception to expect is right in two of the four.

Where the failure set is knowable it is now named in the comment
rather than in the code, because naming it in the code is what the
handler must not depend on. open_url's hand-off raises LookupError for
an unknown codec, ValueError for an illegal newline and TypeError for
an unknown argument, and opening a zip adds BadZipFile and the
ValueError for a multi-member archive. Narrowing to the three argument
errors was tried and leaks the response on the archive, which is a
socket for an http url, so the test added here for it fails. The
remaining sites are the same shape: open_zip's read gives LookupError
or ValueError from the wrapper, atomic_write._get_fileobj adds
whatever the open itself fails for, and _replace_zip_member
decompresses every other member of the archive and so can fail on
content that has nothing to do with the member being replaced.

None of these handlers handles anything. Each releases something and
gets out of the way, which is what contextlib.ExitStack with a
registered callback and pop_all on success says directly, with no
exception named or caught at all.

The one observable change is that the cleanup now runs for a
BaseException as well, and a test covers it: a KeyboardInterrupt
between urlopen and the return used to leave the socket open with no
handle on it anywhere. That test fails against the old handler, which
is the only test here that does.

Two claims made in a first version of these comments were wrong and
are worth recording. BadGzipFile and LZMAError were named as failures
the open_url cleanup covers, and they are not: gzip, bz2 and lzma
construct over a file object lazily and do not touch it until the
first read, ... (continued)
Source Files on build 34671055637
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #34671055637
  • 7b7c8621 on github
  • Prev Build on main (#33451730151)
  • Next Build on main (#34673606471)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc