~launchpad-committers/zope.testrunner:launchpad

Last commit made on 2021-03-17
Get this branch:
git clone -b launchpad https://git.launchpad.net/~launchpad-committers/zope.testrunner
Members of Launchpad Committers can upload to this branch. Log in for directions.

Branch merges

Branch information

Name:
launchpad
Repository:
lp:~launchpad-committers/zope.testrunner

Recent commits

faf13bd... by Colin Watson

Preparing release 5.3.0+lp1

1c7d336... by Colin Watson

Merge tag '5.3.0' into launchpad

Tagging 5.3.0

e71cd3b... by Marius Gedminas

Preparing release 5.3.0

e01d58f... by Marius Gedminas

Document Python 3.9 support in the changelog

cc05d55... by Marius Gedminas

Merge pull request #118 from zopefoundation/config-with-pure-python

Configuring for pure-python

f461d34... by Marius Gedminas

Configuring for pure-python

3fad181... by Jürgen Gmach

Fix `package init file missing` warning (#113)

This fixes #112

3d76ced... by Colin Watson

Merge pull request #114 from cjwatson/py3-improve-buffering

Improve standard stream handling when buffering

eb3852c... by Colin Watson

Improve standard stream handling when buffering

One of the last remaining issues in porting Launchpad to Python 3 is
that our CI infrastructure runs tests with subunit output (thereby
enabling test output buffering), and a few tests assume that on Python 3
they can use `sys.stdout.buffer` or `sys.stderr.buffer` to get an object
suitable for writing binary data to the standard streams. These tests
currently fail because when zope.testrunner is doing test output
buffering it replaces the standard streams with instances of
`io.StringIO`.

Now, it's true that https://docs.python.org/3/library/sys.html notes
that "the standard streams may be replaced with file-like objects like
`io.StringIO` which do not support the `buffer` attribute"; however,
there are a couple of cases where it's difficult to work around this,
for example because the assumption is baked into existing libraries like
subunit itself. Besides, I don't think that this note in the standard
library documentation *necessarily* means that zope.testrunner has to
do something inconvenient.

An alternative approach is to use a variant of `io.TextIOWrapper`, which
provides the `buffer` attribute for tests that need it, and can easily
be made to continue to provide the `getvalue` method for internal use.
This seems like a good compromise.

136e0b3... by Marius Gedminas

Merge pull request #116 from zopefoundation/config-with-pure-python

Configuring for pure-python