Skip to content

Conversation

@mjp41
Copy link
Owner

@mjp41 mjp41 commented Jan 19, 2025

This is a draft PR for checking the Phase 3 work.


📚 Documentation preview 📚: https://cpython-previews--40.org.readthedocs.build/

mjp41 and others added 30 commits November 21, 2024 13:51
A first attempt at an invariant
Co-authored-by: Tobias Wrigstad <tobias.wrigstad@it.uu.se>
Co-authored-by: Tobias Wrigstad <tobias.wrigstad@it.uu.se>
Co-authored-by: Tobias Wrigstad <tobias.wrigstad@it.uu.se>
Co-authored-by: Tobias Wrigstad <tobias.wrigstad@it.uu.se>
Co-authored-by: Tobias Wrigstad <tobias.wrigstad@it.uu.se>
Co-authored-by: Tobias Wrigstad <tobias.wrigstad@it.uu.se>
* Add a minimal CI

* Apply static to internal functions.

* Regened files and added a missing entry.

* Change error to fix tests.

* Manually allowing exception.
TobiasWrigstad and others added 30 commits January 15, 2025 09:09
Add a flag for region awareness of a type.
Fix crash bug when invalid values are used to initiate a cown
This implements the addreference and remove reference logic for the dictionary.

Adds a Py_CLEAR_OBJECT_FIELD  to remove the reference in the correct point.
This makes the region invariant off by default, and requires configure to be passed:
  --with-region-invariant

This then enables the invariant to run on every byte code instruction.
* Permitting key parts of Cowns to run without GIL

* Cleaned up last check in test

self.fail() is performed outside of the acquired cown
Adds a check to thread constructors ensuring that only
cowns, immutables, and externally unique regions can
be passed in as thread arguments.
Co-authored-by: Matthew Parkinson <mjp41@users.noreply.github.com>
Update: actions/upload-artifact@v3 -> v4 (Phase 3)
* Cown release

A cown will now be released:
- When it is in pending-release state and its containing region closes
- When a closed region, other cown or immutable object it stored in it
- At the end of a @using if the cown's contained region can be closed

* TODO => TODO Pyrona:

Co-authored-by: Fridtjof Stoldt <xFrednet@gmail.com>

* Remove GIL operations in release (since this operation cannot be contended)

---------

Co-authored-by: Fridtjof Stoldt <xFrednet@gmail.com>
As far as I can see in the source code, tuples are always created
in the local region (effectively), and get their arguments before
they are assigned anywhere. So the only check added to set_item
should always succeed. Leaving optimising this case for future work.
Pyrona: Add and remove reference fixes in `PyObjectDict`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants