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

Support generic for Basic #25557

Merged
merged 2 commits into from
Aug 21, 2023
Merged

Support generic for Basic #25557

merged 2 commits into from
Aug 21, 2023

Conversation

sylee957
Copy link
Member

@sylee957 sylee957 commented Aug 20, 2023

References to other Issues or PRs

Fixes #25399

Brief description of what is fixed or changed

Other comments

It may also not be obvious whether super().__init_subclass__ should be put at the before or after,
so I'm picking to put before the _prepare_class_assumptions(cls) line

Release Notes

  • core
    • Fixed issue of Basic not subclassable with Generic by multiple inheritance.

@sylee957 sylee957 added the core label Aug 20, 2023
@sympy-bot
Copy link

sympy-bot commented Aug 20, 2023

Hi, I am the SymPy bot. I'm here to help you write a release notes entry. Please read the guide on how to write release notes.

Your release notes are in good order.

Here is what the release notes will look like:

  • core
    • Fixed issue of Basic not subclassable with Generic by multiple inheritance. (#25557 by @sylee957)

This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.13.

Click here to see the pull request description that was parsed.
<!-- Your title above should be a short description of what
was changed. Do not include the issue number in the title. -->

#### References to other Issues or PRs
<!-- If this pull request fixes an issue, write "Fixes #NNNN" in that exact
format, e.g. "Fixes #1234" (see
https://tinyurl.com/auto-closing for more information). Also, please
write a comment on that issue linking back to this pull request once it is
open. -->
Fixes #25399

#### Brief description of what is fixed or changed



#### Other comments

It may also not be obvious whether `super().__init_subclass__` should be put at the before or after,
so I'm picking to put before the `_prepare_class_assumptions(cls)` line

#### Release Notes

<!-- BEGIN RELEASE NOTES -->
- core
  - Fixed issue of `Basic` not subclassable with `Generic` by multiple inheritance.
<!-- END RELEASE NOTES -->

Update

The release notes on the wiki have been updated.

@asmeurer
Copy link
Member

Calling super on overridden methods is always a good idea, so I'm +1 to this. I also have no idea if it matters if it's called at the top or bottom of the method.

@asmeurer asmeurer merged commit 4cd5479 into sympy:master Aug 21, 2023
56 of 57 checks passed
@sylee957 sylee957 deleted the generic branch August 21, 2023 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot use typing.Generic[T] with Symbol
3 participants