Navigation Menu

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

bpo-29940: Add follow_wrapped option to help() #12915

Closed
wants to merge 4,282 commits into from
Closed

Conversation

eamanu
Copy link
Contributor

@eamanu eamanu commented Apr 22, 2019

When print the docstring using help builtin for an wrapper function
it doesn't correspond to the function wrapped. For avoid this
this PR add the follow_wrapped option to help() function.

https://bugs.python.org/issue29940

@chrahunt
Copy link
Contributor

There are no tests. Can we find useful ones to add that will also demonstrate the reason for this change? e.g. showing correct help for functions wrapped with class-based decorators

I think that help may be better with follow_wrapped=True by default. It is meant to be used interactively as stated in the docs so the backwards-incompatibility may not be as big an issue.

Copy link
Contributor

@chrahunt chrahunt left a comment

Choose a reason for hiding this comment

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

Can we add some tests?

Lib/pydoc.py Outdated Show resolved Hide resolved
Lib/pydoc.py Outdated Show resolved Hide resolved
Lib/pydoc.py Outdated Show resolved Hide resolved
vstinner and others added 23 commits August 4, 2020 02:38
incr cannot be larger than INT_MAX: downcast to int explicitly.
On Windows, fix asyncio recv_into() return value when the socket/pipe
is closed (BrokenPipeError): return 0 rather than an empty byte
string (b'').
…han duplicating it in 'compile.c' (pythonGH-21714)

Generate information about jumps from 'opcode.py' rather than duplicate it in 'compile.c'
Explicitly cast PyHKEYObject* to PyObject* to call _PyObject_Init().
Split newsize calculation into new function. dictresize() now accepts exact newsize.
PyUnicodeEncodeError_Create has been deprecated with
`Py_DEPRECATED` macro. But it was not documented.
@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

Recognized GitHub username

We couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames:

@nosamproductions

This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

@eamanu
Copy link
Contributor Author

eamanu commented Sep 22, 2020

oops. sorry!!!!!

@eamanu eamanu closed this Sep 22, 2020
@eamanu eamanu deleted the bpo-29940 branch September 22, 2020 10:28
@eamanu
Copy link
Contributor Author

eamanu commented Sep 22, 2020

i am preparing a new pr for this... sorry for the nnoise.

@taleinat
Copy link
Contributor

taleinat commented Sep 22, 2020

@eamanu, no problem and no need to apologize, it happens all too often with git.

Just in case you haven't, I recommend reading the "Lifecycle of a Pull Requst" section on the devguide, which may be helpful. You're also welcome to ask anything on the Python IRC and Zulip chat channels and get immediate help.

@vsajip
Copy link
Member

vsajip commented Sep 22, 2020

I was under the impression that this happened only when rebasing/fast-forwarding with master - does it also happen when a merge is done?

@taleinat
Copy link
Contributor

taleinat commented Sep 22, 2020

I was under the impression that this happened only when rebasing/fast-forwarding with master - does it also happen when a merge is done?

In this case it appears the @eamanu accidentally merged in another branch, which may have been similary re-based or based on a different commit.

@eamanu
Copy link
Contributor Author

eamanu commented Sep 23, 2020

Hi I make this PR: #22390

I was under the impression that this happened only when rebasing/fast-forwarding with master - does it also happen when a merge is done?

I need practice my git skills. I don't like the rebase (or I don't understand yet) and I did an rebase from master, and then I did (and I think that was my error) git pull [bpo-29940](https://bugs.python.org/issue29940) and that merge my old github's branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet