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

BUG: Module pandas._libs.json has incorrect __name__ attribute #52898

Closed
2 of 3 tasks
shwina opened this issue Apr 24, 2023 · 1 comment · Fixed by #52903
Closed
2 of 3 tasks

BUG: Module pandas._libs.json has incorrect __name__ attribute #52898

shwina opened this issue Apr 24, 2023 · 1 comment · Fixed by #52903
Labels
Bug IO JSON read_json, to_json, json_normalize

Comments

@shwina
Copy link
Contributor

shwina commented Apr 24, 2023

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

>>> import pandas as pd
pd>>> pd.__version__
'2.0.0'
>>> pd._libs.json.__name__
'_libjson'
>>> pd._libs.missing.__name__
'pandas._libs.missing'

Issue Description

The __name__ attribute for the pandas._libs.json is set to _libjson here.

The Python docs say that __name__ should be set to the fully qualified name of the module, which I would expect to be 'pandas._libs.json'.

In the code example above, you can see that other Pandas C-extensions like pd._libs.missing have the correct __name__ attribute set.

Expected Behavior

__name__ should be set to the fully qualified name of the module, which I would expect to be 'pandas._libs.json'.

Installed Versions

2

@shwina shwina added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Apr 24, 2023
@lithomas1 lithomas1 added IO JSON read_json, to_json, json_normalize and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Apr 24, 2023
@MarcoGorelli
Copy link
Member

thanks for the report - +1 for changing, but just out of interest, how did you come across this, why do you need it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug IO JSON read_json, to_json, json_normalize
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants