| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Also add a line of missing whitespace.
|
| |
|
|
| |
And tox. It wasn't properly working to report coverage before.
|
| |
|
|
|
|
|
| |
Turns out that the C extensions build and work fine with PyPy, but don't use them by default. Let them
be forced, though.
Tests needed some refactoring to account for the various permutations.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Fixes #126
|
| |
|
|
| |
Add cross references and some formatting fixes.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Also bring the ``classImplements`` lines closer to the interface
declaration. This helped me be sure that nothing was missed and that
all the repetitions of the names matched.
|
| |
|
|
|
|
| |
We *do* have a dependency on setuptools, so the try/except block should be unnecessary. At worst it might hide installation errors.
Fixes #114.
|
| |
|
| |
* Fixes #12 - registering instance methods as listeners doesn’t allow to easily unregister them as the registry tries to find the handler with 'is' but it should use '==' to allow the python BoundMethod wrapper (which is a new instance every time instance.$methodname is accessed).
|
| |
|
| |
Thank you for follows. I misread it for carriage return.
|
| |
|
|
|
|
| |
call PyObject_GC_UnTrack() in tp_dealloc()
see the following sites for details:
* https://bugs.python.org/issue31095
* https://github.com/python/cpython/pull/2974
|
| | |
|
| |\
| |
| | |
Enable combined coverage reports under tox and branch coverage
|
| | |
| |
| |
| | |
callers already do this guard; be more explicit about ClassType in test_odd_declarations
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Fixes #91
Remove many (or most) now-redundant 'pragma: no cover'.
A few minor test changes to get full branch coverage.
|
| |/
|
|
| |
Fixes #93
|
| |
|
|
|
|
|
|
|
|
| |
This is an alternative to #86 and was suggested by @mgedmin in #85.
There are tests to be sure this works for subclasses like Pyramid's
Registry that extend dict too.
This doesn't change the pickle format, we were storing the output of
object.__reduce__ previously.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Get as close to 100% coverage as possible.
Without conflicting with #86.
This is almost entirely trivial changes:
- Make dummy methods that should never be called either raise
NotImplementedError or call self.fail() in tests.
- Standardize the no-coverage pragma
- Add a few pragmas where coverage varies across
versions/implementations, mostly for the sake of tox (travis should
hit them all).
* Convert tox to run the coverage command, like travis. A follow up should have it produce coverage for all python versions/implementations.
Fixes #87
* Adjust coverage config for py2 only tests; fix typo; finish replacing self with cls
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Test sanity cleanups
Partially addresses #87
- Remove manual lists of tests in favor of loadTestsFromName. This
mostly gets all test runners running the same number of tests.
- Remove `additional_tests`, which was just duplicating the discovered
tests. No modern test runner seems to need it.
- Change the two compatibility skip decorators to actually use
unitetest skips, which helps with the reporting.
* Per @tseaver, drop most test_suite functions.
* Port remaining doctest to unittest.
* Make the odd tests work on all supported python versions
|
| | |
|
| |
|
|
|
| |
simplification, avoids spurious test failures when checking for
leaks in tests with persistent registries.
|
| |
|
|
|
|
| |
Prevents corruption of lookup cache.
Alternative to fix proposed in #75.
|
| |
|
|
|
|
| |
Instead, use the intended METH_KEYWORDS | METH_VARARGS spelling.
Fixes #71
|
| |\
| |
| | |
Document API for adapter registry.
|
| | |
| |
| |
| | |
Closes: #41.
|
| |/
|
|
|
|
| |
Closes #23.
[ci skip]
|
| |\
| |
| |
| |
| |
| |
| | |
Conflicts:
CHANGES.rst
I think that was the simplest conflict resolution ever :-]
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- The bare import of '_zope_c_optimizations' prevented them from being
used.
- After enabling them via absolute imports, they would fail due to
http://bugs.python.org/issue15657.
Fixes #60.
|
| |/ |
|
| | |
|
| |
|
|
|
| |
* Support Components subclasses that are not hashable.
Fixes #53.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #46.
Benchmarks show a dramatic improvement; not quite as good as the
demonstration in #46 because the implementation had to be a bit more
complex to properly handle unregistration, but still very good. Here it
is with 20,000 items already registered:
```
%time add_to_reg(reg, 1000)
CPU times: user 190 ms, sys: 19.3 ms, total: 209 ms
Wall time: 203 ms
```
Here's a profile with about 100,000 utilities registered:
```
%prun add_to_reg(reg, 1000)
80005 function calls (79005 primitive calls) in 0.713 seconds
Ordered by: internal time
ncalls tottime percall cumtime percall filename:lineno(function)
1000 0.596 0.001 0.621 0.001 adapter.py:202(subscribe)
12000 0.016 0.000 0.019 0.000 interface.py:518(__hash__)
1000 0.010 0.000 0.709 0.001 registry.py:206(registerUtility)
3000/2000 0.009 0.000 0.014 0.000 interface.py:255(interfaces)
2000 0.008 0.000 0.022 0.000 adapter.py:637(changed)
1000 0.008 0.000 0.025 0.000 registry.py:498(_getUtilityProvided)
9000 0.008 0.000 0.017 0.000 {method 'get' of 'dict' objects}
1000 0.008 0.000 0.027 0.000 adapter.py:102(register)
2000 0.006 0.000 0.008 0.000 adapter.py:450(changed)
1000 0.005 0.000 0.663 0.001 registry.py:145(registerUtility)
```
I was very careful not to change the pickle at all.
zope.interface and zope.component tests have been run and both pass. (It
was necessary to account for the underlying objects changing because of
the way zope.component cleans up after tests.)
|
| |
|
|
| |
Fixes #42
|
| |
|
|
|
|
| |
Since we no longer support 3.2 we can use the literal syntax.
This was done with a quick sed script.
|
| |
|
| |
Commit https://github.com/zopefoundation/zope.interface/commit/bc3b946593fa204b1969d8785b58418adaa19c80 duplicated some lines on branch merge.
|
| | |
|
| |
|
|
|
|
| |
We exclude interfaces declared with the 'class' statement, because their
methods typically have only a doctstring in the suite, which confuses
the branch coverage machinery.
|
| | |
|