Commit Graph

870 Commits

Author SHA1 Message Date
Fabian Hachenberg
8cef29f3ed Fixed link markup, refined link label 2020-02-13 22:46:31 +01:00
Fabian Hachenberg
e914dc8251 Refined description of what happens when you call init multiple times
The original note was misleading in that it implied an actual memory leakage (in the common sense of the term). This is not the case though since the memory is left as dead space in the message but is always correctly freed upon freeing the arena.
2020-02-13 22:43:54 +01:00
Jacob Alexander
432123edd4 Update README.md 2020-02-12 13:35:27 -08:00
Jacob Alexander
f7f682c509 Update README.md 2020-02-12 13:34:59 -08:00
Jacob Alexander
c118b78142 Adding pypi badge 2020-02-09 00:42:08 -08:00
Jacob Alexander
ac6cdec2d0 Fixes Issue #202
- __path__ was being set to a string
- It's supposed to be a list of strings or None

For pycapnp pydoc isn't super useful at the module level as pydoc will
scan all the files in the directory and just list them.

Here's thread_capnp for example, notice how it doesn't show any
information on the .capnp files.

Help on package thread_capnp:

NAME
    thread_capnp

PACKAGE CONTENTS
    addressbook
    async_calculator_client
    async_calculator_server
    async_client
    async_reconnecting_ssl_client
    async_server
    async_ssl_client
    async_ssl_server
    calculator_client
    calculator_server
    thread_client
    thread_server

DATA
    Example = <capnp.lib.capnp._InterfaceModule object>
    schema = <capnp.lib.capnp._ParsedSchema object>
2020-02-07 16:44:41 -08:00
Jacob Alexander
fb52a439b8 Merge pull request #201 from p4l1ly/master
fix: package_path is a _NamespacePath, not list
2020-01-22 08:41:55 -08:00
Pavol Vargovcik
f3ae35eedd fix: package_path is _NamespacePath, not list 2020-01-20 17:51:41 +01:00
Jacob Alexander
dd3551f978 Adding poll_once() to TwoPartyServer API
- poll_forever() doesn't allow for checking socket connection to client
  * Need to check for client, if eof received then we can close the
  connection and cleanup pycapnp cpu resources (async tasks)
- Updated async examples to fix bugs
  * Add checking code for socket connection to the client and gracefully
  cleanup resources once the client socket connection closes
  * Instanciate a new TwoPartyServer per connection (allows for multiple
  connections)
- Should resolve Issue #198
2020-01-08 18:06:26 -08:00
Jacob Alexander
ea0858352b Didn't package the modified wheels correctly 2019-12-27 01:48:13 -08:00
Jacob Alexander
90b25b43dc Adjusting linux_ tag to manylinux2010_ tag
- Done as a post-processing step using auditwheel
2019-12-27 01:03:55 -08:00
Jacob Alexander
23eab054dd wheel package was missing 2019-12-27 00:09:10 -08:00
Jacob Alexander
01e4d3ed2f Removing pypandoc/pandoc requirement
- Was not working well on manylinux2010 build image
- Not necessary, can use markdown directly now
2019-12-26 23:52:10 -08:00
Jacob Alexander
84600a7ebf Fixing Pypi warnings and errors
- Issues with pypandoc prevented uploading
2019-12-26 23:16:40 -08:00
Jacob Alexander
0e7a133080 Preparations for v1.0.0 release
- Starting with a beta1 release
2019-12-26 22:49:07 -08:00
Jacob Alexander
f01a691c34 Merge branch 'py3benchmarks' 2019-12-26 22:38:42 -08:00
Andrey Cizov
d94d60db8b get rid of all warnings during tests 2019-12-26 22:25:56 -08:00
Andrey Cizov
7bce2f751a fix #181 2019-12-26 22:13:34 -08:00
Andrey Cizov
0f0b30c666 enable structs to be initialized the Python way 2019-12-26 21:25:29 -08:00
Jacob Alexander
cca14902e1 Move artifact step so that they are uploaded even after test failure
- Useful when debugging failures
2019-12-26 20:29:53 -08:00
Jacob Alexander
032b14ed45 Adding artifact upload support for builds
- Including both bdist_wheel and sdist
- Adding pandoc dependencies
2019-12-26 19:55:22 -08:00
Jacob Alexander
5639188029 Updating README.md to include manylinux2010 GitHub Action status 2019-12-21 00:17:11 -08:00
Jacob Alexander
6cd971e74f Adding manylinux2010 github action
- Validates that the manylinux2010 environment can build pycapnp
- Handle lib and lib64 cases
- Has patch for aligned_alloc symbol (not available prior to glibc 2.16)
https://github.com/capnproto/capnproto/issues/743
- Fixes #197
- Should be ready to prepare a v1.0.0b1 release
2019-12-21 00:13:04 -08:00
Jacob Alexander
6b89d6bd4b Removing .travis.yml as it's been replaced by GitHub Actions 2019-12-11 22:46:51 -08:00
Jacob Alexander
fc75e4083d Fixing remaining flake8 lint warnings 2019-12-11 22:44:44 -08:00
Jacob Alexander
f9647aa9a7 Give github action a better name 2019-12-11 22:25:08 -08:00
Jacob Alexander
795a0d88eb Merge pycapnp-async into pycapnp
- Remove references to pycapnp-async
- Cleanup README.md and setup.py
2019-12-11 22:20:44 -08:00
Jacob Alexander
463ac3c48d Update README.md 2019-11-27 10:48:50 -08:00
Jacob Alexander
b101017377 Enabling Python 3.8 tests 2019-11-27 00:25:44 -08:00
Jacob Alexander
69d3465c37 Fixing typo 2019-11-27 00:22:37 -08:00
Jacob Alexander
6bbc6b935b Adding basic changelog 2019-10-21 00:15:34 -07:00
Jacob Alexander
c1cba47346 Small updates for PyPi 2019-10-21 00:13:19 -07:00
Jacob Alexander
c930b3cddc Merge branch 'develop' 2019-10-20 23:01:56 -07:00
Jacob Alexander
362cce345b Fixing Windows tests
- Adding import path filter to exclude non-directories
  Otherwise kj will through exceptions
