Commit Graph

277 Commits

Author SHA1 Message Date
David Hewitt 901f54ba1f release: 0.20.3 2024-02-23 09:31:06 +00:00
David Hewitt 482883a78c fix `either` feature conditional compilation, again (#3834)
* fix `either` feature conditional compilation, again

* test feature powerset in CI

* install `rust-src` for feature powerset tests

* review: adamreichold feedback

* Fix one more case of redundant imports.

* just check feature powerset for now

---------

Co-authored-by: Adam Reichold <adam.reichold@t-online.de>
2024-02-22 09:02:19 +00:00
David Hewitt c375c8a186 add maximum Python version check (#3821)
* add maximum Python version check

* restore dependency of `pyo3-macros-backend` on `pyo3-build-config`

* fix clippy-all noxfile job
2024-02-22 09:01:00 +00:00
Adam Reichold 9d1b11f704 Use portable-atomic for targets which lack 64-bit atomics used to check interpreter ID.
I chose to make the dependency mandatory instead of optional as portable-atomic
itself just forwards to the native atomics when they are available so making
that choice part of our build system is not really necessary. Personally, I was
unable to perceive any noticeable compile-time hit from adding it.
2024-02-22 08:57:24 +00:00
David Hewitt c77deee18e release: 0.20.0 2023-10-11 14:39:19 +02:00
David Hewitt 76bf521ed0
Merge pull request #3505 from davidhewitt/deprecate_dunder_new
deprecate undocumented `#[__new__]` form of `#[new]`
2023-10-10 21:35:10 +00:00
David Hewitt 6c90325a1c deprecate undocumented `#[__new__]` form of `#[new]` 2023-10-10 08:47:03 +01:00
David Hewitt c0b5004cfa
Merge pull request #3455 from davidhewitt/normalized-exceptions
also use `PyErr::SetObject` on Python versions before 3.12
2023-10-10 07:44:39 +00:00
Erle Carrara 0e0e6623f3
fix _PyFrameEvalFunction. Since python 3.11 it receives a `_PyInterpreterFrame` 2023-10-09 23:36:01 -03:00
Bruno Kolenbrander 36b4a79930
Merge pull request #3502 from mejrs/interpreterapi
add PyInterpreterConfig api
2023-10-08 21:22:01 +00:00
mejrs 0cccb9f64b add PyInterpreterConfig api 2023-10-08 22:38:11 +02:00
David Hewitt 1158c08f42 error on passing arguments to `#[new]` and similar attributes 2023-10-08 21:31:59 +01:00
David Hewitt cbd7370b20
Merge pull request #3490 from davidhewitt/ffi-marshal-limited
disable `marshal.rs` on `Py_LIMITED_API`
2023-10-04 19:05:01 +00:00
David Hewitt a4b79dc1e5
Merge pull request #3494 from mejrs/slots
Update PyModuleDef_Slot types
2023-10-04 06:10:25 +00:00
mejrs aa011f4a9d Update PyModuleDef_Slot types 2023-10-03 23:25:45 +02:00
David Hewitt 90cc69ba73
Merge pull request #3488 from davidhewitt/python-3.12
support python 3.12
2023-10-03 19:53:20 +00:00
David Hewitt a1d333a563 emit compile errors on macros inside `#[pymethods]`
Co-authored-by: Bruno Kolenbrander <59372212+mejrs@users.noreply.github.com>
2023-10-02 22:15:29 +01:00
David Hewitt c80a61ee30 disable `marshal.rs` on `Py_LIMITED_API` 2023-10-02 21:36:17 +01:00
David Hewitt 86fc62c5e7 support python 3.12 2023-10-02 20:57:41 +01:00
David Hewitt 2daddb4734 unify 3.12 and pre-3.12 exception handling pathways 2023-09-30 23:27:27 +01:00
David Hewitt f335f42197
Merge pull request #3446 from davidhewitt/relax-import-check
relax multiple-import check to only prevent subinterpreters
2023-09-29 16:35:31 +00:00
David Hewitt 50cb41dd0b
Merge pull request #3458 from davidhewitt/truncate-leap-seconds
truncate leap seconds on `chrono` to `datetime` conversions
2023-09-29 11:47:27 +00:00
David Hewitt 0459532f69 truncate leap seconds on `chrono` to `datetime` conversions 2023-09-24 20:28:43 +01:00
David Hewitt 1e8833e15e always normalize exceptions before raising 2023-09-24 13:38:23 +01:00
David Hewitt f17e703167 return existing module on Python 3.9 and up 2023-09-23 11:13:39 +01:00
David Hewitt 1338020511 relax multiple-import check to only prevent subinterpreters 2023-09-23 11:13:39 +01:00
David Hewitt 5798caf1f8 better `Some`-wrapping for default arguments 2023-09-21 21:14:44 +01:00
David Hewitt bcb01049cc
Merge pull request #3404 from davidhewitt/fix-dealloc
call PyObject_GC_Untrack before deallocating
2023-09-11 05:18:34 +00:00
David Hewitt e28403e772 call PyObject_GC_Untrack before deallocating 2023-09-09 22:29:58 +01:00
David Hewitt 16728c4da2 move PyDict::get_item_with_error to PyDict::get_item 2023-09-09 12:23:06 +01:00
David Hewitt e67b283b25
Merge pull request #3358 from alex/ptr-unsafe-trait
fixes #3325 -- mark `AsPyPointer` as `unsafe trait`
2023-09-04 05:05:56 +00:00
David Hewitt 9e089a5538 fix chrono deprecation warnings 2023-09-02 20:55:53 +01:00
Ryan Lowe b3cf61cea6 add types for built-in singletons 2023-08-26 08:57:34 -04:00
Adam Reichold 12183ad3ed
Merge pull request #3379 from iliya-malecki/main
BigInt speedup
2023-08-19 12:09:28 +00:00
David Hewitt 9336e5b605
Merge pull request #3403 from davidhewitt/ffi-objimpl
update definitions for objimpl.h
2023-08-19 12:02:32 +00:00
Adam Reichold e6293a9608
Merge pull request #3405 from davidhewitt/debug-3.11
fix compile warning on pre-3.12 debug builds
2023-08-19 05:25:57 +00:00
David Hewitt 69475b0a83 update definitions for objimpl.h 2023-08-18 22:17:53 +01:00
David Hewitt 7fce07935c fix compile warning on pre-3.12 debug builds 2023-08-18 22:15:29 +01:00
Adam Reichold 94f15679ab
Merge pull request #3402 from Tpt/io-err-unwrap
Unwrap the underlying PyErr when converting an io::Error back to a PyErr
2023-08-18 16:56:53 +00:00
David Hewitt 15388fd53b
Merge pull request #3401 from messense/fix-issue-3400
Fix memory leak in `PyTypeBuilder::build`
2023-08-18 14:28:36 +00:00
Alex Gaynor df5aa77800
fixes #3325 -- mark `AsPyPointer` as `unsafe trait` 2023-08-18 10:16:34 -04:00
Tpt 6d8e8b302f Unwrap the underlying PyErr when converting an io::Error back to a PyErr
Exposes it directly instead of loosing all information outside the message
2023-08-18 15:56:25 +02:00
messense 2dc1e9a2b7
Fix memory leak in `PyTypeBuilder::build` 2023-08-18 21:13:13 +08:00
David Hewitt c03c787a91
Merge pull request #3393 from alex/drop-other-trait
Remove usage of `AsPyPointer` in `IntoPy<PyObject>` trait implementation
2023-08-18 12:58:07 +00:00
David Hewitt 7f32ed96db
Merge pull request #3396 from Tpt/IntoInnerError
Uses io::Error code when converting io::IntoInnerError to PyErr
2023-08-18 08:27:35 +00:00
Tpt 1062f244ea Pick a relevant ErrorKind when building an io::Error from a OSError subclass 2023-08-17 18:33:51 +02:00
Tpt 7c366cb930 Uses io::Error code when converting io::IntoInnerError to PyErr 2023-08-17 18:25:36 +02:00
Alex Gaynor 9f1b56b659
Remove usage of `AsPyPointer` in `IntoPy<PyObject>` trait implementation 2023-08-17 07:05:52 -04:00
Iliya Malecki d1f0561036 added speedy BigInt extraction 2023-08-17 08:15:50 +01:00
Adam Reichold 9363491d54
Merge pull request #3384 from DataTriny/pyclass_rename_variants
Add  `rename_all` attribute to `#[pyclass]`
2023-08-16 19:06:37 +00:00