Skip to content

Conversation

rhshadrach
Copy link
Member

@rhshadrach rhshadrach commented Oct 18, 2025

This PR addresses all __module__ attributes of public objects that I can find with the exception of functions. It's not clear to me if we want to also be modifying the __module__ attribute of e.g. pandas.factorize and even if we do, I'd like to keep that separate as this PR is already becoming sizable.

Remaining documentation that contains .core.:

API docs

# Ignore redirects
grep -nre "\.core\." doc/build/html/reference/ | grep -v "has been moved" | grep -v "http-equiv=\"refresh\""
doc/build/html/reference/api/pandas.IndexSlice.html:762:<span class="sig-prename descclassname"><span class="pre">pandas.</span></span><span class="sig-name descname"><span class="pre">IndexSlice</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">&lt;pandas.core.indexing._IndexSlice</span> <span class="pre">object&gt;</span></em><a class="headerlink" href="#pandas.IndexSlice" title="Link to this definition">#</a></dt>
doc/build/html/reference/api/pandas.DataFrame.query.html:843:in combination with the source code in <code class="xref py py-mod docutils literal notranslate"><span class="pre">pandas.core.computation.parsing</span></code>.</p>

User Guide

grep -nre "\.core\." doc/build/html/user_guide/
doc/build/html/user_guide/io.html:3895:<span class="go">&lt;IPython.core.display.HTML object&gt;</span>
doc/build/html/user_guide/io.html:3922:<span class="go">&lt;IPython.core.display.HTML object&gt;</span>
doc/build/html/user_guide/io.html:3953:<span class="go">&lt;IPython.core.display.HTML object&gt;</span>
doc/build/html/user_guide/io.html:3984:<span class="go">&lt;IPython.core.display.HTML object&gt;</span>
doc/build/html/user_guide/io.html:4050:<span class="go">&lt;IPython.core.display.HTML object&gt;</span>
doc/build/html/user_guide/io.html:4091:<span class="go">&lt;IPython.core.display.HTML object&gt;</span>
doc/build/html/user_guide/io.html:4126:<span class="go">&lt;IPython.core.display.HTML object&gt;</span>

Getting Started

grep -nre "\.core\." doc/build/html/getting_started/

no output.

@rhshadrach rhshadrach requested a review from Dr-Irv as a code owner October 18, 2025 00:08
@rhshadrach rhshadrach marked this pull request as draft October 18, 2025 00:09
@rhshadrach rhshadrach changed the title DOC: Set remaining __module__ attributes DOC: Set remaining __module__ attributes and remove core from documentation Oct 18, 2025
@rhshadrach rhshadrach changed the title DOC: Set remaining __module__ attributes and remove core from documentation DOC: Set __module__ attributes and remove core from documentation Oct 18, 2025
@rhshadrach rhshadrach marked this pull request as ready for review October 18, 2025 20:40
@rhshadrach rhshadrach requested a review from mroeschke as a code owner October 18, 2025 20:41
Copy link
Member

@jbrockmendel jbrockmendel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jbrockmendel jbrockmendel merged commit e11bf72 into pandas-dev:main Oct 19, 2025
42 of 43 checks passed
@jbrockmendel
Copy link
Member

thanks @rhshadrach

@jorisvandenbossche
Copy link
Member

It's not clear to me if we want to also be modifying the __module__ attribute of e.g. pandas.factorize and even if we do, I'd like to keep that separate as this PR is already becoming sizable.

We already did it for the majority of functions in the top-level namespace in practice, so opened #62758 to finish that (at least for the top-level namespace)

@jorisvandenbossche
Copy link
Member

And @rhshadrach thanks a lot for this PR!!

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.

ENH: set __module__ on top-level public objects

4 participants