- Skipped AF_UNIX socket test
- Use default socket configuration when it doesn't matter the type of
socket used
- Open files with utf8 encoding (needed for text validation)
- Explictly call python executable when running external scripts
- Fix path creation to always use os.path.join
- Added timeout to client wait in some tests

- Some broken tests still remain (most likely asyncio related)
2019-10-19 00:26:55 -07:00
Jacob Alexander
62eccff150 Adding capnp extension validation check
- To catch odd import problems on Windows
2019-10-18 12:25:04 -07:00
Jacob Alexander
964f514180 Code gardening
- Removing unused code sections
2019-10-17 00:54:21 -07:00
Jacob Alexander
8062e6f401 Adding Windows 32-bit and 64-bit builds
- Basic tests are working
- May need some adjustments to get all tests working
- Cleaned up bundling to take Python arch into account when building
with multiple architectures
2019-10-17 00:36:46 -07:00
Jacob Alexander
063522d308 Adding Windows compilation support
- Automatically determining build arch from running Python shell
  * Should work across all platforms
2019-10-15 18:39:47 -07:00
Jacob Alexander
67d5276936 Defaulting to built-in capnproto
- Adding code to detect if bundled capnproto is already built
2019-10-15 09:35:55 -07:00
Jacob Alexander
7789ebbf96 Fixing flake8 linting errors 2019-10-15 01:08:11 -07:00
Jacob Alexander
0e830c2127 Minor test fixes for Linux with IPv6 2019-10-15 01:04:00 -07:00
Jacob Alexander
f2651facde Updating capnproto bundling code to use CMake and ninja
- Must faster
- Also showing output by default (easier to diagnose errors)
  * ninja has minimal verbosity (unless there are errors)
2019-10-15 00:42:34 -07:00
Jacob Alexander
10355a74ac More agressive warning fixes
capnp/lib/capnp.cpp:35163:294: warning: moving a temporary object prevents copy
      elision [-Wpessimizing-move]
  ...*)__pyx_t_3), new  ::capnp::DynamicStruct::Pipeline(std::move((( ::capn...
                                                         ^
capnp/lib/capnp.cpp:35163:294: note: remove std::move call here
  ...std::move((( ::capnp::DynamicValue::Pipeline)__pyx_v_self->thisptr->get(__pyx_t_5)).releaseAs< ::capnp::DynamicStruct>())...
     ^~~~~~~~~~                                                                                                              ~
capnp/lib/capnp.cpp:39540:53: warning: moving a temporary object prevents copy
      elision [-Wpessimizing-move]
  __pyx_v_self->thisptr = new  ::kj::AsyncIoContext(std::move( ::kj::se...
                                                    ^
capnp/lib/capnp.cpp:39540:53: note: remove std::move call here
  ...= new  ::kj::AsyncIoContext(std::move( ::kj::setupAsyncIo()));
                                 ^~~~~~~~~~                     ~
capnp/lib/capnp.cpp:47838:294: warning: moving a temporary object prevents copy
      elision [-Wpessimizing-move]
  ...*)__pyx_t_3), new  ::capnp::DynamicStruct::Pipeline(std::move((( ::capn...
                                                         ^
capnp/lib/capnp.cpp:47838:294: note: remove std::move call here
  ...std::move((( ::capnp::DynamicValue::Pipeline)__pyx_v_self->thisptr->get(__pyx_t_5)).releaseAs< ::capnp::DynamicStruct>())...
     ^~~~~~~~~~                                                                                                              ~
2019-10-14 23:54:00 -07:00
Jacob Alexander
f6dd08dda6 Removing deprecated Restorer and ezRestore references
- Not recommended to be used in new designs
- Just pollutes warning messages during compilation (hiding ones that
should be fixed)
- Updated test code to use bootstrap
- Sped up some of the test code that was just sleeping while waiting for
the server (now polling for the socket)
2019-10-14 23:19:39 -07:00
Jacob Alexander
12ddd743ef Fork pycapnp to pycapnp-async
- Breaking some earlier compatibility to cleanup build messages
- As well as being able to publish pypi releases
  * Builds can be complicated to package correctly
- Windows support
2019-10-14 21:34:08 -07:00
Jacob Alexander
de61c304e1 Adding sleep delay
- Reduces 99% CPU usage to around 1%
- It might be useful to have the sleep/delay tunable for certain
applications depending on the latency requirements
2019-10-12 16:21:58 -07:00
Jacob Alexander
940ab9916d Adding reconnecting async ssl example
- async_reconnecting_ssl_client.py will automatically close and
reconnect to a server when it becomes available (rather than hanging or
dying when the server disappears)
2019-10-05 14:50:56 -07:00
Yann Diorcet
722579d671 Guess include and lib directory using capnp executable 2019-09-30 00:58:10 -07:00
Yann Diorcet
a7efe4e3f8 Fix setup.py for MSVC 2019-09-30 00:55:16 -07:00
Jacob Alexander
8361fa8597 Currently asyncio examples require Python 3.7+
- It should be possible to port asyncio examples to at least Python 3.6
  * However, in my quick 10 minute attempt it wasn't as smooth as I'd
  hoped
2019-09-29 23:54:49 -07:00