Skip to content

3.13 copy.replace isn't in __all__ #121300

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

Closed
max-muoto opened this issue Jul 3, 2024 · 11 comments
Closed

3.13 copy.replace isn't in __all__ #121300

max-muoto opened this issue Jul 3, 2024 · 11 comments
Labels
3.13 bugs and security fixes 3.14 bugs and security fixes type-bug An unexpected behavior, bug, or error

Comments

@max-muoto
Copy link
Contributor

max-muoto commented Jul 3, 2024

Bug report

Bug description:

copy.replace isn't exported as a part of __all__ in the copy module. This seemed liked an oversight, as opposed to being intentional, but feel free to close this issue if not.

CPython versions tested on:

3.13

Operating systems tested on:

No response

Linked PRs

@max-muoto max-muoto added the type-bug An unexpected behavior, bug, or error label Jul 3, 2024
@max-muoto
Copy link
Contributor Author

CC: @serhiy-storchaka

@JelleZijlstra JelleZijlstra added 3.13 bugs and security fixes 3.14 bugs and security fixes labels Jul 3, 2024
@pygeek
Copy link
Contributor

pygeek commented Jul 3, 2024

Nice catch:

#108752

@Eclips4
Copy link
Member

Eclips4 commented Jul 3, 2024

Hello!
Nice catch. This definitely should be in __all__ since this is part of the public API.
Would you like to send a PR with fix?

@max-muoto
Copy link
Contributor Author

max-muoto commented Jul 3, 2024

Hello!

Nice catch. This definitely should be in __all__ since this is part of the public API.

Would you like to send a PR with fix?

Will do! Thanks for catching @JelleZijlstra!

@max-muoto
Copy link
Contributor Author

@Eclips4 #121302

@serhiy-storchaka
Copy link
Member

Sure, this is an oversight. pydoc copy should show replace.

@max-muoto
Copy link
Contributor Author

max-muoto commented Jul 3, 2024

Sure, this is an oversight. pydoc copy should show replace.

Do you want a separate PR here (adding it to the module docstring)? Or can add it into the existing one I have.

@pygeek
Copy link
Contributor

pygeek commented Jul 3, 2024

@Eclips4 #121302

I know this is a trivial change, but we should probably add a regression test for __all__. See support.test__all__ helper method in the test directory.

@serhiy-storchaka
Copy link
Member

Adding it to the module docstring is also a good idea. You can include this in your PR or create a separate PR if you wish.

@max-muoto
Copy link
Contributor Author

Adding it to the module docstring is also a good idea. You can include this in your PR or create a separate PR if you wish.

Let me just do that in the current PR, I'm also going to add a test case.

miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jul 3, 2024
(cherry picked from commit 7c66906)

Co-authored-by: Max Muoto <[email protected]>
JelleZijlstra pushed a commit that referenced this issue Jul 3, 2024
(cherry picked from commit 7c66906)

Co-authored-by: Max Muoto <[email protected]>
@Eclips4
Copy link
Member

Eclips4 commented Jul 4, 2024

Thanks!

@Eclips4 Eclips4 closed this as completed Jul 4, 2024
noahbkim pushed a commit to hudson-trading/cpython that referenced this issue Jul 11, 2024
estyxx pushed a commit to estyxx/cpython that referenced this issue Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 bugs and security fixes 3.14 bugs and security fixes type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

5 participants