Commit graph

252 commits

Author SHA1 Message Date
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
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
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
Alex Gaynor 1a904a7429
Migrate PyIterator::from_object and PyByteArray::from from AsPyPointer to &PyAny 2023-08-15 18:03:56 -04:00
DataTriny b222dbbbcc Add a release note entry 2023-08-15 23:39:45 +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 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
Alex Gaynor 5061b501a9
Remove IntoPyPointer
it wasn't used in any public APIs following #3359
2023-08-14 16:28:20 -04: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 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
Tpt dd04d2c4cc Fixes linking of PyOS_FSPath on PyPy. 2023-08-09 16:19:17 +02: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
Adam Reichold a371fbe4f8 Implement DoubleEndedIterator for PyListIterator by caching the length while still validating it before access. 2023-08-07 21:37:50 +02:00
Adam Reichold 4ce3e9649f Implement DoubleEndedIterator for PyTupleIterator 2023-08-07 21:37:50 +02:00
David Hewitt 284c42d840 release: 0.19.2 2023-08-01 07:29:04 +01:00
David Hewitt 4e957e8bd4 update object.h definitions for Python 3.12 2023-07-30 15:37:06 +01:00
Juniper Tyree ab783234c8 Added newsfragment 2023-07-29 07:43:17 +00:00
David Hewitt e2c88d5a4e optimize float -> f64 conversions on non-abi3 2023-07-28 20:45:37 +01:00
David Hewitt 34881fc952 add PyAny::downcast_exact 2023-07-28 15:11:56 +01:00
David Hewitt 7a2fc86186
Merge pull request #3342 from davidhewitt/3.12-ffi-check-fixes
fix ffi check failures for 3.12.0b4
2023-07-25 11:59:55 +00:00