Commit graph

95 commits

Author SHA1 Message Date
Jason Rhinelander 6bcad633f1
1.0.2 with misc fixes (see PR #10) 2021-12-03 15:41:47 -04:00
Jason Rhinelander c51e05f82b
Merge remote-tracking branch 'origin/stable' into ubuntu/hirsute 2021-12-03 15:41:45 -04:00
Jason Rhinelander b5f3ff6132
Merge remote-tracking branch 'origin/dev' into stable 2021-12-03 15:40:12 -04:00
Jason Rhinelander e4b9a39fd0
Merge pull request #10 from jagerman/fixes
Fixes
2021-12-03 15:39:55 -04:00
Jason Rhinelander 36e32066d0
Version bump 2021-12-03 13:10:19 -04:00
Jason Rhinelander 4136c29d06
Make Message property accessors copy
The default references, which breaks because Message gets reused, so
storing `.conn` gives you something that changes the next time a worker
gets a message.
2021-12-03 13:08:11 -04:00
Jason Rhinelander f1160d0a25
Make allow_connection properly optional 2021-12-03 13:07:49 -04:00
Jason Rhinelander 4020ab8a49
Make ConnectionIDs hashable 2021-12-03 13:07:35 -04:00
Jason Rhinelander a3390d9014
rebuild against newer oxenmq 2021-12-02 19:18:22 -04:00
Jason Rhinelander d0677429a1
fix allow callback 2021-12-02 15:41:53 -04:00
Jason Rhinelander 1b0611e05d
Merge remote-tracking branch 'origin/stable' into ubuntu/hirsute 2021-12-02 15:41:46 -04:00
Jason Rhinelander 8010b5984e
Merge remote-tracking branch 'origin/dev' into stable 2021-12-02 15:40:17 -04:00
Jason Rhinelander a678fcf0ce
Remove include for older pybind compatibility 2021-12-02 15:39:54 -04:00
Jason Rhinelander b6ebfb4443
fix allow callback 2021-12-02 15:21:05 -04:00
Jason Rhinelander 69f4475fef
Merge remote-tracking branch 'origin/stable' into ubuntu/hirsute 2021-12-02 15:21:03 -04:00
Jason Rhinelander 041d2051df
Merge branch 'dev' into stable 2021-12-02 15:20:08 -04:00
Jason Rhinelander 59e86ab6b6
Merge pull request #9 from jagerman/fix-allow-func
Fix allow function argument decoding error
2021-12-02 15:17:04 -04:00
Jason Rhinelander 530280ac60
Fix allow function argument decoding error
Avoids a utf-8 decoding error when accepting a connection with an allow
function by properly wrapping the function in a version that passes
pubkey as a `bytes`.
2021-12-02 15:14:54 -04:00
Jason Rhinelander 5af9a631a1 rebuild against newer oxenmq 2021-11-30 15:24:13 -04:00
Jason Rhinelander 5ace56c024 use prebuilt builder ci; reformat 2021-10-27 12:20:32 -03:00
Jason Rhinelander 9339fd011a 1.0.0 final release 2021-10-22 20:26:38 -03:00
Jason Rhinelander 573cb07133 Merge remote-tracking branch 'origin/stable' into ubuntu/hirsute 2021-10-22 20:26:31 -03:00
Jason Rhinelander 37b35000d3
Merge pull request #8 from oxen-io/dev
1.0.0
2021-10-22 20:24:33 -03:00
Jason Rhinelander 367007dd66 Update readme for new code 2021-10-22 20:22:54 -03:00
Jason Rhinelander 196168cfbd 1.0.0 final release 2021-10-22 20:15:42 -03:00
Jason Rhinelander 92c6eccb0a Merge remote-tracking branch 'origin/dev' into ubuntu/hirsute 2021-10-22 20:15:39 -03:00
Jason Rhinelander 06e0e2eb44
Merge pull request #7 from jagerman/redo
pyoxenmq overhaul
2021-10-22 20:09:09 -03:00
Jason Rhinelander b12c754895 Fixes and address warnings
- timeout in the syncronous connect_remote wasn't being passed through
- callback and syncronous connect_remote had some deviation in args;
  unified them to both take keyword-only timeout and
  ephemeral_routing_id, and to take timeout as a timedelta with a
  default (rather than an optional in the callback-based one).
- removed unused "noopt".  I forget what it was for, but it didn't end
  up being used.
2021-10-22 19:12:57 -03:00
Jason Rhinelander 6d59248f45 Build with -Wextra -Werror and color 2021-10-22 19:12:57 -03:00
Jason Rhinelander 97238b04ba Hacking around for macos
Build local oxenmq

Install everything into a local prefix
2021-10-22 19:12:57 -03:00
Jason Rhinelander 996370228c Add drone build & tests 2021-10-22 19:12:57 -03:00
Jason Rhinelander 171e94cf11 Add simple pytest tests 2021-10-22 17:03:06 -03:00
Jason Rhinelander 5ceed8a416 Various fixes for bugs revealed in testing
- make extract data parts always flatten to arbitrary depth.  We were
  only flattening once (and only sometimes), but arbitrary flattening is
  nicer (as long as we don't ultimately encouter anything that isn't
  str/bytes).
- fix Message.data()/.dataview() pre-loading nulls into the list.  The
  py::list constructor argument here is pre-fill, not a reservation.
- fix add_command: it was broken because when the wrapped callback gets
  invoked it tries casting the Message via copying, but that breaks
  (Message isn't copyable).  Fix it by adding a wrapper that does a
  referencing cast to a Python object.
- Add missing docs for add_command
- Doc typo fixes
- Remove OxenMQ default and loglevel constructors, and make the
  remaining constructor take everything by keyword arguments.  (Default
  constructor remains equivalent, and the log-level constructor now has
  to have the log level named).
- Fix OxenMQ keyword constructor: invoking it was failing because the
  annotation default on sn_lookup wasn't properly castable to the
  required types (it should be py::none() rather than nullptr).  Also
  fix the defaults for pubkey/privkey to be py::bytes() (the empty
  string worked fine, but using bytes makes it show up as bytes defaults
  in the generated signature doc string).
- Further document connect_inproc with a description of why you might
  want it.
- Fix send not actually including the message data parts
- Work around segfault in the reply callback: because we have lambdas
  with python object captures, we'd segfault in the proxy thread when it
  frees them after calling them because that freeing invokes python
  destructor but it doesn't hold the gil.  Fixed by making the lambda
  consume its own callbacks (which is fine because oxenmq will invoke
  the callback exactly once).
- Fix request_future invocation which raised an error on invocation:
  straight lambdas aren't castable to python objects, so stuff the
  lambda inside std::functions, which are.
2021-10-22 16:28:21 -03:00
Jason Rhinelander 6a382865b2 Remove cmake build system and submodules
setup.py works fine, and we don't need two separate build systems.

Remove the submodules as well because we aren't using them and don't
need them; you should install pybind11 and oxenmq outside this project.
2021-10-22 16:09:36 -03:00
Jason Rhinelander a62f6c4769 Formatting 2021-10-22 16:08:57 -03:00
Jason Rhinelander c4d9eb8a8f De-Frankenstein the build 2021-10-22 00:45:15 -03:00
Jason Rhinelander b61620d0db Add hirsute deb 2021-10-21 23:49:40 -03:00
Jason Rhinelander 1d2cac604e Show --info in log as well 2021-10-21 23:49:00 -03:00
Jason Rhinelander 4bee0e2ad8 fix 2021-10-21 23:49:00 -03:00
Jason Rhinelander 66d175820f Unbreak ci upload script when no all-arch debs 2021-10-21 23:49:00 -03:00
Jason Rhinelander d1ada6d92a Add missing debian/source files 2021-10-21 23:49:00 -03:00
Jason Rhinelander bfe5c128a2 Add ci config to build debs 2021-10-21 23:49:00 -03:00
Jason Rhinelander b5f79bed0e Add sid package 2021-10-21 23:49:00 -03:00
Jason Rhinelander 0e1283784e Remove unwanted headers
- pybind11/gil.h is only in recent pybind (but is implicitly included by
  the main pybind11.h header)
- detail/common shouldn't be included
2021-10-21 23:47:58 -03:00
Jason Rhinelander a98722a7da pyoxenmq overhaul
- Wrap much more of the OxenMQ
- Add extensive pydoc to everything
- Switch setup.py to pybind's built-in tools
2021-10-21 22:23:02 -03:00
Jeff feb28e1973
Merge pull request #6 from jagerman/oxenmq-updates
Oxenmq updates
2021-06-20 03:59:15 -04:00
Jason Rhinelander 959df9c5dd Remove duplicate method
Not sure why this was here, but AFAICT it is identical to
`add_request_command` without the `_ex`.
2021-06-19 22:58:03 -03:00
Jason Rhinelander 2805d01f6b Update old routing id field name 2021-06-19 22:58:03 -03:00
Jason Rhinelander 739e445c03 Rename to pyoxenmq
Finish renaming everything from loki->oxen, and update to latest
oxen-mq submodule.
2021-06-19 22:57:43 -03:00
Jeff 9ac2d20632
Merge pull request #5 from majestrate/oxen-refactor-2021-02-01
update readme
2021-04-14 13:27:41 -04:00