Commit Graph

460 Commits

Author SHA1 Message Date
Alex Gaynor a941b2c65f Added a changelog entry 2021-07-15 07:14:44 -04:00
David Hewitt d11943ab6d macros-backend: don't error on #[doc(hidden)] 2021-07-08 23:41:24 +01:00
David Hewitt 3f8c4ad38e release: 0.14.1 2021-07-04 16:49:36 +01:00
Georg Brandl f7235482eb PyPy: the PyList_GET/SET macros are defined as functions, the PyTuple_ ones do not exist 2021-07-04 15:54:40 +02:00
messense eaf5dcaab7 Implement `IntoPy<PyObject>` for `&PathBuf` and `&OsString` 2021-07-04 16:18:04 +08:00
David Hewitt adf6bdba8e release: 0.14.0 2021-07-03 08:37:00 +01:00
David Hewitt 0215054012
Merge pull request #1702 from ohadravid/to-python-set-non-default-hashbuilder
Make `ToPyObject` impl for `HashSet` accept non-default hashers.
2021-06-27 17:29:00 +01:00
Ohad Ravid fcffcdfae5 Added `size_hint` impls for `{PyDict,PyList,PySet,PyTuple}Iterator`s 2021-06-27 16:10:53 +03:00
Ohad Ravid 43fca5dad7 Make `ToPyObject` impl for `HashSet` accept non-default hashers. 2021-06-27 15:19:01 +03:00
messense b5b9a480cd Add `wrap_pyfunction` macro to prelude 2021-06-24 22:34:55 +08:00
mejrs 455cc95c54
implement ffi/cpython/pystate (#1687)
* dont reexport cpython items twice

* add ffi module level doc

* reorder to header file order

* cargo fmt

* implement cpython/pystate

* fix import errors

* make PyInterpreterState opaque

* update changelog

* fix formatting
2021-06-24 20:05:15 +08:00
David Hewitt a02353ce34
Merge pull request #1679 from messense/error-cause
Add support for setting and retrieving exception cause
2021-06-24 07:58:34 +01:00
messense 2bac6c5a3a Add support for setting and retrieving exception cause 2021-06-23 20:14:49 +08:00
Gabriel Majeri b048bfa75f Update the changelog 2021-06-23 15:03:03 +03:00
David Hewitt f916867375 pyclass: refactor initialization, call native type dealloc 2021-06-23 07:45:51 +01:00
David Hewitt a290971759
Merge pull request #1650 from davidhewitt/pymodule-name
pymodule: accept `#[pyo3(name = "...")]` option
2021-06-06 11:11:10 +01:00
Georg Brandl 98461a2ef6 PyList tests: simplify construction 2021-06-06 10:28:15 +02:00
David Hewitt 18e0aa17e0 pymodule: accept `#[pyo3(name = "...")]` option 2021-06-06 08:41:20 +01:00
Georg Brandl 3bebc19e2d PyList: remove get_parked_item, use macros for speed on !abi3 2021-06-06 07:54:38 +02:00
Georg Brandl 60862c308b Update changelog entry. 2021-06-06 07:08:23 +02:00
David Hewitt cec4c2d2e9 text_signature: move to `#[pyo3(text_signature = "...")]` 2021-06-05 16:33:03 +01:00
David Hewitt a5810eaffa
Merge pull request #1619 from birkenfeld/fastcall
Implement METH_FASTCALL for pyfunctions.
2021-06-05 12:32:16 +01:00
Georg Brandl 3e8d003faf Implement METH_FASTCALL for pyfunctions and pymethods. 2021-06-05 12:57:22 +02:00
David Hewitt 97d6f15b32
Merge pull request #1626 from alonblade/cross-sysconfig
build.rs: if found more than one candidate, filter on arch
2021-06-05 09:29:00 +01:00
messense bd1045e289 Add support for extracting PathBuf from pathlib.Path 2021-06-05 14:59:26 +08:00
Alon Levy e5542f2214 pyo3-build-config: if found more than one candidate, filter on arch
If we got more then one file, only take those that contain the arch name.
For ubuntu 20.04 with host architecture x86_64 and a foreign architecture of armhf
this reduces the number of candidates to 1:

  $ find /usr/lib/python3.8/ -name '_sysconfigdata*.py' -not -lname '*'
  /usr/lib/python3.8/_sysconfigdata__x86_64-linux-gnu.py
  /usr/lib/python3.8/_sysconfigdata__arm-linux-gnueabihf.py

CHANGELOG.md: add entry for cross-sysconfigdata filter on arch

commit changelog:
1. initial
2. if filtered list is empty, use pre filtered.
3. clippy is_empty and cloned
2021-05-30 10:07:03 +03:00
Erik Johnston a56f23d7f2 Add changelog entry 2021-05-26 12:23:47 +01:00
David Hewitt 3e87ea3593 pymodule: don't call PyEval_InitThreads 2021-05-25 11:02:16 +01:00
David Hewitt 355bd0c336 pymodule: tidy up module init 2021-05-25 10:54:16 +01:00
David Hewitt f4dfafa07b changelog: fix missing bits 2021-05-25 07:32:47 +01:00
David Hewitt a109640850 pyfn: deprecate name argument 2021-05-20 08:54:29 +01:00
Tim Robinson 50352f9137 Apply review suggestions 2021-05-15 10:34:34 +01:00
Tim Robinson c803033f5e Add to CHANGELOG 2021-05-13 13:17:56 +01:00
David Hewitt 4d46abde73 macros: support `#[pyo3(name = "...")]` 2021-05-07 22:35:52 +01:00
David Hewitt 4613b3dd7e
Merge pull request #1596 from davidhewitt/remove-pytypeinfo-layout
type_object: remove layout and base type from PyTypeInfo
2021-05-07 22:32:24 +01:00
David Hewitt d81abe8344 pyclass: support extending Exception types 2021-05-04 22:00:22 +01:00
David Hewitt 7536554ceb type_object: remove layout and base type from PyTypeInfo 2021-05-04 21:39:42 +01:00
David Hewitt 3ee84a3c26
Merge pull request #1128 from c410-f3r/array
Add support for arbitrary arrays
2021-05-01 16:02:22 +01:00
David Hewitt c0ff97e525
Merge pull request #1573 from davidhewitt/utc
ffi: support PyDateTime_TimeZone_UTC
2021-04-29 22:55:35 +01:00
David Hewitt 7ead166d9d array: safer implementation of try_create_array 2021-04-26 08:22:14 +01:00
Caio 9bc5089e4b Add support for arbitrary arrays 2021-04-26 08:22:14 +01:00
David Hewitt e95e73b55e ffi: support PyDateTime_TimeZone_UTC 2021-04-22 22:42:57 +01:00
Gregory Szorc 754c27f17d ffi: Define missing import APIs
Co-authored-by: Nicholas Sim <nsim+github@posteo.net>
2021-04-21 21:01:26 +01:00
David Hewitt 48823e22d6 pyproto: deprecate py_methods 2021-04-20 00:21:19 +01:00
David Hewitt 2b9085abdb build: avoid rebuilds when using clippy in a virtualenv 2021-04-19 09:45:01 +01:00
David Hewitt eaf75023ed ffi: prevent segfault with datetime bindings 2021-04-17 11:01:52 +01:00
David Hewitt aa0b5d8488 buffer: tidy up exceptions 2021-04-12 01:21:48 +01:00
David Hewitt b7b9f55a93
Merge pull request #1538 from davidhewitt/pypy-3.7
pypy: support PyPy 3.7
2021-04-03 07:03:43 +01:00
David Hewitt 5bf0bb80f6
Merge pull request #1539 from davidhewitt/macos-link-args
macos: automatically provide required linker arguments
2021-04-03 07:02:33 +01:00
David Hewitt b213f06df4 macos: automatically provide required linker arguments 2021-04-02 14:18:28 +01:00