Skip to content

gh-111696: type(str) returns the fully qualified name#112129

Closed
vstinner wants to merge 2 commits intopython:mainfrom
vstinner:type_str
Closed

gh-111696: type(str) returns the fully qualified name#112129
vstinner wants to merge 2 commits intopython:mainfrom
vstinner:type_str

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Nov 15, 2023

  • Update modules:

    • enum
    • functools
    • optparse
    • pdb
    • xmlrcp.server
  • Update tests:

    • test_dataclasses
    • test_descrtut
    • test_cmd_line_script

📚 Documentation preview 📚: https://cpython-previews--112129.org.readthedocs.build/

* Update modules:

  * enum
  * functools
  * optparse
  * pdb
  * xmlrcp.server

* Update tests:

  * test_dataclasses
  * test_descrtut
  * test_cmd_line_script
@vstinner
Copy link
Member Author

I failed to fix test_basics() of test_enum which fails. But well, I don't think that this backward incompatible change is a good idea, so I don't plan to decidate too much time to it :-)

@vstinner
Copy link
Member Author

I created this PR to show that changing str(type) is a bad idea: it breaks the backward compatibility and it requires to change too much code which currently works fine. I close this PR.

@vstinner vstinner closed this Nov 16, 2023
@vstinner vstinner deleted the type_str branch November 28, 2023 15:04
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.

1 participant