Opened 2 years ago

Closed 2 years ago

#30280 closed defect (fixed)

Immutability of Affine Connections

Reported by: Michael Jung Owned by:
Priority: major Milestone: sage-9.2
Component: manifolds Keywords:
Cc: Merged in:
Authors: Michael Jung Reviewers: Matthias Koeppe
Report Upstream: N/A Work issues:
Branch: 28431c0 (Commits, GitHub, GitLab) Commit: 28431c0ca5b094e7e269125286ffba7338d43306
Dependencies: #30285 Stopgaps:

Status badges

Description (last modified by Michael Jung)

See #30261.

In this ticket, we introduce immutability to affine connections. Also, we fix the buggy hash function.

Change History (25)

comment:1 Changed 2 years ago by Michael Jung

Component: PLEASE CHANGEmanifolds
Dependencies: #30281
Description: modified (diff)
Type: PLEASE CHANGEdefect

comment:2 Changed 2 years ago by Michael Jung

Branch: u/gh-mjungmath/immutability_of_affine_connections

comment:3 Changed 2 years ago by Michael Jung

Commit: c11d29ca935d3a4b3f60d0a250fc98236118f5f6

Two things are strange here. First, the test suite starts a pickling test, that didn't happen before. Secondly, for some reason is_immutable() does not invoke properly. The doctests fail.

I have uploaded my code. Can someone please take a short look?


New commits:

f0230f0Trac #30281: __reduce__ method removed
c11d29cTrac #30280: immutability for affine connections

comment:4 Changed 2 years ago by git

Commit: c11d29ca935d3a4b3f60d0a250fc98236118f5f65156c5e1a28f7c3c78e3c638567fdcbd32a3f78c

Branch pushed to git repo; I updated commit sha1. New commits:

5156c5eTrac #30280: Mutability inheritance removed + hash function improved

comment:5 Changed 2 years ago by Michael Jung

I have no idea what the problem was. Until this is resolved, I propose to remove the inheritance and implement the immutability manually, see last commit.

comment:6 Changed 2 years ago by Michael Jung

Authors: Michael Jung

comment:7 Changed 2 years ago by Michael Jung

Dependencies: #30281
Status: newneeds_review

comment:8 Changed 2 years ago by git

Commit: 5156c5e1a28f7c3c78e3c638567fdcbd32a3f78c20d31b32c281968092d81ac945de48d677285027

Branch pushed to git repo; I updated commit sha1. New commits:

20d31b3Trac #30280: removing __reduce__from mutability revert

comment:9 Changed 2 years ago by git

Commit: 20d31b32c281968092d81ac945de48d677285027b885ec8fe8a8eac2cb913addfc38e2be262d9860

Branch pushed to git repo; I updated commit sha1. New commits:

b885ec8Trac #30280: doctests fixed

comment:10 Changed 2 years ago by Michael Jung

Dependencies: #30285

comment:11 Changed 2 years ago by git

Commit: b885ec8fe8a8eac2cb913addfc38e2be262d98609d347f5456707c9a8538781fa1e7da6b37e04f24

Branch pushed to git repo; I updated commit sha1. New commits:

3b1ef17Trac #30285: copy method added
9d347f5Trac #30280: copy method merged + documentation improved

comment:12 Changed 2 years ago by Matthias Köppe

I think it would be better to rebase it, removing the reverted commit and the reverting commit.

comment:13 Changed 2 years ago by git

Commit: 9d347f5456707c9a8538781fa1e7da6b37e04f24920bb12550d79dce214d2b83aa1ce9bc34f2dbee

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

6dfa1d0Trac #30280: immutability for affine connections
fc07910Trac #30280: Mutability inheritance removed + hash function improved
75b02c4Trac #30280: doctests fixed
920bb12Trac #30285: copy method added

comment:14 in reply to:  12 Changed 2 years ago by Michael Jung

Replying to mkoeppe:

I think it would be better to rebase it, removing the reverted commit and the reverting commit.

Like this? I hope everything worked out during the rebase.

comment:15 Changed 2 years ago by Michael Jung

No, apparently not...I hate rebasing...

Last edited 2 years ago by Michael Jung (previous) (diff)

comment:16 Changed 2 years ago by git

Commit: 920bb12550d79dce214d2b83aa1ce9bc34f2dbee8e28ebca601c3ea3017b3af80bc022bbf860e0c1

Branch pushed to git repo; I updated commit sha1. New commits:

f0230f0Trac #30281: __reduce__ method removed
c11d29cTrac #30280: immutability for affine connections
5156c5eTrac #30280: Mutability inheritance removed + hash function improved
20d31b3Trac #30280: removing __reduce__from mutability revert
b885ec8Trac #30280: doctests fixed
3b1ef17Trac #30285: copy method added
9d347f5Trac #30280: copy method merged + documentation improved
8e28ebcMerge commit '9d347f5456707' into t/30280/immutability_of_affine_connections

comment:17 Changed 2 years ago by Michael Jung

Damn it...

comment:18 Changed 2 years ago by Michael Jung

Can you fix this? Please? :-/

I don't even know what went wrong during the rebase. The last commit is somehow missing, but it shouldn't.

Then I messed it up by merging that last commit again. That was stupid.

Last edited 2 years ago by Michael Jung (previous) (diff)

comment:19 Changed 2 years ago by Matthias Köppe

Sure, let me take a look

comment:20 Changed 2 years ago by Michael Jung

Thank you! :)

comment:21 Changed 2 years ago by Matthias Köppe

Branch: u/gh-mjungmath/immutability_of_affine_connectionsu/mkoeppe/immutability_of_affine_connections

comment:22 Changed 2 years ago by Matthias Köppe

Commit: 8e28ebca601c3ea3017b3af80bc022bbf860e0c128431c0ca5b094e7e269125286ffba7338d43306
Reviewers: Matthias Koeppe
Status: needs_reviewpositive_review

New commits:

28431c0Trac #30280: immutability for affine connections

comment:23 Changed 2 years ago by Michael Jung

Thanks! May I ask how you did it?

comment:24 Changed 2 years ago by Matthias Köppe

I got really weird merge conflicts when trying to do git rebase -i, so I just squashed everything on top of #30285 by doing git trac fetch 30285 && git reset FETCH_HEAD && git commit -a.

comment:25 Changed 2 years ago by Volker Braun

Branch: u/mkoeppe/immutability_of_affine_connections28431c0ca5b094e7e269125286ffba7338d43306
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.