[issue39145] Innocuous parent class changes multiple inheritance MRO

2020-01-21 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: -17493 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39145] Innocuous parent class changes multiple inheritance MRO

2020-01-21 Thread Dong-hee Na
Change by Dong-hee Na : -- pull_requests: +17493 pull_request: https://github.com/python/cpython/pull/18105 ___ Python tracker ___

[issue39145] Innocuous parent class changes multiple inheritance MRO

2019-12-29 Thread Mark Dickinson
Mark Dickinson added the comment: > You can close again if you feel this isn't a bug. Yep, it's still not a bug. As Steven said, Python is correctly (modulo undiscovered bugs) implementing the C3 algorithm, and the C3 algorithm does indeed fail in this case. -- nosy:

[issue39145] Innocuous parent class changes multiple inheritance MRO

2019-12-28 Thread Cyker Way
Cyker Way added the comment: Ahhh, 1 second, I haven't really quit from this. I could open another thread but it's highly related to this one. I just came up with something that looks like a bug not a feature in the original c3. #!/usr/bin/env python3 #A C #

[issue39145] Innocuous parent class changes multiple inheritance MRO

2019-12-28 Thread Cyker Way
Cyker Way added the comment: Thank you for the links. I doubt this c3 variant could break EPG consistency making it c2. May run some tests later and move on to discussion board. Guess I'm done here. -- ___ Python tracker

[issue39145] Innocuous parent class changes multiple inheritance MRO

2019-12-27 Thread Steven D'Aprano
Steven D'Aprano added the comment: Whether this proposed change is worth a PEP is a value judgement, but whether it will need a PEP is, I think, a fact. It is a backwards incompatible change (it will change the inheritance order of classes) potentially breaking people's code. Its not a

[issue39145] Innocuous parent class changes multiple inheritance MRO

2019-12-27 Thread Cyker Way
Cyker Way added the comment: a typo: ...at this time we know we can extract X in (f1') because X is NOT in any tail... Missed the "NOT" in the previous text. -- ___ Python tracker

[issue39145] Innocuous parent class changes multiple inheritance MRO

2019-12-27 Thread Cyker Way
Cyker Way added the comment: Thanks for reply. It's not about the Python's implementation of C3 but C3 itself being used as the MRO algorithm in Python. It bites when you remove an independent interface from your class definition and its method calls become something else. I think I can

[issue39145] Innocuous parent class changes multiple inheritance MRO

2019-12-27 Thread Steven D'Aprano
Steven D'Aprano added the comment: Have you read the description of how the MRO is calculated? It's a standard algorithm. So long as the result matches the C3 linearisation algorithm, then it's not a bug. https://en.wikipedia.org/wiki/C3_linearization

[issue39145] Innocuous parent class changes multiple inheritance MRO

2019-12-27 Thread Cyker Way
New submission from Cyker Way : With an inheritance graph like this: A C B D (X) A E Adding or removing class X in E's parents will change the order of A and C in E's MRO: EBDAC vs EBDCXA. I couldn't imagine what would be the "perfect"