Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"local variable 'result' referenced before assignment" compiler error with auto_pickle in 0.26 #1786

Closed
jamadden opened this issue Jul 20, 2017 · 3 comments

Comments

@jamadden
Copy link
Contributor

gevent fails to compile with cython 0.26 (observed on OS X, Windows and Linux):

    cython -o gevent.ares.c src/gevent/ares.pyx
    
    Error compiling Cython file:
    ------------------------------------------------------------
    ...
    def __pyx_unpickle_result(__pyx_type, long __pyx_checksum, __pyx_state):
        if __pyx_checksum != 0xc9b5cdc:
            from pickle import PickleError
            raise PickleError("Incompatible checksums (%s vs 0xc9b5cdc = (exception, value))" % __pyx_checksum)
        result = result.__new__(__pyx_type)
                      ^
    ------------------------------------------------------------
    
    (tree fragment):5:19: local variable 'result' referenced before assignment
    
    Error compiling Cython file:
    ------------------------------------------------------------
    ...
        if __pyx_checksum != 0xc9b5cdc:
            from pickle import PickleError
            raise PickleError("Incompatible checksums (%s vs 0xc9b5cdc = (exception, value))" % __pyx_checksum)
        result = result.__new__(__pyx_type)
        if __pyx_state is not None:
            __pyx_unpickle_result__set_state(<result> result, __pyx_state)

Where result is a cdef class. It seems like the name result itself is special. This produces it:

$ cat /tmp/ares.pyx
cdef class result:
	pass
$ cython -o /tmp/a.c /tmp/ares.pyx

Error compiling Cython file:
------------------------------------------------------------
...
def __pyx_unpickle_result(__pyx_type, long __pyx_checksum, __pyx_state):
    if __pyx_checksum != 0xd41d8cd:
        from pickle import PickleError
        raise PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
    result = result.__new__(__pyx_type)
                  ^
------------------------------------------------------------

(tree fragment):5:19: local variable 'result' referenced before assignment

Error compiling Cython file:
------------------------------------------------------------
...
    if __pyx_checksum != 0xd41d8cd:
        from pickle import PickleError
        raise PickleError("Incompatible checksums (%s vs 0xd41d8cd = ())" % __pyx_checksum)
    result = result.__new__(__pyx_type)
    if __pyx_state is not None:
        __pyx_unpickle_result__set_state(<result> result, __pyx_state)
                                         ^
------------------------------------------------------------

(tree fragment):7:42: 'result' is not a type identifier

If I set auto_pickle to False in the directives, the class complies fine. Likewise, if I use a different name for the class ("result2"), it compiles fine:

$ cat /tmp/ares2.pyx
cdef class result2:
	pass
$ cython -o /tmp/a.c /tmp/ares2.pyx
$ 
jamadden added a commit to gevent/gevent that referenced this issue Jul 20, 2017
…t to allow that in a point-release of gevent anyway.
jamadden added a commit to gevent/gevent that referenced this issue Jul 20, 2017
…t to allow that in a point-release of gevent anyway.
@scoder
Copy link
Contributor

scoder commented Jul 20, 2017 via email

@jamadden
Copy link
Contributor Author

The code in question is not part of the application. It's (incorrectly) auto-generated by Cython. There's a clash in the names generated by Cython.

Cython 0.26 will fail to compile this trivial file:

cdef class result:
   pass

Adding #cython: auto-pickle=False to the top of the file resolves the issue (because the incorrect code is no longer generated). Likewise, changing the name of the trivial class to result2 also works (because the name no longer clashes).

Having a class named result shouldn't break Cython, IMHO.

@scoder
Copy link
Contributor

scoder commented Jul 21, 2017

Sorry, yes. You were very explicit about what the problem was and I didn't read well enough. Thanks for the report and the fix in #1789.

