David Hewitt
5798caf1f8
better Some
-wrapping for default arguments
2023-09-21 21:14:44 +01:00
David Hewitt
1ec3c5a4fd
ci: adjust tests to avoid chrono panics
2023-09-21 08:34:45 +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
932c5c7061
workaround BaseException issue on Python versions before 3.11
2023-09-10 22:16:17 +02:00
David Hewitt
e28403e772
call PyObject_GC_Untrack before deallocating
2023-09-09 22:29:58 +01:00
David Hewitt
8ddfef04bc
add detail to documentation for PyDict::get_item
2023-09-09 12:23:06 +01:00
David Hewitt
8a60540e25
amend code for PyDict::get_item
change
2023-09-09 12:23:06 +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
f0f15edc4e
remove some redundant explicit doc links
2023-09-08 15:36:24 +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
4c46d81afd
simplify thread checker implementation
2023-09-03 14:15:26 +01: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
David Hewitt
a5d0a16b21
ci: updates for Rust 1.72
2023-08-25 12:30:34 +01:00
Adam Reichold
12183ad3ed
Merge pull request #3379 from iliya-malecki/main
...
BigInt speedup
2023-08-19 12:09:28 +00:00
David Hewitt
9604957c72
further refactor num-bigint conversion
2023-08-18 22:27:47 +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
Alex Gaynor
c259e77ca2
Remove usage of AsPyPointer
in traits for convergint to PyObject
...
Refs #3358
2023-08-16 07:03:57 -04:00
Alex Gaynor
1a904a7429
Migrate PyIterator::from_object
and PyByteArray::from
from AsPyPointer
to &PyAny
2023-08-15 18:03:56 -04:00
Alex Gaynor
5061b501a9
Remove IntoPyPointer
...
it wasn't used in any public APIs following #3359
2023-08-14 16:28:20 -04: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
64adab1a76
add as_ptr and into_ptr inherent methods
2023-08-11 10:49:42 +01: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
ef43731993
update tests of refcounting to use a non-immortal object
2023-07-30 15:37:06 +01:00
David Hewitt
4e957e8bd4
update object.h definitions for Python 3.12
2023-07-30 15:37:06 +01:00
Juniper Tyree
16fe7a83a7
Add a PySlice::full() constructor for ::
2023-07-29 07:39:47 +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
a15614844d
add PyErr::display
2023-07-24 22:14:55 +01:00
David Hewitt
ab078258d1
fix exception handling on Python 3.12
2023-07-19 22:33:25 +01:00
Zak Stucke
f2b7e86e2e
Prevent traceback loss on conversion to and from PyErr
2023-07-19 12:07:41 +03:00
David Hewitt
2e2dde910a
Preserve panic message after exception is normalized
2023-07-18 22:20:41 +01:00
David Hewitt
421e13a89c
Merge pull request #3323 from davidhewitt/pyerr-simplification
...
merge PyErr internal states for simplicity
2023-07-17 21:46:39 +00:00
David Hewitt
2d1b8e02a8
merge PyErr internal states for simplicity
2023-07-17 22:21:28 +01:00
David Hewitt
e5a7400f24
Merge pull request #3319 from davidhewitt/used-underscore-binding
...
clippy: deny / fix used-underscope-binding lint
2023-07-16 20:53:56 +00:00
David Hewitt
45ff25cd2a
clippy: deny / fix used-underscope-binding lint
2023-07-16 20:49:45 +01:00