Commit Graph

293 Commits

Author SHA1 Message Date
Ivan Carvalho bd0e0d808f
Add optional support for conversion from `indexmap::IndexMap` (#1728)
* Add support to IndexMap

* Fix indexmap version to 1.6.2

* Remove code duplication by mistake

* Fix ambiguity in test

* Minor change for doc.rs

* Add to lib.rs docstring

* Add indexmap to conversion table

* Add indexmap flag in docs.rs action

* Add indexmap feature to CI

* Add note in changelog

* Use with_gil in tests

* Move code to src/conversions/indexmap.rs

* Add PR number to CHANGELOG

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>

* Add round trip test

* Fix issue in MSRV Ubuntu build

* Fix Github workflow syntax

* Yet Another Attempt to Fix MSRV Ubuntu build

* Specify hashbrown to avoid ambiguity in CI

* Add suggestions

* More flexible version for indexmap

* Add documentation

* Address PR comments

* Export indexmap for docs

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2021-07-22 08:15:26 +01:00
David Hewitt 3f8c4ad38e release: 0.14.1 2021-07-04 16:49:36 +01:00
David Hewitt adf6bdba8e release: 0.14.0 2021-07-03 08:37:00 +01:00
messense fa07a5e377 Migrate all benchmark to criterion 2021-05-26 14:25:00 +08:00
David Hewitt 79c7149d52 pyo3-build-config: new crate to re-use build.rs across crates 2021-05-20 09:03:33 +01:00
David Hewitt 0cc77c77b2 benches: add bench_gil 2021-05-17 07:37:03 +01:00
mejrs dd26566d0c added package.metadata.docs.rs information 2021-05-04 23:25:09 +02:00
David Hewitt 370652eba8 examples: maturin and setuptools_rust examples 2021-04-03 11:59:41 +01:00
David Hewitt a2788b052d hashbrown: support 0.9 or 0.11 2021-03-24 22:35:37 +00:00
dependabot[bot] 01ad9d8e8b
build(deps): update hashbrown requirement from 0.9 to 0.11
Updates the requirements on [hashbrown](https://github.com/rust-lang/hashbrown) to permit the latest version.
- [Release notes](https://github.com/rust-lang/hashbrown/releases)
- [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/hashbrown/compare/v0.9.0...v0.11.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-15 05:47:12 +00:00
dependabot[bot] 6573cb1b96 build(deps): update num-complex requirement from 0.3 to 0.4
Updates the requirements on [num-complex](https://github.com/rust-num/num-complex) to permit the latest version.
- [Release notes](https://github.com/rust-num/num-complex/releases)
- [Changelog](https://github.com/rust-num/num-complex/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-complex/compare/num-complex-0.3.0...num-complex-0.4.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-08 21:35:35 +00:00
David Hewitt 52555eb7a7
Merge pull request #1481 from PyO3/dependabot/cargo/num-bigint-0.4
build(deps): update num-bigint requirement from 0.3 to 0.4
2021-03-08 08:52:27 +00:00
dependabot[bot] adcc4719d2
build(deps): update num-bigint requirement from 0.3 to 0.4
Updates the requirements on [num-bigint](https://github.com/rust-num/num-bigint) to permit the latest version.
- [Release notes](https://github.com/rust-num/num-bigint/releases)
- [Changelog](https://github.com/rust-num/num-bigint/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-bigint/compare/num-bigint-0.3.0...num-bigint-0.4.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-08 05:49:06 +00:00
David Hewitt 72e6dc6618 cargo.toml: don't use a glob for examples 2021-03-07 22:48:56 +00:00
David Hewitt 977735db20 pymethods: make inventory optional 2021-03-04 19:52:58 +00:00
David Hewitt 9e4e0dbbe0 auto-initialize: remove from default features 2021-02-22 22:34:34 +00:00
David Hewitt 7b99e391fa pyclass-impl: merge implementation traits 2021-02-18 08:19:07 +00:00
David Hewitt 190eb72803 release: 0.13.2 2021-02-12 21:34:29 +00:00
Georg Brandl fa8d7518ca Restore compatibility with Rust 1.41.
This version is currently supported by Debian stable and Alpine Linux.

Fixes #1420
2021-02-11 10:14:25 +01:00
Daniil Konovalenko abb5829e9c implement Serialize, Deserialize for Py<T> 2021-01-11 22:19:10 +00:00
Fabio Valentini 180a51d420
Exclude more files from published crates 2021-01-10 18:59:50 +01:00
David Hewitt d2e87d95f3 release: 0.13.1 2021-01-10 12:20:10 +00:00
David Hewitt 59707f0b81 auto-initialize: new feature to control initializing Python 2021-01-02 16:08:10 +00:00
David Hewitt 26ca1f5bca Release 0.13 2020-12-22 15:42:04 +00:00
David Hewitt a689ab42c6 macros: rename crates for consistency 2020-12-20 06:39:28 +00:00
kngwyu cd7348fc51 Use proptest for testing 128bit intger conversion 2020-12-18 13:26:29 +09:00
Yuji Kanagawa 9aa70f7c89
Merge pull request #1263 from PyO3/abi3-min-python
Add abi3-py* features
2020-12-08 12:52:00 +09:00
David Hewitt afa5ed3ba2 Release notes for backported 0.12.4 2020-11-28 20:21:52 +00:00
David Hewitt 87bacf1be5 performance: use vectorcall for call0 and call_method0 2020-11-25 20:59:11 +00:00
kngwyu eae0d8682b Correct the definitions of abi3-py* features 2020-11-16 02:23:44 +09:00
kngwyu 597119d40a Add abi3-py* features 2020-11-16 00:39:54 +09:00
David Hewitt 9617edfca9 msrv: bump to 1.45 2020-11-12 11:33:08 +00:00
Alex Gaynor ba6f0ecdfa Merge branch 'master' into abi3-merge-master 2020-10-18 10:47:06 -04:00
Alex Gaynor 9e34835b76 Merge branch 'master' into abi3-merge-master 2020-10-12 18:03:14 -04:00
David Hewitt 1539db762b Remove unused `python3` feature 2020-10-12 16:53:49 +01:00
David Hewitt 38af32e33e Release 0.12.3 2020-10-12 16:18:25 +01:00
David Hewitt 7b3dd68bfb Fix support for MSRV
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
2020-10-12 15:46:40 +01:00
David Hewitt 1cecad884a Release 0.12.2 2020-10-12 12:56:46 +01:00
Alex Gaynor aabad7cf7f Assorted updates to the abi3 branch from review 2020-10-11 19:51:27 -04:00
Alex Gaynor 140790b15f Merge branch 'master' into abi3-merge-master 2020-10-10 10:11:49 -04:00
dependabot[bot] 61c388ef6c
Update paste requirement from 0.1.6 to 1.0.1
Updates the requirements on [paste](https://github.com/dtolnay/paste) to permit the latest version.
- [Release notes](https://github.com/dtolnay/paste/releases)
- [Commits](https://github.com/dtolnay/paste/compare/0.1.6...1.0.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-21 06:09:24 +00:00
kngwyu c07e1aa40a Use abi3 feature, instead of unstable-api 2020-09-20 00:06:14 +09:00
David Hewitt c05815520c Release 0.12.1 2020-09-16 21:45:36 +01:00
David Hewitt 32be8d9a3c Release 0.12 2020-09-12 14:13:45 +01:00
kngwyu 7a4c5e2960 Merge branch 'master' into abi3 2020-09-10 00:48:20 +09:00
kngwyu 1941f4daef Rename all-apis with unstable-api 2020-09-06 17:37:55 +09:00
dependabot[bot] 6f80a8eaa3
Update hashbrown requirement from 0.8 to 0.9
Updates the requirements on [hashbrown](https://github.com/rust-lang/hashbrown) to permit the latest version.
- [Release notes](https://github.com/rust-lang/hashbrown/releases)
- [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/hashbrown/compare/v0.8.0...v0.9.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-06 04:50:18 +00:00
kngwyu d2a10b688f Introduce all-apis feature to support abi3 2020-09-05 17:52:41 +09:00
Matthew Treinish dfa917c775
Add optional support for conversion from Hashbrown types
This commit adds optional support for conversion from hashbrown's [1]
HashMap [2] and HashSet [3] types. The HashMap and HashSet implementation
in std::collections is a copy from HashBrown, but Hashbrown still
provides some features over the std::collections version. Primarily this
is rayon support and also using a default hasher which is faster
(although not DOS resistent). The hashbrown versions provide a drop in
replacement over std::collections to get these features. To take
advantage of native type conversion in PyO3 this commit adds hashbrown
as an optional dependency and when the feature is enabled the traits for
going between python and hashbrown::HashMap and hashbrown::HashSet are
available. This is handy for users of hashbrown which have to inline
these conversions manually in functions that take dicts as args.

[1] https://github.com/rust-lang/hashbrown
[2] https://docs.rs/hashbrown/0.8.2/hashbrown/struct.HashMap.html
[3] https://docs.rs/hashbrown/0.8.2/hashbrown/struct.HashSet.html
2020-08-25 06:42:56 -04:00
David Hewitt 51111dc861 Migrate from Travis CI to Github Actions 2020-08-12 08:09:30 +01:00
kngwyu 6cbe9ff30d Bump version to 0.11.1 2020-06-30 14:53:55 +09:00
dependabot-preview[bot] cefc45889c
Update parking_lot requirement from 0.10.2 to 0.11.0
Updates the requirements on [parking_lot](https://github.com/Amanieu/parking_lot) to permit the latest version.
- [Release notes](https://github.com/Amanieu/parking_lot/releases)
- [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Amanieu/parking_lot/compare/0.10.2...0.11.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-29 09:01:21 +00:00
kngwyu fd94a0d55c Bump version to 0.11.0 2020-06-27 23:59:44 +09:00
kngwyu 404f3981e5 Improve docs and Remove all-stable feature 2020-06-21 16:10:19 +09:00
kngwyu a840ebbb5a Support Rust 1.39.0 2020-06-18 19:59:40 +09:00
kngwyu 64408142f5 Use all-stable feature in CI instead of --all-features 2020-06-18 18:43:46 +09:00
konstin 3180e5cc06 POC stable rust (2 tests failing) 2020-06-18 17:21:09 +09:00
Yuji Kanagawa a044f3c322
Merge branch 'master' into slot-provider 2020-06-18 15:49:56 +09:00
dependabot-preview[bot] f8fd478a00
Update num-bigint requirement from 0.2 to 0.3
Updates the requirements on [num-bigint](https://github.com/rust-num/num-bigint) to permit the latest version.
- [Release notes](https://github.com/rust-num/num-bigint/releases)
- [Changelog](https://github.com/rust-num/num-bigint/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-bigint/compare/num-bigint-0.2.0...num-bigint-0.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-15 11:57:30 +00:00
dependabot-preview[bot] cc0f59077f
Update num-complex requirement from 0.2 to 0.3
Updates the requirements on [num-complex](https://github.com/rust-num/num-complex) to permit the latest version.
- [Release notes](https://github.com/rust-num/num-complex/releases)
- [Changelog](https://github.com/rust-num/num-complex/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-complex/compare/num-complex-0.2.0...num-complex-0.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-15 08:48:53 +00:00
kngwyu 7967874177 Remove specialization from basic/buffer/descr/iter protocols 2020-06-13 15:24:56 +09:00
kngwyu 837261c860 Bump version to 0.10.1 2020-05-14 20:57:51 +09:00
David Hewitt 509db11777 Use parking_lot::Mutex instead of spinlock 2020-05-14 09:14:30 +01:00
Yuji Kanagawa 7e4d1c41e3
Bump version to 0.10.0 (#919)
* Bump version to 0.10.0

* Apply suggestions from code review

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>

* Improve CHANGELOG completeness and messaging

* ObjectProtocol was in prelude

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2020-05-13 13:24:36 +09:00
Mara Bos dab8c2e4e7 Move macros into separate feature.
It's enabled by default to avoid breakage, but this allows compiling
pyo3 with a lot less dependencies in case the macros are not needed.
2020-05-09 11:27:30 +02:00
Mara Bos 0407288758 Simplify ReleasePool, remove parking_lot dependency.
Replaces the parking_lot Mutex by a simple AtomicBool spinlock,
and simplifies the ReleasePool to contain one Vec instead of pointers to
two Vecs.
2020-05-05 08:08:07 +02:00
Yuji Kanagawa c4f36535d8
Merge pull request #895 from fusion-engineering-forks/tryfrom
Replace num-traits dependency by std's TryFrom.
2020-05-05 12:26:35 +09:00
Mara Bos c4e68e6286
Update build.rs and remove serde and regex dependencies. (#896) 2020-05-04 19:51:19 +01:00
Mara Bos 39b41b3dc7 Replace num-traits dependency by std's TryFrom. 2020-05-04 15:50:07 +02:00
Yuji Kanagawa 5e285fda78
Fix synchronization of datetime tests (#867)
* Fix synchronization of datetime tests

* Use Mutex instead of RawMutex
2020-04-11 19:10:16 +09:00
kngwyu 4af61e83c3 Remove nightly flag from parking_lot 2020-04-11 14:35:40 +09:00
Yuji Kanagawa 956d499f5d Merge pull request #848 from ijl/reduce-build-deps
Reduce build dependencies from regex
2020-04-09 13:01:53 +09:00
kngwyu c83d88ba8d Bump version to 0.9.2 2020-04-09 13:00:13 +09:00
kngwyu 4759358acb Bump version to 0.9.1 2020-03-23 18:55:24 +09:00
kngwyu 89e5a654ad Bump version to 0.9.0 2020-03-19 13:48:00 +09:00
kngwyu 433b812a68 Remove ^ from Cargo.toml + small improvements for migration.md 2020-03-13 18:40:43 +09:00
kngwyu 084b3621be Relax version requirements for dependencies 2020-03-09 14:32:49 +09:00
kngwyu e67681d018 Refactor build.rs 2020-03-08 22:54:42 +09:00
kngwyu 58a0841ff7 Rewrite LazyTypeObjects without once_cell 2020-02-07 00:10:27 +09:00
David Hewitt 5cbdef6471 Remove static mut from PyTypeInfo implementation 2020-01-30 00:14:27 +00:00
Yuji Kanagawa 4fe1841c5f
Merge branch 'master' into v0.9.0 2020-01-17 14:27:02 +09:00
ijl 4b2f4b3a15 Use parking_lot::Mutex instead of spin::Mutex
spin is no longer maintained.

Fixes #718.
2020-01-16 13:53:54 +00:00
kngwyu 56f68a55cd Bump version to 0.9.0-alpha.1 2020-01-16 20:05:44 +09:00
Alexander Niederbühl 0a84c201f7 Revert "Disable segfaulty subclassing by default"
This reverts commit 5096f936dc.
2020-01-12 01:22:32 +01:00
kngwyu d22b03edde Bump version to 0.8.5 2020-01-05 16:39:18 +09:00
kngwyu d8a4ecb476 Bump version to 0.8.4 2019-12-14 15:20:55 +09:00
kngwyu 935adaa5d5 Bump version to 0.8.3 2019-11-23 17:09:10 +09:00
kngwyu 14d2196ba0 Bump version to 0.8.2 2019-10-26 22:47:19 +09:00
kngwyu d019fe814c Bump version to 0.8.1 2019-10-08 01:52:06 +09:00
kngwyu a6d38c9929 Support conversion between num-bigint and Python Long 2019-09-28 17:43:26 +09:00
Yuji Kanagawa 75516d87eb
Merge pull request #603 from kngwyu/upd-doc
Update README and document
2019-09-28 16:18:53 +09:00
kngwyu d97f003a08 Update trybuild 2019-09-28 15:19:11 +09:00
Daniele Esposti fe9575a34d Search for both python3 and python 2019-09-08 09:10:40 +01:00
konstin a3e41cc819 Release 0.8.0 2019-09-05 13:18:50 +02:00
konstin 39f151c3bd Upgrade to syn 1.0 2019-08-19 13:11:57 +02:00
Yuji Kanagawa 1f85593d0a
Merge pull request #564 from kngwyu/paste
Replace mashup with paste
2019-08-11 18:42:21 +09:00
konstin 5096f936dc Disable segfaulty subclassing by default
See https://github.com/PyO3/pyo3/issues/220 and https://github.com/PyO3/pyo3/issues/407 for details on those segfaults
2019-08-05 11:52:47 +02:00
kngwyu 41f31e85fd Replace mashup with paste 2019-08-04 23:50:10 +09:00
konstin 1332174e00 Upgrade version check 2019-07-15 13:05:56 +02:00
kngwyu 503ec1a061 Use unindent crate instead of _indoc_runtime 2019-06-15 01:10:18 +09:00