Commit graph

18 commits

Author SHA1 Message Date
Jacob Alexander
5061cdd1ee Fix black formatting 2023-03-12 11:33:41 -07:00
Jacob Alexander
6e7fffd7de
Applying black formatting
- Fixing flake8 configuration to agree with black
- Adding black validation check to github actions
2021-10-01 11:12:21 -07:00
Jacob Alexander
fc75e4083d
Fixing remaining flake8 lint warnings 2019-12-11 22:44:44 -08: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
b3021e4f6b
Fixing flake8 warnings and errors
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude benchmark

Excluding the benchmark directory (due to protobuf generated files)
Also removing some Python2 specific code
2019-09-27 00:15:13 -07:00
Madeleine Thompson
93ea35e558 make enums hashable 2016-12-05 22:43:09 -05:00
Mike Lundy
8c3c57aa32 Make sure to encode to utf-8, not the default encoding
This allows text fields to take unicode strings under python 2.
2016-03-04 13:50:43 -08:00
Jason Paryani
b863e9b9d6 Fix mistakenly discarding the file parameter on reads
Fixes #82
2015-12-04 16:01:28 -08:00
Jason Paryani
ea1be42252 Add {_get,_set,_has,_init}_by_field methods for faster field access 2014-09-03 15:20:26 -07:00
Jason Paryani
cba4378d1f Add num_first_segment_words argument wherever message creation can occur 2014-04-07 11:15:48 -07:00
Jason Paryani
e9a8354676 Fix problems with null characters in Text/Data fields. Fixes #19 2013-12-18 12:39:56 -08:00
Jason Paryani
effacb872f Fix problem with to_dict 2013-09-04 11:20:05 -07:00
Jason Paryani
1317527893 Change naming for functions to conform to PEP 8. Also deprecate old
read/write api.
2013-09-01 20:10:57 -07:00
Jason Paryani
6fcdf841e4 Update preferred method for reading/writing messages from files 2013-09-01 02:13:19 -07:00
Kenton Varda
1cfea9c846 Add shortcuts for reading from / writing to files. In Python, it doesn't make much sense to force people to muck around with MessageReaders and MessageBuilders since everything is landing on the heap anyway. Instead, let's make it easy: MyType.read[Packed]From(file) reads a file and returns a MyType reader. MyType.newMessage() returns a MyType builder representing the root of a new message. You can call this builder's write[Packed]To(file) method to write it to a file. 2013-08-31 18:19:02 -07:00
Kenton Varda
86b742e91d Wrap MessageBuilder::setRoot(). 2013-08-31 17:07:44 -07:00
Kenton Varda
0478ee3081 Add tests based on TestAllTypes from the C++ test.capnp. Fix problems uncovered in capnp.pyx. Requires capnproto-c++-0.3.0-rc5, as I found a bug in the base library. 2013-08-31 16:44:54 -07:00
Jason Paryani
add49178f2 Add regression test 2013-08-29 16:45:31 -07:00