Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
ac2a6a6
An incomplete implementation of loads() in rust.
thedrow Feb 26, 2019
fe239cd
Explictly convert to PyBytes.
thedrow Feb 26, 2019
6730c5a
Added datetime support.
thedrow Feb 26, 2019
25cf342
Added benchmarks and used an environment variable to allow skipping s…
thedrow Feb 26, 2019
3240b47
Fix condition.
thedrow Feb 26, 2019
a48e7e6
Added mock code for dictionaries.
thedrow Feb 26, 2019
7fc7960
Adjust rust code to match #187.
thedrow Feb 26, 2019
2e0eed4
Shorten benchmark.
thedrow Feb 26, 2019
75ac374
Speed up date parsing a bit and add TODO.
thedrow Feb 26, 2019
0354205
Handle unicode surrogates.
thedrow Feb 27, 2019
8fa9a13
Complete array support except dictionaries and decimals.
thedrow Feb 27, 2019
5517f89
Refactor everything.
thedrow Feb 28, 2019
98478e1
Begin reimplementing array.
thedrow Feb 28, 2019
b6035e5
Everything is done but two things.
thedrow Feb 28, 2019
4923ace
Natually, trying to import Decimal from the datetime module isn't a g…
thedrow Feb 28, 2019
2079b57
cargo fmt.
thedrow Feb 28, 2019
5f0e5b2
Remove arrays from comments.
thedrow Mar 2, 2019
9a90e6b
autopep8.
thedrow Mar 2, 2019
dc7d72d
isort + make flake8plus happy.
thedrow Mar 2, 2019
63e8074
Build Rust extension in CI.
thedrow Mar 2, 2019
e31f528
Bump tox-pyo3.
thedrow Mar 2, 2019
fea299a
Install rust, compile optionally. Bump tox-pyo3 to 0.1.1.
thedrow Mar 2, 2019
6074f5c
Exlcude building extnesion in PyPy.
thedrow Mar 2, 2019
f3592d8
Fix syntax error.
thedrow Mar 2, 2019
fddcbf0
Fix syntax errors.
thedrow Mar 2, 2019
55f2b6b
Effing YAML...
thedrow Mar 2, 2019
f773422
Bump tox-pyo3 to 0.1.2.
thedrow Mar 2, 2019
7c65248
Autoaccept rustup.
thedrow Mar 2, 2019
4f7c89a
Add rustup to shell env.
thedrow Mar 2, 2019
69b58cb
Raise exception from Rust.
thedrow Mar 2, 2019
fdeb43d
Happfiy lint.
thedrow Mar 2, 2019
48b5d17
Bump tox-pyo3 to 0.1.3.
thedrow Mar 2, 2019
154f44d
Fixed decimal bug, fixed string bug.
thedrow Mar 3, 2019
0ab8712
Fix test.
thedrow Mar 4, 2019
de1f3f7
Require tox-pyo3 0.1.4 and above.
thedrow Mar 4, 2019
865162f
Bump tox-pyo3 to 0.1.5
thedrow Mar 4, 2019
f3a25f8
Avoid the conditional import to benchmark actual speed of the impleme…
thedrow Mar 4, 2019
7271317
Added a benchmark for parsing 128 bits.
thedrow Mar 4, 2019
f6f9213
Added a benchmark for long longs.
thedrow Mar 4, 2019
f455ff6
Create list with capacity.
thedrow Mar 8, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,10 @@ Documentation/
.pytest_cache/
coverage.xml
htmlcov/

# Generated by Cargo
# will have compiled files and executables
/target/

# These are backup files generated by rustfmt
**/*.rs.bk
33 changes: 31 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
language: python
sudo: required
dist: xenial
cache: pip
cache:
- pip: true
- directories:
- $HOME/.cargo
- $TRAVIS_BUILD_DIR/target/debug/incremental
python:
- '2.7'
- '3.4'
Expand All @@ -20,6 +24,8 @@ env:
matrix:
- MATRIX_TOXENV=unit
- MATRIX_TOXENV=integration-rabbitmq
- MATRIX_TOXENV=unit-pyo3
- MATRIX_TOXENV=integration-pyo3-rabbitmq

stages:
- lint
Expand All @@ -40,6 +46,15 @@ matrix:
- python: 2.7
env: TOXENV=apicheck
stage: lint
exclude:
- python: 'pypy2.7-6.0'
env: MATRIX_TOXENV=unit-pyo3
- python: 'pypy2.7-6.0'
env: MATRIX_TOXENV=integration-pyo3-rabbitmq
- python: 'pypy3.5-6.0'
env: MATRIX_TOXENV=unit-pyo3
- python: 'pypy3.5-6.0'
env: MATRIX_TOXENV=integration-pyo3-rabbitmq

before_install:
# - sudo apt install libcurl4-openssl-dev libssl-dev gnutls-dev
Expand All @@ -54,10 +69,24 @@ before_install:
sudo systemctl enable rabbitmq-server
sudo systemctl start rabbitmq-server
fi
- |
if [[ "$TOXENV" == *pyo3* ]]; then
wget -O rustup.sh https://sh.rustup.rs
chmod +x rustup.sh
./rustup.sh -y
source $HOME/.cargo/env
rustup toolchain install nightly
rustup default nightly
fi

install:
- pip --disable-pip-version-check install -U pip setuptools wheel | cat
- pip --disable-pip-version-check install -U tox | cat
- |
if [[ "$TOXENV" == *pyo3* ]]; then
pip --disable-pip-version-check install -U tox pyo3-pack 'tox-pyo3>=0.1.5' | cat
else
pip --disable-pip-version-check install -U tox | cat
fi
script: tox -v -- -v
after_success:
- .tox/$TRAVIS_PYTHON_VERSION/bin/coverage xml
Expand Down
258 changes: 258 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[package]
name = "amqp-serialization"
version = "0.1.0"
authors = ["Omer Katz <omer.drow@gmail.com>"]

[lib]
name = "amqp_serialization"
crate-type = ["cdylib"]

[dependencies]
# pyo3 = { version = "0.6.0-alpha.4", features = ["extension-module"] }
pyo3 = { git = "https://github.com/PyO3/pyo3", branch = "master", features = ["extension-module"] }
byteorder = "1.3.1"
lazy_static = "1.3.0"
Loading