scoder added a commit that referenced this issue Jul 21, 2017
…prevent conflicts with the user defined class name. See #1786.
clrpackages pushed a commit to clearlinux-pkgs/gevent that referenced this issue Jul 11, 2018
Dan Callaghan (1):
      always obey GEVENT_NO_CFFI_BUILD (#979)

Felix Yan (9):
      Fix a typo: Futher -> Further (#978)
      Fix a typo: intepreter -> interpreter (#980)
      Fix a typo: compatability -> compatibility
      Fix multiple typos: immediatelly -> immediately
      Fix a typo in CHANGES.rst
      Fix a typo in _socket3.py
      correct a typo in src/gevent/greenlet.py
      Fix a typo
      Fix a typo in pywsgi.py

Florian Margaine (1):
      lock: fix typo

Heungsub Lee (1):
      Add Heungsub Lee as one of authors

Jason Madden (650):
      building libuv. doesn't link correctly yet though, on os x anyway.
      we want the pre-built configure script. [skip ci]
      Need to autogen.sh for now at least. [skip ci]
      got linking on OS X working, tested on a Pi too. lets see about travis.
      actually pass the environement
      prospector paths [skip ci]
      add the test directory back to libuv for windows.
      configure libuv for non-embedded case.
      windows doesn't like linking an empty extension.
      fix linking non-embedded libuv test case.
      fix the embedded case now.
      flesh out remainder of libuv functions and callbacks.
      use custom struct for stat watcher.
      Checkpoint on sharing watcher implementations/refactor libev.
      All tests pass with the CFFI libev core.
      first implementation of the event loop itself for libuv.
      enough libuv work that bench_sendall runs. perf is about the same as with libev/cffi on os x.
      enough libuv work that bench_sendall runs. perf is about the same as with libev/cffi on os x.
      implement libuv timer. test__socket.py passes.
      test__core_timer libuv.
      setting up to run collabcks is different, libev just refs self, libev needs to start the timer.
      implement libuv stat watcher.
      implement libuv signal watcher.
      Attempt and FAIL to implement fork/child on libuv.
      update libuv to 1.9
      implement child watchers in libuv to the extent possible.
      Fix destroying the loop and properly close handles.
      multiplex io. fixes test__socket.
      working on debugging async crash.
      Fix the async-related failures. Turns out uv_async_init is NOT idempotent.
      libuv unrefs handles when they are started just like libev. fixes some test timeouts notably test__order.
      libuv sets ref status on start; timer watchers special case start references. fixes test__queue and test__order.
      more work on refs for libuv. 17 test failures.
      test__core works for libev
      test__core_watcher.py under libuv.
      test__destroy.py libuv
      test__fileobject.py under libuv.
      test_close_backend_fd not relevant for libuv.
      test_hub_join_timeout under libuv: tolerances are not as tight, apparently, at least on OS X/kqueue.
      Fix test__core_loop_run_sig_mod on libuv
      fix test__threadpool: libuv only supports millisecond timers
      add libuv idle watcher. fixes test__issue639.py
      fix more tests. down to four failures.
      Install a timer to handle signals under libuv.
      add libuv to the test matrix. fix prospector.
      Fix test_select for select.poll under 2.7
      skip two tests that crash the interpreter under 2.7/libuv.
      some test fixes.
      ignore a test_asyncore test that crashes libuv on linux.
      consistent error handling for libuv functions.
      Begin work on cleaning up multiplexed io watchers (libuv)
      remove the __del__, fix the infinite life under cpy <3.4
      we have two copies of lock_test that are slightly flaky under libuv.
      fix building ares on windows
      checkpoint attempts to get libuv to build on appveyor.
      allow linking to the dynamic libuv built when we embed, during develop.
      Manually implement fork watchers for libuv. Let some fork tests that appear to work on Linux run; lets see what travis says.
      different results on all three tested linux systems.
      Back to development: 1.2.3
      Use a weak reference to clean up the link for local objects if they die before the greenlet does (#983)
      Defer adjusting the stdlib's list of active threads until ``threading`` is monkey patched.
      Extra test for patching not on main thread.
      Must not try to run test_patch_in_thread multiple times.
      Merge pull request #985 from gevent/issue984
      Merge pull request #986 from sublee/heungsub-lee
      doc tweaks [skip ci]
      Merge pull request #991 from felixonmars/fix-typo
      Merge pull request #992 from felixonmars/fix-typo
      Merge branch 'master' of https://github.com/gevent/gevent
      Build with Cython 0.26
      Disable auto-pickling to work around cython/cython#1786. We don't want to allow that in a point-release of gevent anyway.
      Disable auto-pickling to work around cython/cython#1786. We don't want to allow that in a point-release of gevent anyway.
      Merge pull request #996 from gevent/cython26
      Specify required python versions in setup.py
      Merge pull request #998 from gevent/issue995
      Extract list of ignored exceptions in pywsgi to an ivar. Include errno.WSAECONNABORTED on Windows. Fixes #999.
      Merge pull request #1000 from gevent/issue999
      Drop Python 3.3 remnants. Fixes #997.
      Merge pull request #1003 from gevent/997
      Update to PyPy3 5.8.0
      Missed a path
      Skip the test on PyPy3 because the workaround hangs CPython3
      Replace deprecated TestCase methods.
      One more flaky test on Travis.
      Merge pull request #1005 from gevent/issue1001
      Return the correct value from Popen.communicate() on Py3/text mode
      Merge pull request #1006 from gevent/issue939
      Merge pull request #1011 from felixonmars/fix-typo
      Bump to cython 0.26.1 for bug fixes.
      Add a warning for monkey-patching SSL when it is likely to be too late. Fixes #1016.
      Fix tests on macOS 10.13 (something seems different about the dual IPv4/6 stack setup)
      Try to fix travis issue upgrading setuptools.
      Try to fix failures on travis ci
      Disable an unstable test on Python 3.6.
      Fix for test__monkey on Python 2.7.8
      Initial fixes to enable basic tests to run on Python 3.7a1.
      Working on making gevent.local faster.
      Further optimizations: completely elide the lock, fully implement the descriptor protocol.
      100% coverage for local.py; verified it does what threading.local does.
      Inline _get_dict function for more speed.
      Merge pull request #1022 from gevent/issue1020
      Compile local.py with Cython when available.
      Support using the pure python local code on Cpython too; it handles adding __new__ differently than PyPy does.
      PyPy3 behaves like CPython and needs @classmethod.
      Merge pull request #1024 from gevent/cython-local
      Add pr number to change note. [skip ci]
      More safely terminate process on Windows.
      Enable test_kill_dead and related on Python 3.4+ as well.
      We need to set the result when we detect a process is dead in the act of killing it, so that in the future we don't try to wait on it again.
      Merge pull request #1025 from gevent/issue1023
      Update all python versions on Travis CI [skip appveyor]
      Increase a timeout for PyPy3
      Merge pull request #1030 from felixonmars/patch-2
      Try to fix the travis server errors.
      debugging
      Use 127.0.0.1 instead of '' to bind  on Travis because of errno 99.
      Fix test__localhost__gethostbyaddr under travis
      Merge pull request #1034 from RonRothman/queue-all-full-empty
      Add PoolFull to __all__
      Documentation cleanups and add timeouts to Pool.start.
      Change note for #1035. [skip ci]
      Enable warnings when running our tests. Rename (the undocumented) threadpool.ThreadResult.async to async_watcher because it's a keyword in 3.7, as exposed by warnings.
      Upgrade c-ares to 1.13.0. Fixes #990
      Debugging why cares failed on travis.
      ares is not optional on travis; more debugging
      More debugging
      Remove ares_build.h from git; it seems to be causing problems on Travis.
      Account for it possibly being missing.
      Re-enable all Travis builds and try a fix for appveyor
      Debugging linking failure on appveyor
      Get the globbing right for windows.
      ares is not optional on appveyor anymore either, it should always build
      Merge pull request #1036 from gevent/cares1130
      Make universal newlines with FileObjectPosix return str on Python 2 instead of unicode. Fixes #1039
      Missed whitespace line
      Skip the test on windows since the stdlib does weird things with universal newlines.
      Merge pull request #1040 from gevent/issue1039
      Fix #1044 by always closing opened sockets before raising
      Account for some more warnings that Python 3.6 can generate: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__. See https://travis-ci.org/gevent/gevent/jobs/310040846
      More fixes for travis.
      Test tweaks for CI.
      Merge pull request #1045 from gevent/1044
      Merge branch 'master' into libuv
      Update to libuv 1.18.0 with fork support. Untested.
      Fix makefile for test-py27-libuv
      Restore libev/corecffi refactoring and incorporate fork for libuv
      Debugging the test__core.py memory corruption bug seen on travis.
      Debugging the test__core.py memory corruption bug seen on travis.
      Debugging the test__core.py memory corruption bug seen on travis.
      Get tests passing with libuv on Python 3.6
      More signal fixes
      Fix ares + libuv
      More on test failures for Python 3
      io.fd must be settable.
      Tweak timeout
      Add change note.
      Disable libuv on appveyor for now.
      Fix the new core watchers tests on appveyor.
      Py2 on Windows raises a different exception it seems.
      Revert appveyor change so we can build 32-bit 3.5 and 3.6.
      Hmm, the 32-bit builds all failed with 'The system cannot find the drive specified.' five times. Maybe it didn't like our comments?
      Merge pull request #1048 from gevent/libuv
      Try to compile libuv as CFFI on PyPy/Windows.
      Correct url to download PyPy
      Disable psutil since it doesn't build.
      Only try to configure libev for CFFI if we're building it
      Do the build for libuv if needed.
      Try an older solution file.
      See if vcbuild.bat can find what it wants on its own.
      Print version and location of msbuild.
      Show all msbuild locations.
      Twek text to try to force appveyor rebuild.
      Use setuptools to build libuv. This should be much simpler, especially on windows, at the cost of manually keeping up with link arguments and file deps.
      Tweak test for random ImportWarning from Python 3: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
      Successful test with CPython 3.5 on Windows 10; have to elide getaddrinfo and getnameinfo because they won't link.
      Tweak socket timeouts for CI.
      Windows setuptools on appveyor was incredibly picky about paths.
      Use libuv as fallback from libev cffi
      Attempt to smuggle SOCKET through to uv_poll_init_socket on windows.
      PyPy on windows is only libuv. That might help with some of the timing issues.
      More cleanups for libuv on windows.
      Update pypy tests and some exclusions for it.
      A bunch more mysterious test disables for pypy on windows+libuv
      Let PyPy fail on Appveyor for now. Also bump Travis PyPy to 5.9.0 because I can't reproduce the test__makefile_ref failure locally on 5.9.0. Fixes #1029.
      pylint 1.7.5 caught some extra cases and failed Travis. [skip appveyor]
      Another whack-a-mole for Travis; avoid keeping the sockets at all under PyPy
      Solved the test__makefile_ref.py issue on linux + pypy
      Merge pull request #1050 from gevent/pypy-appveyor
      Test on 3.6.3 on Travis; appveyor was already there. Update tests to match.
      Merge pull request #1053 from gevent/test-363
      Add and fix test_ftplib.py and test_asyncore.py for 3.6. See #1050 for a description of failures.
      Fix test_subprocess.py on Windows 3.6 by adding path-like support.
      Merge pull request #1054 from gevent/add_36_tests
      Fix walk_modules and test__all__ on windows when sharing a checkout with posix.
      Attempt to fix (or workaround) test__socket.py on Windows.
      Fix test__ssl under leakchecks. Refactor test__ssl to share more with test__socket.
      Merge pull request #1055 from gevent/fix_test__socket
      Enable Py36+libuv+Appveyor
      I solved the test_ftplib.py windows failures locally by more careful handling of lifetimes of io watchers: they should be disposed when the fileno is. I investigated a more drastic approach using new watchers entirely every time we restart, but it doesn't seem necessary, at least on CPython (I can't even run PyPy+libuv locally on darwin though, so there are more problems lurking there).
      More windows workarounds.
      There's a typo in the test name we need to exclude.
      Disable pypy on appveyor again because it takes too long. I need to make sure it runs on POSIX first.
      Fix an occasional crash in monkey patched 3.6/test_socket.py
      Merge pull request #1056 from gevent/libuv-py36-win
      Changes for pylint 1.8 [skip appveyor]
      Checkpoint on making io watchers deterministic
      Fix some tests.
      Hopefully solve the test__os issue. It turned out to be that calling uv_close at random GC times is a very bad idea under libuv. See the comment. Try enabling pypy+libuv on posix and windows; it's working on darwin for me.
      Right dep for test-pypy-libuv [skip ci]
      Disable PyPy+libuv on Windows again, still some very strange errors there. But PyPy+libuv on darwin/posix works, and CPython3.6 Windows works. Perhaps the issue is the 32-bit pypy on windows and the way it adjusts socket.fileno()?
      Merge pull request #1061 from gevent/close_io_watcher
      Update ISSUE_TEMPLATE.md
      Add tests for Python 3.7a3.
      Disable more DNS tests that have begun to fail on CI but not locally.
      Compensate for changed async class name.
      More FFI fallout cleanup.
      Missed dependency on 3.7 for the make step.
      Exclude prospector/pyyaml from 3.7 because pyyaml doesn't yet compile
      Merge pull request #1069 from gevent/py37
      Simplify the Travis test matrix
      Mark some flaky tests for CI. One is a race condition that needs investigated.
      More libuv test adaptations.
      Workaround the issue with test__systemerror sometimes failing on libuv
      Python 3 needs a value.
      Update the list of excluded and ignored tests. Fixes #1007
      A more general fix for test__systemerror.py
      pypy lock times sometimes come out slightly ahead on libuv
      Skip that one test that fails on Python 3.7 under libuv on Travis. It doesn't fail for any other CPython version there and it doesn't fail locally. Chalking it up to a alpha issue for now.
      More flaky test markers
      Another adaptation for pypy tests
      Don't run libev cffi backend tests twice on pypy
      Use cffi's extern Python callbacks. Fixes #1049
      I can't reproduce the two crashes locally on macos on ubuntu, so disable them for now
      Pare back the logging.
      Remove extra debugging, add another CPython2.7+libuv+Travis only crasher.
      Another cpython crasher.
      Fix test__systemerror (#1058) again
      Fixes #1057 by adjusting timers for libuv
      libuv: do not update the loop time when timers are started by default. See #1057. libev might follow suite in the future.
      Let the Timeout class update the loop time when used internally. Otherwise, test_telnetlib.py 'hangs'. Not exactly clear why, but at a guess apparently we're not getting out of the timer callback loop.
      Merge pull request #1075 from felixonmars/fix-typo
      libev follows libuv by not updating the loop time in a timer by default. A Timeout that we use internally still does this though.
      Make libev follow libuv and not update timers by default.
      Refactor test__core_stat into a proper TestCase.
      Refactor test__queue for easier debugging. Solve a couple issues with leaktests and FFI
      Refactor test__server[_pywsgi].py for finer control. Adjust the timeouts for pypy/libuv.
      The skip test condition should be the same as the flaky timeout condition for test_pool_full.
      Patch out one ares test for PyPy+libuv.
      Extend a timeout for pypy
      libev failure showing up on Travis+pypy, error handling not seen where we want it.
      noop
      Stop testing 2.7.8
      Centralize socket timeouts.
      Refactor greentest.py into a package.
      Folding for travis.
      Another fold
      pylint
      A few more exports
      GEVENTSETUP_EV_VERIFY has to be set when gevent is compiled. Move it from the 'leaktest' target down to where we call develop
      libuv turns 0 duration timers into check watchers so the loop cycles.
      Define an exception class at top level to make the leakchecker happy.
      .pyc file hid that patched_tests_setup had moved.
      Attempt to run more tests under coverage.
      Tweak some tests not to run with coverage
      Another test sensitive to timing under coverage. [skip appveyor]
      Tweak test__issues461_471.py for coverage.
      expand the scope
      EXPECT_POOR_TIMER_RESOLUTION should cover this case too.
      WIP: All CFFI watchers have explicit lifetimes
      Fix the test failures and enable debugging under Python 2
      Debugging for a weird EPERM error in test__fileobject.py on travis with libuv; not seen locally or on appveyor [skip appveyor].
      We no longer need to gc before getting a libuv io object on PyPy: everything is deterministically closed (or should be).
      The cython extension should stop itself when closed too.
      Skip test on pypy/libuv/travis.
      Stop inlining CHECK_LOOP. This cuts around 4000 LOC from the generated C file.
      Drop use of LOOP_PROPERTY and update all the deprecated property: syntax to @Property
      Start breaking apart the WATCHER macro to share code.
      Move the callback property to watcher.
      Move the priority, active and pending properties into the watcher base class.
      Move start into the watcher base.
      convert feed to a shared function. Now around 23776 LOC, more than 10K less than we started.
      Inline stop
      Make LIBEV_UNREF and PYTHON_INCREF macros into static C functions.
      Simplify the loop definition: always define the _periodic_signal_checker timer member.
      Convert remaining old-style properties into @propery
      Drop the corecext sigfd property.
      Use vfd_socket_t on all platforms.
      We should be able to use dummy functions to link the child watchers on windows, and forbid them from being created. This gets us down to only one CPP def, LIBEV_EMBED
      Define the child callback on win32, needed to link.
      Use a better size for vfd_socket_t on windows, and make sure to pass the VFD object to the watcher.
      Attempt to workaround Visual C 9.0 for CPython 2.7 on windows missing stdint.h. Also correct a compiler warning.
      Some perforamnce hacking. Fused types may offer an even better solution.
      drop the watcher macro, call start/stop through function pointers and fix a compiler warning.
      Go back to caching the watcher pointer.
      use standard errno
      fix build of ares.pyx since we removed our deprecated python.pxd
      Stop using #ifdef LIBEV_EMBED in corecext.ppyx
      Rename corecext.ppyx to just corecext.pyx now that we don't preprocess.
      Merge pull request #1077 from gevent/reduce-use-of-cpp-in-corecext
      Run cythonize from setup.py
      cancel the whitespace test as part of the standard linting. there are too many false positives to keep up with in the generated C files. [skip appveyor]
      Add the pxd's as explicit deps; they don't actually seem to trigger recompilation, at least if just decorators are added.
      Merge pull request #1078 from gevent/issue1076
      Restore sigfd for corecext using the same technique as the other LIBEV_EMBED properties.
      Try testing PyPy on Windows again. I'm getting clean-ish runs in my local test VM (with a small number of networking and subprocess tests disabled).
      Cleanup a mistake in test_httpservers.py, and make a change to the example portforwarder to better handle race conditions.
      Capture another flaky test
      Give up and mark the test as flaky.
      Running it on its own does no good, just makes it take longer.
      Use assertTimeWithinRange for better control on PyPy/Windows.
      Put gevent.local on a diet: remove vtables by using functions, not methods
      Revert the hack of copying the ares.h header distributed with c-ares to cares.h. Our ares.pyx's channel class doesn't need to be public.
      Make callbacks.c stop relying on implementation details of Cython and Python. Instead use documented ways to interact.
      Include PR number #1080
      Update comments about how loops run. [skip ci]
      Try to adhere to scheduling deadlines when running callbacks
      Merge pull request #1081 from gevent/issue1072
      Add 3.7 classifier.
      Preparing release 1.3a1
      Back to development: 1.3.0
      Tweak changenote. [skip ci]
      Fix installing from source distribution without cython installed. D'oh! [skip ci]
      Add environment var to skip building libuv backend; use it on manylinux
      Begin doc updates for 1.3 [skip ci]
      Allow all keyword arguments to Popen under Python 2.
      Merge pull request #1082 from gevent/issue1063
      More coverage (#1085)
      Drop the unused gevent._socket3._fileobject class. Fixes #1084.
      Merge pull request #1086 from gevent/issue1084
      Bump Travis python versions. [skip appveyor]
      Use the customized lock_tests under PyPy
      Use tests from 3.7a4
      Tweak test timeout for PyPy.
      Merge pull request #1087 from gevent/issue1062
      Refactor the resolver classes into a package and add one for dnspython. Fixes #580
      Fix tests on Python 2, and fix broken timeout on Python 2
      Another fix for dnspython on Travis.
      Enable a default cache for dnspython. Add more docs.
      Merge pull request #1088 from gevent/dnspython
      More DNS docs [skip ci]
      Deal gracefully with passing None watchers to hub.cancel_wait, something that may be more common now that we try to destroy watchers ASAP for GC reasons. Fixes #1089.
      Add the DNS benchmark; fix a warning compiling cares.pyx. [skip ci]
      Add the module gevent.time as a drop-in replacement for time.
      Add absolute_import to two modules where we imported time.
      Enable the dnspython resolver to work in non-monkey-patched processes
      Doc fixup.
      Tweak to avoid pylint warning.
      Two test failures on travis I can't reproduce.
      Exclude more locations for .so from coverage. The SyntaxError is popping up again.
      The udp failures are also observed with ares, so not specific to the dnspython changes.
      Update test suite and travis to Python 3.7b1.
      Make the import of close conditional, for now.
      Install openssl on travis for 3.7b1 as a fix for  travis-ci/travis-ci#9069
      Merge pull request #1093 from gevent/dnspython-nonmonkey
      Tweak generate_rst for RTD. [skip ci]
      Merge branch 'master' of https://github.com/gevent/gevent
      Add support for /etc/hosts to dnspython resolver.
      Need dnspython on appveyor too.
      Merge pull request #1094 from gevent/dnspython-hosts
      Comments in dnspython [skip ci]
      Centralize configuration in a ``gevent.config`` object.
      The gevent.select.poll object must keep a tighter handle on the lifetime of io watchers it spawns. Previously they were leaking if not unregistered, which some callers fail to do --- looking at you, dnspython.
      Whoops, fix definition of CFFI_BACKEND in tests; led to some test errors on Travis.
      Some test tweaks.
      Fix an error in leakcheck that called setup and teardown too many times.
      Fix test__core_timer.py by not destroying the default loop. D'oh!
      Fix the makefile for the noembed task. [skip ci]
      Extra tests for _config. Fix a long-standing bug where package paths in import names did not clean up after themselves.
      More coverage for _config.py [skip ci]
      Merge pull request #1096 from gevent/config-issue1090
      Another test to skip.
      Take a whack at using ccache to speed up builds on CI.
      Merge pull request #1099 from gevent/ccache
      Don't let destroying the default C loop from two different Python loop objects crash the process. Fixes #1098
      Merge pull request #1100 from gevent/issue1098
      Simplify libev default loop handling and let it regenerate itself.
      Broaden the skip, seen on Travis occassionally. Cannot reproduce.
      Address some more failing tests. Some of the UDP tests were fighting over ports!
      Update comments on some Windows test issues that are better understood. [skip ci]
      greenlet 0.14.3 has been released [skip appveyor]
      We can use cython 0.27.3 on all versions.
      Merge pull request #1101 from gevent/libev-regen
      Add reference to the #1016 in the warning text. [skip ci]
      Make socket.sendall() fast on PyPy3: 60MB/s -> 600MB/s
      That's been seen on libev-cext too, so go ahead and skip it there. [skip ci]
      TestEtcHosts round-robin failures also seen on appveyor with the system resolver---because we're not using the local system hosts file.
      patch out test_ssl.NetworkedBIOTests.test_handshake.
      A prior changed fixed test_socket.py for pypy3
      Merge pull request #1102 from gevent/sendall-py3-pypy
      Drop -flto
      Simplify test matrix for old py3 versions.
      Support GEVENT_RESOLVER_SERVERS for configuring dnspython nameservers.
      Update c-ares to 1.14. Fixes #1105.
      Merge pull request #1106 from gevent/issue1103
      Merge pull request #1107 from gevent/issue1105
      Tweak change notes for Timer. [skip ci]
      be specific about manylinux version. [skip ci]
      Be more careful about issuing the SSL warning on Py2.
      Fix a doc typo in monkey.py
      Merge pull request #1109 from gevent/issue1108
      Fix race conditions in libuv child watchers.
      (hopefully) fix a crash destroying loops in test__core.py; only seen on Windows, but with some tweaks I could reproduce it locally.
      Skip a test that hangs on appveyor. Could not reproduce locally.
      Merge pull request #1110 from gevent/issue1004
      Clean up a test func.
      Cleanup the libev destroyed data like the libuv destroyed data.
      Merge pull request #1111 from gevent/libev-cffi-cleanup
      Make the check_callback do stuff under PyPy to trigger signal delivery. Fixes #1112.
      Merge pull request #1113 from gevent/issue1112
      Update bench_spawn
      Add spawn_tree_locals, spawning_greenlet and spawning_stack to Greenlet
      Compile greenlet with Cython to make up for most of the lost speed.
      Stop reading private _exc_info variable. Fixes tests on PyPy.
      Stop accessing private _links variable.
      More cython declarations for more speed.
      pylint can't see through the indirection that we're really calling greenlet.__init__.
      Simplify getting the repr for greenlet functions and return the args/kwargs in more circumstances.
      Merge pull request #1115 from gevent/issue755
      Add Greenlet.minimal_ident, a small, sequential, reusable counter for greenlets.
      Picky pylint warning.
      Unbreak the leak checks.
      Tweak changenote [skip ci]
      Merge pull request #1116 from gevent/issue755
      Add a script for benchmarking gevent.local
      Speed of gevent.local.local more, especially for subclasses (2-3x faster)
      Add link to pr #1117. [skip ci]
      Merge pull request #1117 from gevent/faster-locals
      Honor PURE_PYTHON at runtime.
      Use new cython on Windows too.
      Fix test__threading_vs_settrace.py since we don't run that on PyPy anymore.
      Disable prospector for now, it's failing and I can't reproduce why.
      Merge pull request #1119 from gevent/issue1118
      Rework bench_spawn to be perf based for more reliable numbers
      Use a larger inner loop count to try to stave off 'benchmark may be unstable'.
      Rework bench_spawn to be perf based for more reliable numbers
      Use a larger inner loop count to try to stave off 'benchmark may be unstable'.
      Speed up Greenlet creation on CPython
      Changenotes.
      Merge pull request #1120 from gevent/faster-stack
      Merge branch 'master' of https://github.com/gevent/gevent
      Doc tweaks.
      Add missing resolver RST files. [skip ci]
      Include locals in the debugging output.
      Merge pull request #1121 from gevent/locals-debug
      Don't trust descriptors to return themselves. Fixes #1122.
      Don't trust descriptors to return themselves. Fixes #1122.
      Add a GreenletTree for more organized, clearer output of greenlets
      Merge pull request #1123 from gevent/locals-debug
      Reorganize benchmarks.
      Benchmarks need perf
      Fix #1126 by moving the run queue to the heap from the stack.
      Fix #1127 by interpreting -1 as None under libuv for select.poll.poll; should probably start having Timeout do that itself.
      Fix a few 'leaks' of timers. Possibly related to #1130
      Based on the logs, it could be this test that kills pypy.
      Why are we bothering to run cares on PyPy? It has several known-bad tests, and it sometimes crashes the interpreter. We don't recommend or support it now that we have dnspython.
      Merge pull request #1131 from gevent/issue1127
      Install 3.7b2. Ref #1125.
      Always use 0 when getting the address for getaddrinfo
      Update tests for 3.7b2. Fixes #1125.
      Better CFFI exception handling due to an issue seen in 3.7b2.
      Minor cleanups and comments during debugging of #1126
      Fix tests on Python 3.4: It doesn't have SSLObject.
      Ask CPython for faulthandlers.
      The SystemError: BytecodeCorruption issue is back on pypy. Try running that test by itself.
      Disable the test that's crashing with SystemError:BytecodeCorrupted on PyPy.
      Merge pull request #1132 from gevent/update-3.7.0b2
      Use the tagged Cython 0.28b1
      Fix some resourcewarnings from test__server.py
      Run tests in 3.7 dev mode; cleanup resource warnings
      Merge pull request #1133 from gevent/dev-mode-tests
      More warning cleanup.
      Updating changelog for 1.3a2 release [skip ci]
      Tweaks to manifest.in [skip ci]
      Preparing release 1.3a2
      We require headers from greenlet at build time so it is a setup_requires.
      Include greenlet.h so we can be installed by buildout.
      Fix the warning problem.
      Fix the manylinux build script
      Back to development: 1.3a3
      Docs: We ship the greenlet header file, so it really isn't necessary at install time. [skip ci]
      Merge pull request #1134 from parasyte/patch-2
      Use strongly typed watcher callback functions in libuv, preventing dozens of compiler warnings.
      Try to disable some libuv warnings on Windows.
      No, it's both.
      Merge pull request #1135 from gevent/libuv-warning-cleanup
      Also monkey-patch threading._Event on Python 2. Fixes #1136
      Merge pull request #1137 from gevent/issue1136
      Cython 0.28 has been released.
      Introduce GEVENT_TRACK_GREENLET_TREE to disable greenlet tree features
      Merge pull request #1142 from gevent/opt-greenlet
      Make more performance-sensitive places use _get_hub_noargs, since under Python 3 it is twice as fast to call as get_hub.
      Add support for a background monitoring thread to be associated with each hub.
      The extra threads that only eventually die mean we need to skip the leakcheck.
      More careful handling of threadpool threads that have a hub.
      Killing the monitoring thread should restore the greenlet trace function.
      Move PeriodicMonitoringThread to its own file.
      Merge pull request #1143 from gevent/monitor-threads
      Fix libuv multiplex io watchers from polling too much when one event has been completely turned off. Fixes #1144.
      Merge pull request #1145 from gevent/monitor-threads
      Add util.print_run_info and limit params for stack traces.
      Remove most routine calls to _dbg, leaving error/unexpected calls in place.
      Start having the monitor thread emit events for monitored conditions.
      Merge pull request #1147 from gevent/monitor-events
      Add monitoring for memory usage, emitting events as it moves around the threshold.
      Use standard delay times in test__event.py. Fixes #1148 (hopefully).
      Add tests for memory monitor.
      Merge pull request #1150 from gevent/mem-monitor
      Optimizations for threadpool
      Avoid a circular ref that broke the leaktests. Bonus: it's actually faster on Py3
      More optimizations and clarifying comments
      Add benchmark for plain greenlet pools.
      Add change note.
      Merge pull request #1153 from gevent/threadpool-opts
      Compile IMap[Unordered] with Cython
      Also compile the Event and (more importantly) AsyncResult class.
      Merge pull request #1154 from gevent/threadpool-opts
      Add basic benchmarks for gevent.queue
      Compile gevent.queue and gevent.hub.waiter with Cython
      whoops, not internal
      cdef _NONE, it shows up in some hot paths.
      Greenlet can cimport waiter.
      Merge pull request #1155 from gevent/cython-waiter
      Compile the hub operations that use Waiters with Cython
      Move the core of socket._wait into Cython. This speeds up bench_sendall by about 3%
      Attempt to fix test__backdoor.py
      Merge pull request #1156 from gevent/cython-waiter
      Working on some more socket benchmarks
      Defer importing gevent.monkey at startup. Fixes #1152
      Update to 3.7.0b3
      Merge pull request #1159 from gevent/3.7.0b3
      Use runpy.run_path for 'python -m gevent.monkey'.
      Refactor '-m gevent.monkey' tests for clarity.
      More clarifying comments.
      Merge pull request #1160 from gevent/issue1157
      Update to libuv 1.19.2. Fixes #1129.
      Merge pull request #1164 from gevent/libuv1.19.2
      Drop twitter search from homepage. Fixes #1165
      Refactor old changelogs to make the relevant information easier to find.
      Make libuv the default backend on Windows. Fixes #1163.
      Merge pull request #1166 from gevent/libuv-win-default
      Add extension points to gevent.monkey using events and setuptools entry points.
      Add kwargs to patch_all for plugins.
      Merge pull request #1169 from gevent/plugins
      Preparing release 1.3b1
      Back to development: 1.3b2
      Always assign something to Process
      I actually built those wheels with Cython 28.2.
      Use environment markers to install cffi on windows.
      Still no go with pip 10. Try to simplify and build psutil.
      Another pass at pip 10
      Try to install less stuff: cryptography doesn't build on windows
      We do need requests.
      Don't try to install cffi on pypy via setup.py since that seems to break things.
      Merge pull request #1174 from gevent/cffi-win
      Add PEP345 project URLs since warehouse displays them now.
      Explicitly publish and link to examples so they're consistent with a given release.
      Some minor documentation cleanup for intro and basics. Prepping for some re-org.
      Reorganize docs.
      Add benchmark for using subprocess.Popen to create /usr/bin/true [skip ci]
      Use /dev/fd|/proc/self/fd to get open FDs to close in Popen
      Add unit testing for the new close_fd functions using mocks
      Merge pull request #1176 from gevent/issue1172
      Sigh. Pip changed the semantics of -U in pip 10. go back to the old way so we're actually testing changing deps; if it breaks we need to know.
      Documenting libuv and 1.3 updates [skip ci]
      More socket benchmarks [skip ci]
      Update libuv to 1.20
      Merge pull request #1181 from gevent/libuv120
      Add document about monitoring/debugging. [skip ci]
      Fill in whatsnew_1_3.rst [skip ci]
      Add loop implementation docs. Fixes #1060. [skip ci]
      Priorities: libuv doesnt have them [skip ci]
      Update to libuv 1.20.1
      Merge pull request #1183 from gevent/libuv-1.20.1
      Add gevent.util.assert_switches
      Merge branch 'master' of https://github.com/gevent/gevent
      Merge pull request #1184 from gevent/issue1182
      Make the monitor thread survive a fork. (#1186)
      Make the libuv run QUEUE part of the loop.
      Merge pull request #1187 from gevent/static-libuv-patch
      Merge pull request #1189 from felixonmars/patch-2
      Add benchmark for greenlet tracers. [skip ci]
      Move the greenlet tracers to their own file and compile with cython.
      Compile the monitor greenlet tracer with Cython.
      Merge pull request #1190 from gevent/cython-tracer
      Merge pull request #1193 from ralt/patch-1
      Queue all libuv callbacks and run them at the end.
      We should no longer need the timer hack.
      Remove the libuv patch.
      Colorize testrunner output.
      Run queued callbacks when our prepare callback runs.
      Colorize testrunner output.
      Fixes for test__core_timer on Linux.
      More timer test tweaks.
      Fix the crashes on linux.
      Tweak a timer value, seen a failure in libev-cffi on travis.
      Merge pull request #1194 from gevent/libuv-queue
      Add long_description_content_type to setup.cfg [skip ci]
      Sigh, the timer resolution is really flaky on CI. Patch test__core_timer.py:test_resolution to use the mechanism to handle this.
      Test on Python 3.7.0b4 [skip appveyor]
      Preparing release 1.3b2
      Back to development: 1.3.0rc1
      Add #1190 to changelog. [skip ci]
      Run leakchecks on Python 3.7.
      Update config.guess/sub to latest versions.
      Merge pull request #1200 from gevent/update-config
      Fix ABCs in the MRO of gevent.local. Fixes #1201
      Tweaks for test__pool timeout under coverage in 3.7
      Merge pull request #1203 from gevent/issue1201
      Merge pull request #1199 from gevent/issue1197
      Reference #1021 in the docs [skip ci]
      Update the list of libuv differences. [skip ci]
      Preparing release 1.3.0
      Back to development: 1.3.1
      Fixup some xrefs in docs. [skip ci]
      Document setuptools version needed for source installs. [skip ci]
      Let Event have weak references.
      Move the __weakref__ to the base class for Cython because we did see a failure in 3.6 too: https://travis-ci.org/gevent/gevent/jobs/379718754#L753
      Catch the ValueError that sys._getframe() can raise when there are no Python frames.
      Merge pull request #1213 from gevent/issue1212
      Merge pull request #1214 from gevent/issue1211
      Centralize installation documents. Fixes #1210. [skip ci]
      Clarify that gevent.pywsgi is the replacement for gevent.wsgi. [skip ci]
      Fix gevent.os.nb_write/read not always closing the IO event the opened, which is a problem on libuv.
      Preparing release 1.3.1
      Back to development: 1.3.2
      Allow weakreferences to Queue objects. Fixes #1217.
      Merge pull request #1218 from gevent/issue1217
      Preparing release 1.3.2
      Back to development: 1.3.3
      Use entirely clean directories for manylinux builds, like we do for OS X builds.
      Preparing release 1.3.2.post0
      Back to development: 1.3.3
      Sleeping updates the loop's current time always. (#1228)
      Switch off prospector, go back to plain pylint (#1230)
      Reference #1219 in the changelog. [skip ci]
      Document the 'ValueError' message that's raised by ancient setuptools. Ref #1223 #1234. [skip ci]
      Use context managers in StreamServer.wrap_socket_and_handle to avoid UnboundLocalError. (#1237)
      Preparing release 1.3.3
      Back to development: 1.3.4
      Merge pull request #1238 from felixonmars/patch-2
      Only issue the ssl MonkeyPatchWarning if we can be pretty sure there will be problems.
      Merge pull request #1239 from gevent/limit-ssl-warning
      Use a buffer to generate HTTP chunks.
      Merge pull request #1240 from gevent/issue1233
      Use bytearray += instead of bytearray.extend
      Add change note.
      Build 3.7 manylinux wheels.
      Build manylinux quietly.
      Merge pull request #1241 from gevent/issue1233
      Preparing release 1.3.4

Jay Oster (2):
      Fix EPROTOTYPE race condition on macOS [supersedes #1033]
      Fix documentation for Pool.full()

Ron Rothman (10):
      add Full and Empty to gevent.queue.__all__
      Add blocking and timeout params to Pool.add
      updated AUTHORS
      added tests for new Pool.add parameters, blocking and timeout
      updated CHANGES.rst
      PR comments:     * revert Group.add to original state (no new params)     * add new exception "Full", and return it when blocking==False and     pool is full     * no longer return True/False from Pool.add
      use assertRaises
      fixed semaphore return value logic
      derive pool.PoolFull from Queue.Full
      raise PoolFull, not Timeout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants