Commit graph

5773 commits

Author SHA1 Message Date
messense 2dc1e9a2b7
Fix memory leak in PyTypeBuilder::build 2023-08-18 21:13:13 +08:00
David Hewitt f7503afbc8 remove all #py quoting 2023-08-18 14:04:38 +01: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
David Hewitt 96de13e28e
Merge pull request #3397 from Tpt/io-err-from
Pick a relevant ErrorKind when building an io::Error from a OSError subclass
2023-08-18 08:24:57 +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
Iliya Malecki 438d0a2b37 add benchmark for BigInt interaction 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
David Hewitt 0375d57989
Merge pull request #3391 from alex/drop-trait
Remove usage of `AsPyPointer` in traits for convergint to PyObject
2023-08-16 16:39:46 +00:00
David Hewitt 75da8911d7
Merge pull request #3392 from davidhewitt/license-fixups
tidy up some file locations after dual licensing
2023-08-16 16:39:13 +00:00
DataTriny 6c70db1e0b Test renaming rules 2023-08-16 18:24:19 +02:00
Alex Gaynor c259e77ca2
Remove usage of AsPyPointer in traits for convergint to PyObject
Refs #3358
2023-08-16 07:03:57 -04:00
David Hewitt eba2c59778 tidy up some file locations after dual licensing 2023-08-16 08:22:51 +01:00
David Hewitt 82b1e55e2b
Merge pull request #3389 from alex/less-as-py-pointer
Migrate `PyIterator::from_object` and `PyByteArray::from` from `AsPyPointer` to `&PyAny`
2023-08-15 23:12:28 +00:00
David Hewitt ff823ac3df
Merge pull request #3390 from puradox/fix/ffi-license
Replace pyo3-ffi LICENSE with ACKNOWLEDGEMENTS
2023-08-15 23:07:55 +00:00
David Hewitt e6626de9fa
Merge pull request #3108 from DataTriny/dual_license
Dual-license PyO3 under Apache 2.0 or MIT
2023-08-15 23:06:06 +00:00
Sam Balana 0607905771
Replace pyo3-ffi LICENSE with ACKNOWLEDGEMENTS
Replace the Python license from pyo3-ffi/LICENSE with an
ACKNOWLEDGEMENTS file. Relicense under the parent Apache 2.0 license.

pyo3-ffi contains a Rust reproduction of the CPython header files, only
copying what is absolutely necessary for binary compatibility. As such,
it is unnecessary to include the Python license.

Fixes #3124
2023-08-15 15:29:53 -07:00
Alex Gaynor 1a904a7429
Migrate PyIterator::from_object and PyByteArray::from from AsPyPointer to &PyAny 2023-08-15 18:03:56 -04:00
DataTriny 5782aca636 Update the pull request template 2023-08-15 23:56:07 +02:00
DataTriny b222dbbbcc Add a release note entry 2023-08-15 23:39:45 +02:00
DataTriny 0ef626177c Add copyright holders to the MIT license file 2023-08-15 23:39:45 +02:00
DataTriny 3c3e9401a3 Dual-license 2023-08-15 23:39:45 +02:00
David Hewitt 1a64eb01d7
Merge pull request #3387 from davidhewitt/remove-non-mit-contributions
Remove non-MIT contributions
2023-08-15 20:23:18 +00:00
DataTriny 1a73ce6e60 Address review comments 2023-08-15 20:56:13 +02:00
DataTriny f02fe9478d
Make rename_all accept a renaming rule, allow applying it to classes as well 2023-08-15 10:15:48 +02:00
David Hewitt 988590ee92 Revert "Change type of kwargs in the example to Option<PyDict>"
This reverts commit 80502bd307.
2023-08-15 08:57:31 +01:00
David Hewitt 5ad55d2dc7 Revert "Fix typos and other minor touchups to guide"
This reverts commit 24eee46128.
2023-08-15 08:55:41 +01:00
David Hewitt 70bbd00d57 Revert "Fix minor typos in example code"
This reverts commit 11e2163bb4.
2023-08-15 08:45:19 +01:00
David Hewitt 0ca6a32b23 Revert "Add (probably) forgotten type parameters to the pyobject_native_type_convert macro."
This reverts commit cbe668a0f4.
2023-08-15 08:44:02 +01:00
David Hewitt 43b37109de Revert "Fix the pydebug with trace refs and count_allocs for python > 3.7"
This reverts commit c780aa931d.
2023-08-15 08:41:22 +01:00
David Hewitt 1a33f8792f
Merge pull request #3385 from alex/remove-into-py-pointer
Remove IntoPyPointer
2023-08-14 21:22:39 +00:00
Alex Gaynor 5061b501a9
Remove IntoPyPointer
it wasn't used in any public APIs following #3359
2023-08-14 16:28:20 -04:00
DataTriny 57505cb1a1
Fix tests 2023-08-13 18:54:55 +02:00
DataTriny a9e9ec628d
Add attribute to 2023-08-13 18:25:07 +02:00
David Hewitt a541925f00
Merge pull request #3359 from davidhewitt/py-pointer-methods
add as_ptr and into_ptr inherent methods
2023-08-11 19:50:22 +00:00
David Hewitt 8031794f2a
Merge pull request #3378 from GoldsteinE/implicit-builtins
add `__builtins__` to globals in `py.run()` if they're missing
2023-08-11 14:11:31 +00:00
Goldstein 0be94a5442
add __builtins__ to globals in py.run() if they're missing
Python code doesn't like to run without `__builtins__`, so adding them
if missing seems to be a good idea. Also that's what CPython >3.10 does.

See https://github.com/python/cpython/pull/24564
Resolves #3370
2023-08-11 15:48:05 +03:00
David Hewitt ba72f58502
Merge pull request #3336 from davidhewitt/3.12-ffi
Update some FFI definitions for Python 3.12
2023-08-11 12:47:57 +00:00
David Hewitt b0f5901ce3 update structmember.rs for Python 3.12 2023-08-11 11:54:16 +01:00
David Hewitt acb1bf7c0a update fileobject.rs for Python 3.12 2023-08-11 11:54:16 +01:00
David Hewitt 5d7dfe2e95 update pydebug.rs for Python 3.12 2023-08-11 11:54:16 +01:00
David Hewitt 64adab1a76 add as_ptr and into_ptr inherent methods 2023-08-11 10:49:42 +01:00
Adam Reichold 1df7270e15
Merge pull request #3374 from Tpt/pathlike
Makes PathBuf FromPyObject implementation work on all os.PathLike
2023-08-09 14:50:28 +00:00
Tpt dd04d2c4cc Fixes linking of PyOS_FSPath on PyPy. 2023-08-09 16:19:17 +02:00
David Hewitt bab7ff06c3
Merge pull request #3372 from alex/alex-patch-1
Update constants for py3.12, which fixes struct sizes
2023-08-09 06:13:03 +00:00
Tpt 1e5a49557d Makes PathBuf FromPyObject implementation work on all os.PathLike
PyOS_FSPath is in abi3-py36
2023-08-08 22:15:56 +02:00
Alex Gaynor 51fdf3afef
Update constants for py3.12, which fixes struct sizes
See 766d2518ae8384c6bd7f82727defeb86847ccf64
2023-08-08 15:07:59 -04:00