profile
viewpoint
Gustavo J. A. M. Carneiro gjcarneiro Gambit Research London, UK

gjcarneiro/yacron 297

A modern Cron replacement that is Docker-friendly

gjcarneiro/pybindgen 79

PyBindGen: a python bindings generator

gjcarneiro/aiogrpc 0

asyncio wrapper for grpc.io

gjcarneiro/aiohttp 0

HTTP client/server framework for asyncio

gjcarneiro/aiopg 0

aiopg is a library for accessing a PostgreSQL database from the asyncio

gjcarneiro/aiosmtplib 0

asyncio smtplib implementation

gjcarneiro/aresponses 0

Asyncio http mocking. Similar to the responses library used for 'requests'

gjcarneiro/asyncio 0

This project is the asyncio module for Python 3.3. Since Python 3.4, asyncio is part of the standard library.

gjcarneiro/box-linux-sync 0

Linux client for Box.com

gjcarneiro/capnproto-rust 0

Cap'n Proto for Rust

startedgjcarneiro/pybindgen

started time in 2 days

startedWireGuard/wireguard-tools

started time in 2 days

startedgjcarneiro/yacron

started time in 3 days

startedgjcarneiro/yacron

started time in 8 days

startedgjcarneiro/yacron

started time in 9 days

startedgjcarneiro/yacron

started time in 9 days

startedpyr/kinsky

started time in 12 days

startedgjcarneiro/yacron

started time in 13 days

startedstreamlink/streamlink

started time in 13 days

startedZygo/bees

started time in 16 days

startedborntyping/python-riemann-client

started time in 16 days

startedosnr/TabFS

started time in 19 days

startedmilostosic/MTuner

started time in 20 days

startedcorbanworks/aws-blocker

started time in 22 days

startedgjcarneiro/yacron

started time in 22 days

startedgjcarneiro/yacron

started time in 22 days

startedamanusk/s-tui

started time in a month

issue openedgjcarneiro/pybindgen

multiple default arguments?

I encountered a problem upon scanning this newly added ns-3 method (position-allocator.h:101)

  void Add (const std::string filePath,
            double defaultZ = 0,
            char delimiter = ',');

pybindgen is complaining as follows:

==> ./mobility/bindings/ns3modulegen.log <==
ValueError: Error: optional parameter followed by a non-optional one ('delimiter
') (debug: self._parse_tuple_parameters=[('s#', ['&filePath', '&filePath_len'],
'filePath', False), ('d', ['&defaultZ'], 'defaultZ', True), ('c', ['&delimiter']
, 'delimiter', False)])

Is this a current pybindgen limitation that we should work around?

Full error log is below:

Traceback (most recent call last):
  File "bindings/python/ns3modulegen-modular.py", line 131, in <module>
    main(sys.argv)
  File "bindings/python/ns3modulegen-modular.py", line 127, in main
    root_module.generate(out)
  File "/path/to/build/lib/PyBindGen-0.21.0.post13+gac96636-py3.5.egg/pybindgen/module.py", line 928, in generate
  File "/path/to/build/lib/PyBindGen-0.21.0.post13+gac96636-py3.5.egg/pybindgen/module.py", line 767, in do_generate
  File "/path/to/build/lib/PyBindGen-0.21.0.post13+gac96636-py3.5.egg/pybindgen/cppclass.py", line 2009, in generate
  File "/path/to/build/lib/PyBindGen-0.21.0.post13+gac96636-py3.5.egg/pybindgen/cppclass.py", line 2401, in _generate_methods
  File "/path/to/build/lib/PyBindGen-0.21.0.post13+gac96636-py3.5.egg/pybindgen/utils.py", line 187, in call_with_error_handling
  File "/path/to/build/lib/PyBindGen-0.21.0.post13+gac96636-py3.5.egg/pybindgen/overloading.py", line 143, in generate
  File "/path/to/build/lib/PyBindGen-0.21.0.post13+gac96636-py3.5.egg/pybindgen/overloading.py", line 106, in _normalize_py_method_flags
  File "/path/to/build/lib/PyBindGen-0.21.0.post13+gac96636-py3.5.egg/pybindgen/utils.py", line 187, in call_with_error_handling
  File "/path/to/build/lib/PyBindGen-0.21.0.post13+gac96636-py3.5.egg/pybindgen/cppmethod.py", line 410, in get_py_method_def_flags
  File "/path/to/build/lib/PyBindGen-0.21.0.post13+gac96636-py3.5.egg/pybindgen/typehandlers/base.py", line 982, in get_py_method_def_flags
  File "/path/to/build/lib/PyBindGen-0.21.0.post13+gac96636-py3.5.egg/pybindgen/typehandlers/base.py", line 897, in generate_body 
  File "/path/to/build/lib/PyBindGen-0.21.0.post13+gac96636-py3.5.egg/pybindgen/typehandlers/base.py", line 318, in get_parameters
ValueError: Error: optional parameter followed by a non-optional one ('delimiter') (debug: self._parse_tuple_parameters=[('s#', ['&filePath', '&filePath_len'], 'filePath', False), ('d', ['&defaultZ'], 'defaultZ', True), ('c', ['&delimiter'], 'delimiter', False)])

created time in a month

issue commentgjcarneiro/pybindgen

Deprecation warnings for PyEval_ThreadsInitialized()

I agree that PyEval_InitThreads is not an issue here, but there is an issue with typehandlers/base.py includingPyEval_ThreadsInitialized().

I have fixed the issues in the ns-3 code (would appreciate a review if you have time: https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/503) but the code in typehandlers/base.py leads to additional calls to PyEval_ThreadsInitialized() that need to be avoided. I can put similar guards on checking sys.hexversion in typehandlers/base.py if you agree with the approach.

tomhenderson

comment created time in a month

startedgjcarneiro/yacron

started time in a month

startedgjcarneiro/yacron

started time in a month

startedgjcarneiro/yacron

started time in a month

created repositoryobserveinc/terraform-aws-lambda

Terraform module to configure an Observe Lambda function

created time in a month

startedgjcarneiro/yacron

started time in a month

startedgjcarneiro/yacron

started time in a month

issue commentgjcarneiro/pybindgen

Deprecation warnings for PyEval_ThreadsInitialized()

One way to fix this would be to wrap the call to PyEval_InitThreads with #if PY_VERSION_HEX < 0x03070000

tomhenderson

comment created time in a month

issue openedgjcarneiro/pybindgen

Deprecation warnings for PyEval_ThreadsInitialized()

On ns-3 (downstream) we are seeing build failures on Python 3.9 due to these deprecation warnings. I read through issue #37 suggesting needing to call PyEval_InitThreads only for Python <3.7, and perhaps similarly, these PyEval_ThreadsInitialized() methods should be enabled only for the older Python versions.

created time in a month

startedgjcarneiro/yacron

started time in a month

startedgjcarneiro/yacron

started time in a month

startedgjcarneiro/yacron

started time in a month

more