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

Added ability to show subclasses when using pinfo and other utilities #11486

Merged
merged 2 commits into from
Nov 8, 2018

Conversation

cmentzel
Copy link
Contributor

@cmentzel cmentzel commented Nov 8, 2018

addresses issue #11432 with thanks to @Carreau for basically doing everything

@Carreau
Copy link
Member

Carreau commented Nov 8, 2018

The error is unrelated to what you did, we just added a subclasses field and other part of IPython is not handling that correctly. I've added one commit that hopefully should fix that.

Many thanks and awesome work ! Let's wait for the test to pass (just to make sure I did not forget anything), and then we can merge what you did into master.

@lumberbot-app
Copy link
Contributor

lumberbot-app bot commented Nov 8, 2018

congrats cmentzel !

@lumberbot-app
Copy link
Contributor

lumberbot-app bot commented Nov 8, 2018

party parrotparty parrotparty parrotparty parrotparty parrotparty parrotparty parrotparty parrotparty parrotparty parrot

@Carreau
Copy link
Member

Carreau commented Nov 8, 2018

All is green ! congrats !

@Carreau Carreau merged commit 27d0242 into ipython:master Nov 8, 2018
@cmentzel
Copy link
Contributor Author

cmentzel commented Nov 8, 2018

Thanks!

@Carreau Carreau added this to the 7.2 milestone Nov 19, 2018
Carreau added a commit that referenced this pull request Feb 20, 2024
Fixes #14339

### Additions

Adds `InfoDict` type to improve the typing of `info()` result.

Adds missing `"subclasses"` to `info_fields` list (these were added to
the field list in #11486 but we
forgot to update `info_fields` variable at the time) - the newly added
`InfoDict` type will ensure that this won't happen again.

Adds `InspectorHookData` dataclass which is passed to the MIME hooks
which now should expect a single argument. Having a single dataclass
argument enables us to deprecate individual fields, or add new fields
without breaking the existing hooks. The old hooks will still work (if
any are out there since this mechanism got just added in the previous
point version).

### Deletions

A comment over `info_fields` gets deleted:
- Contrarily to the comment (which is getting deleted in this PR),
`info_fields` were not defining the order of display since at least 2015
(#7903 - I did not feel the need
to go further in the history to find when exactly it happened).
- Also contrarily to this comment, current Jupyter messaging spec does
not define the contents of `info_fields` (I guess this was lost during
IPython/Jupyter split), but the newly added `InfoDict` at least properly
annotates their type (if you know where I can find the old IPython
messaging spec with the descriptions I can add these as doc comments).

Unused `cast_unicode` import gets deleted. If someone imported it from
here... well they really should not have.

### Deprecations

- mime hooks taking two arguments (`obj, info`)
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.

2 participants