-
Notifications
You must be signed in to change notification settings - Fork 0
Comparing changes
Open a pull request
base repository: tobiasah/pycapnp
base: master
head repository: capnproto/pycapnp
compare: master
- 15 commits
- 30 files changed
- 7 contributors
Commits on Oct 23, 2023
-
Handle exceptions from server callbacks
In its current form, when a server callback throws an exception, it is completely swallowed. Only when the asyncio loop is being shut down might one possibly see that error. On top of that, the connection is never closed, causing any clients to hang, and a memory leak in the server. This is a proposed fix that reports the exception to the asyncio exception handler. It also makes sure that the connection is always closed, even if the callback doesn't close it explicitly. Note that the design of AsyncIoStream is directly based on the design of Python's asyncio streams: https://docs.python.org/3/library/asyncio-stream.html These streams appear to have exactly the same flaw. I've reported this here: python/cpython#110894. Since I don't really know what I'm doing, it might be worth seeing what kind of solution they might come up with and model our solution after theirs.
Configuration menu - View commit details
-
Copy full SHA for ca8d120 - Browse repository at this point
Copy the full SHA ca8d120View commit details -
Disable the use of ninja for windows builds
Aperantly github added ninja to all of there runners now. This causes the windows build to fail. This is expected because we add the architecture as a compiler arg which is not known to ninja. Even with this the build fails. This commit disables ninja on windows for now. Once we fixed the underlying issue with ninja and windows we can reenable it.
Configuration menu - View commit details
-
Copy full SHA for 7a49706 - Browse repository at this point
Copy the full SHA 7a49706View commit details -
DynamicCapabilityClient: fix crash due to wrong types
In the last commit touching this line, a ')' was put in the wrong place, leading to errors like this one: ``` File "capnp/lib/capnp.pyx", line 2172, in capnp.lib.capnp._DynamicCapabilityClient.__dir__ TypeError: unsupported operand type(s) for +: 'set' and 'tuple' ```
Configuration menu - View commit details
-
Copy full SHA for c9bea05 - Browse repository at this point
Copy the full SHA c9bea05View commit details
Commits on Nov 2, 2023
-
Properly join list of methods in _DynamicCapabilityClient
This was already fixed in c9bea05, but the fix does not seem to work. This commit uses a set union, which should be more robust. It also adds a couple of assertions to verify that it indeed works.
Configuration menu - View commit details
-
Copy full SHA for 42665a6 - Browse repository at this point
Copy the full SHA 42665a6View commit details
Commits on Nov 5, 2023
-
Make
reraise_kj_exception
available to downstreamI'm using Pycapnp in a project, where we compile `.capnp` files directly to Cython instead of using the dynamic interface (for speed). For this, we need access to the `reraise_kj_exception` C function defined by Pycapnp. This is not possible, because Cython does not automatically make this function available to downstream users. My previous solution, in capnproto#301, was rather flawed. The file `capabilityHelper.cpp`, where `reraise_kj_exception` is defined, was bundled into the distribution, so that this file could be included in downstream libraries. This turns out to be a terrible idea, because it redefines a bunch of other things like `ReadPromiseAdapter`. For reasons not entirely clear to me, this leads to segmentation faults. This PR revers capnproto#301. Instead, in this PR I've made `reraise_kj_exception` a Cython-level function, that can be used by downstream libraries. The C-level variant has been renamed to `c_reraise_kj_exception`.
Configuration menu - View commit details
-
Copy full SHA for aafec22 - Browse repository at this point
Copy the full SHA aafec22View commit details
Commits on Nov 8, 2023
-
Support
_DynamicListReader
in_setDynamicField
See the test for an explanation. Note that I'm not sure what the purpose of `_setDynamicFieldWithField` and `_setDynamicFieldStatic` is. It does not appear to be used. I've kept them for now (they are a public API), but perhaps this can be removed.
Configuration menu - View commit details
-
Copy full SHA for ef5e039 - Browse repository at this point
Copy the full SHA ef5e039View commit details -
- The `KjException._to_python()` function neglected to check if the wrapper was set when attempting to convert to `AttributeError`, leading to exceptions while raising an exception. - The syntax `raise A, B, C` hasn't existed since Python 3. The only reason it works is because Cython supports it. Lets get rid of it. - There was an attempt to convert a certain kind of `KjException` to an `AttributeError`. However, the original exception remains in the context when the new exception is raised. This is confusing. We get rid of the original exception by doing `raise e._to_python() from None`.
Configuration menu - View commit details
-
Copy full SHA for 49bda5c - Browse repository at this point
Copy the full SHA 49bda5cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0ec4d0b - Browse repository at this point
Copy the full SHA 0ec4d0bView commit details
Commits on Nov 9, 2023
-
Corner case for cancelled server methods that raise exceptions
When a server method is cancelled, but it nonetheless raises an exception (other than `CancelledError`), this exception cannot be reported to the caller (because it has cancelled that call). The only place where it can go is to the asyncio exception handler...
Configuration menu - View commit details
-
Copy full SHA for b6ea909 - Browse repository at this point
Copy the full SHA b6ea909View commit details
Commits on Nov 25, 2023
-
Some fixes to the magic import system
- Stop adding the directory of every .capnp file to the import path. If a .capnp file wants to import a file in its own directory, it should use a relative import. Fixes capnproto#278 - Stop using /usr/include/capnp as an import path. This is incorrect. It should only be /usr/include. - Stop allowing additional paths to be specified for magic imports. This leads to inconsistencies. More specifically, the way that a nested import like `ma.mb.mc_capnp` gets imported by python, is to first import `ma`, then import `ma.mb`, and finally `ma.mb.mc_capnp`. Pycapnp's magic importing is only involved in the last step. So any additional paths specified don't work for nested imports. It is very confusing to only have this for non-nested imports. Users with folder layouts that don't follow pythons import paths can still use `capnp.load(.., .., imports=[blah])`.
Configuration menu - View commit details
-
Copy full SHA for 3aade70 - Browse repository at this point
Copy the full SHA 3aade70View commit details -
Configuration menu - View commit details
-
Copy full SHA for 84830d6 - Browse repository at this point
Copy the full SHA 84830d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1f2349a - Browse repository at this point
Copy the full SHA 1f2349aView commit details
Commits on Jan 19, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 1fb1687 - Browse repository at this point
Copy the full SHA 1fb1687View commit details
Commits on Apr 12, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 78dd54e - Browse repository at this point
Copy the full SHA 78dd54eView commit details
Commits on Sep 25, 2024
-
Include _custom_build in sdist
This fixes build issues for installations that cannot use wheels published on PyPI. Issue capnproto#364 would be fixed by this. Python build tools like `python -m build` first build a source distribuiton (sdist) and then use it (and only it) to build a binary wheel from. This doesn't work if one of the build scripts isn't in the sdist however, which was the case prior to this patch.
Configuration menu - View commit details
-
Copy full SHA for 59a639f - Browse repository at this point
Copy the full SHA 59a639fView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff master...master