Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add weakref Python types #3835

Merged
merged 48 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
cb75d28
Add vscode folder to gitignore
SuperJappie08 Feb 8, 2024
da6fa21
Initial work on PyWeakRef (weakref.ReferenceType)
SuperJappie08 Feb 8, 2024
f84d6d2
Add documentation for PyWeakRef::upgrade
SuperJappie08 Feb 8, 2024
b696f33
Add missing docs for PyWeakRef
SuperJappie08 Feb 9, 2024
880fab7
Add PyWeakProxy
SuperJappie08 Feb 9, 2024
62616a0
Add PyWeakCallableProxy
SuperJappie08 Feb 9, 2024
123077b
Merge branch 'PyO3:main' into weakref
SuperJappie08 Feb 9, 2024
0d5667b
Add PyWeakRefMethods::upgrade_exact and prevent unnecessary panicing
SuperJappie08 Feb 9, 2024
5508d3a
Change PyWeakRefMethods to exclude infeasible errors.
SuperJappie08 Feb 9, 2024
f18ba78
Add towncrier changes
SuperJappie08 Feb 14, 2024
b5fb139
Merge branch 'PyO3:main' into weakref
SuperJappie08 Feb 14, 2024
ee95efb
Update weakref type doctests to use `py.run_bound`
SuperJappie08 Feb 14, 2024
d28da4e
Fix to adhere to MSRV
SuperJappie08 Feb 15, 2024
dff0914
Make weakref tests independent from macros feature
SuperJappie08 Feb 15, 2024
e06e383
Change Weakref tests
SuperJappie08 Feb 15, 2024
f140841
Remove forgotten Debug marcos
SuperJappie08 Feb 22, 2024
cd056af
Processed .gitignore and PyResultExt feedback
SuperJappie08 Mar 8, 2024
130c800
Change new methods of weakref types to remove dangling pointers
SuperJappie08 Mar 8, 2024
0b097fc
Merge branch 'main' into weakref
SuperJappie08 Mar 8, 2024
dd3ad8e
Change to reflect deprecation of PyErr::value for PyErr::value_bound
SuperJappie08 Mar 8, 2024
efdd0ff
Change Tests so different class name in older python versions is acco…
SuperJappie08 Mar 8, 2024
972c168
Change formatting
SuperJappie08 Mar 8, 2024
30c4742
Make tests ABI3 compatible
SuperJappie08 Mar 8, 2024
3cc55c9
Prevent the use of PyClass in test for weakref under abi3 Python 3.7 …
SuperJappie08 Mar 11, 2024
a570f00
Disable weakref types when targeting PyPy
SuperJappie08 Mar 12, 2024
dc40185
Remove needless borrow from CallableProxy test
SuperJappie08 Mar 12, 2024
513ab14
Add Borrowed variants of upgrade and upgrade exact to trait
SuperJappie08 Mar 12, 2024
1ad66e8
Added tests for weakref borrow_upgrade methods
SuperJappie08 Mar 12, 2024
ede188a
Change PyWeakRefMethods method names to be more consistent
SuperJappie08 Mar 12, 2024
4a0a0a9
Change weakref constructors to take PyAny for main target
SuperJappie08 Mar 12, 2024
f2404e0
Add track_caller to all panicing weakref methods
SuperJappie08 Mar 15, 2024
3778161
Add PyWeakRefMethods::upgrade*_as_unchecked
SuperJappie08 Mar 25, 2024
b4007bd
Fix PyWeakProxy and PyWeakCallableProxy Documentation
SuperJappie08 Mar 25, 2024
6f2aaf1
Replace deprecated wrap_pyfunction with bound equivalent
SuperJappie08 Mar 25, 2024
142ab29
Merge branch 'PyO3:main' into weakref
SuperJappie08 Mar 28, 2024
a45c043
Add (Generic) PyWeakref Type
SuperJappie08 Apr 5, 2024
da776ed
Reworked Proxy types into one (PyWeakrefProxy)
SuperJappie08 Apr 5, 2024
d1bf16c
Rename PyWeakRef to PyWeakrefReference
SuperJappie08 Apr 5, 2024
97d73e9
Merge branch 'PyO3:main' into weakref
SuperJappie08 Apr 18, 2024
c7ab375
Change PyWeakrefReference to only use type pointer when it exists
SuperJappie08 Apr 18, 2024
618a714
Remove `#[track_caller]` annotations for now
davidhewitt May 26, 2024
3cebed4
Make the gil-refs function feature dependent
SuperJappie08 May 26, 2024
b9511e1
Remove unused AsPyPointer import
SuperJappie08 May 26, 2024
4f9bfb0
Change docs links to PyNone to not include private module
SuperJappie08 May 26, 2024
cd10fd1
Merge branch 'PyO3:main' into weakref
SuperJappie08 May 26, 2024
dc99918
Fix string based examples
SuperJappie08 May 26, 2024
ada2c3a
Change tests to work for Python 3.13
SuperJappie08 May 26, 2024
7e9aad8
Fix cargo clippy for Python 3.13
SuperJappie08 May 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions newsfragments/3835.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add `PyWeakref`, `PyWeakrefReference` and `PyWeakrefProxy`.
1 change: 1 addition & 0 deletions src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ pub use crate::types::string::PyStringMethods;
pub use crate::types::traceback::PyTracebackMethods;
pub use crate::types::tuple::PyTupleMethods;
pub use crate::types::typeobject::PyTypeMethods;
pub use crate::types::weakref::PyWeakrefMethods;
2 changes: 2 additions & 0 deletions src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ pub use self::string::{PyString, PyString as PyUnicode, PyStringMethods};
pub use self::traceback::{PyTraceback, PyTracebackMethods};
pub use self::tuple::{PyTuple, PyTupleMethods};
pub use self::typeobject::{PyType, PyTypeMethods};
pub use self::weakref::{PyWeakref, PyWeakrefMethods, PyWeakrefProxy, PyWeakrefReference};

/// Iteration over Python collections.
///
Expand Down Expand Up @@ -365,3 +366,4 @@ pub(crate) mod string;
pub(crate) mod traceback;
pub(crate) mod tuple;
pub(crate) mod typeobject;
pub(crate) mod weakref;
Loading
Loading