| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In Python 3.11 the standard library `cgi` module was deprecated with a
planned removal set for Python 3.13. In preparation for that removal,
this commit removes the usage of this deprecated module and replaces it
with the still supported standard library `email` module which is what
the documentation points to as an alternative for how `cgi` was
previously used. This should still be compatible with all the supported
Python versions but will be more future proof and not emit any
deprecation warnings with Python 3.11 anymore.
|
|
|
|
|
|
|
|
|
|
| |
Under Debian, when attempting to run tests, the debian folder
is found and conflicts with this error:
setuptools.errors.PackageDiscoveryError: Multiple top-level packages discovered in a flat-layout: ['debian', 'testtools'].
This patch fixes this (I already applied it in Debian, and it
solved the issue for me).
|
|
|
|
| |
Not all objects have a __dict__ attribute.
|
|\ |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The changes for https://peps.python.org/pep-0657/ require a number of
changes in our tests.
Some tests still fail due to
https://twistedmatrix.com/trac/ticket/10336, so I'm not adding
3.11 to the test matrix yet.
Fixes #325.
|
|/
|
|
| |
`fixtures` 2.0 was released in 2016.
|
|\ |
|
| | |
|
| | |
|
|\ \
| |/ |
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
|
| |
We don't want to remove this immediately, but we should try to do so
sooner rather than later.
Signed-off-by: Stephen Finucane <stephen@that.guru>
Closes: #316
|
| |
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In Python 3, error messages have become a bit more precise. For
instance, the following code snippet:
----
class Foo():
def bar(self, a):
pass
try:
Foo().bar(1, 2)
except TypeError as e:
print(e)
----
will return:
- in Python 3.9: "bar() takes 2 positional arguments but 3 were given"
- in Python 3.10: "Foo.bar() takes 2 positional arguments but 3 were
given"
Fix our tests accordingly.
|
|/
|
|
|
| |
This allows projects dependent on testtools.compat some respite if
they haven't been updated for python 3.10 yet.
|
|\ |
|
| |
| |
| |
| |
| |
| | |
We can do this ourselves quite easily.
Signed-off-by: Stephen Finucane <stephen@that.guru>
|
| |
| |
| |
| |
| |
| |
| | |
This is kept separately from the reintroduction of 'try_imports' to keep
that patch reasonable.
Signed-off-by: Stephen Finucane <stephen@that.guru>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There are few if any people still (knowingly) using the 'extras' lib.
OpenStack users have their own implementation (sigh) in 'oslo.utils' and
everyone else is getting by with try-except statements. Reintroduce this
utility to 'testtools.helpers', allowing us to eventually drop the
dependency on extras. Note however that we can't actually do this yet
since 'fixtures' has an implicit dependency on 'extras' through
'testtools', and we break that by removing it here.
Signed-off-by: Stephen Finucane <stephen@that.guru>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This was being used in places to handle differences between Python 2 and
Python 3. Since we only care about the latter now, the utility can be
removed.
Signed-off-by: Stephen Finucane <stephen@that.guru>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This was used to workaround some issues with 'hasattr' on Python 2.x
versions, discussed in the source for extras (where this utility was
moved to make it more useful to others) [1] and elsewhere on the
internet [2]. These issues are no longer present on the versions of
Python we now support (Python 3.6+) so this is no longer necessary.
[1] https://github.com/testing-cabal/extras/blob/1.0.0/extras/__init__.py#L101-L108
[2] https://hynek.me/articles/hasattr/
Signed-off-by: Stephen Finucane <stephen@that.guru>
|
| |\ |
|
| | |\ |
|
| | | |
| | | |
| | | | |
Co-Authored-By: Jelmer Vernooij <jelmer@jelmer.uk>
|
| | | | |
|
| | | | |
|
| |\ \ \
| | | |/
| | |/| |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| |\ \ \ |
|
| | |\ \ \
| | | |/ / |
|
| | | | |
| | | | |
| | | | | |
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
|
| | | | | |
|
| | |\ \ \ |
|
| | |\ \ \ \ |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Currently testtools bases all of it's unittest extensions off of
unittest2 instead of the stdlib unittest. At one point this made sense
since unittest2 provided a stable base as unittest in stdlib added
features. But it's been ~5 years since there was a unittest2 release
(or a patch merged) and things have changed since then. The best
example of this is of the supported python versions listed in the
unittest2 project description/README only one is still supported by
upstream python, 2.7, which goes end of life at the end of this year.
More specific to testtools the use of unittest2 causes a whole slew of
issues because of differences in behavior with stdlib unittest. For
example here a couple issues encountered:
https://bugs.launchpad.net/testtools/+bug/1467558
https://bugs.launchpad.net/testtools/+bug/1417803
mtreinish/stestr#238
testing-cabal/testtools#272
which are caused, at least in part, by unittest2. There are likely other
bugs related to it that haven't been reported (or I just missed/forgot
about). At this point it's better to remove the unittest2 usage and just
rely on the upstream stdlib unittest which if nothing else is actively
maintained. It'll improve compatibility using the testtools runner with
stdlib unittest test suites and removes the class of bugs caused by the differences in unittest2.
Fixes #263
|
| | | | | | | |
|
| | | | | | | |
|