[issue20075] help(open) eats first line

2014-01-28 Thread Zachary Ware
Zachary Ware added the comment: With #20326 fixed, this is no longer an issue. Gennadiy, thank you for the patch, and I'm sorry it ended up being unused. -- resolution: -> out of date stage: commit review -> committed/rejected status: open -> closed ___

[issue20075] help(open) eats first line

2014-01-28 Thread Larry Hastings
Larry Hastings added the comment: Yup, sorry about that. We're moving pretty fast with the Derby right now, and sometimes we don't figure out something important until later, and sometimes that means wasted effort. Sorry! -- ___ Python tracker

[issue20075] help(open) eats first line

2014-01-25 Thread Nick Coghlan
Changes by Nick Coghlan : -- dependencies: +Argument Clinic should use a non-error-prone syntax to mark text signatures ___ Python tracker ___ __

[issue20075] help(open) eats first line

2014-01-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue20075] help(open) eats first line

2014-01-21 Thread Stefan Krah
Stefan Krah added the comment: See also #20326. -- nosy: +skrah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20075] help(open) eats first line

2014-01-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> zach.ware ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue20075] help(open) eats first line

2014-01-20 Thread Zachary Ware
Zachary Ware added the comment: Gennadiy, sorry this stalled out like it did. The patched function will be moving as part of issue20189. Larry, if you want to incorporate this patch into that patch, please do so; otherwise I'll get this one updated and committed as soon after you commit that

[issue20075] help(open) eats first line

2014-01-01 Thread Gennadiy Zlobin
Gennadiy Zlobin added the comment: Zachary, thank you for review. Here's the updated patch. -- Added file: http://bugs.python.org/file33292/20075-3.patch ___ Python tracker ___ _

[issue20075] help(open) eats first line

2013-12-27 Thread Gennadiy Zlobin
Gennadiy Zlobin added the comment: I'm sorry, I'm not sure I caught the idea. So, I need to create an issue with description "propagate the annotation from the __text_signature__ into inspect.Signature if we get a valid one." ? -- ___ Python tracke

[issue20075] help(open) eats first line

2013-12-27 Thread Larry Hastings
Larry Hastings added the comment: One of the relevant PEPs (PEP 8? PEP 7? the annotations PEP?) states that the Python standard library is not permitted to use annotations. And considering that Argument Clinic is an internal-only tool, we could probably justify the decision to not allow ann

[issue20075] help(open) eats first line

2013-12-27 Thread Gennadiy Zlobin
Gennadiy Zlobin added the comment: So, looks like it works for me and all tests pass. Here's a new patch. Feel free to revert Lib/inspect.py:2004-2009 if this is incorrect behavior. -- Added file: http://bugs.python.org/file33280/20075-2.patch ___ Pyt

[issue20075] help(open) eats first line

2013-12-27 Thread Gennadiy Zlobin
Gennadiy Zlobin added the comment: Thank you for the comments! I'll update the patch. BTW is it safe to update Lib/inspect.py:2004 ? - return cls(parameters, return_annotation=cls.empty) + return cls(parameters, return_annotation=f.returns.s or cls.empty) Looks like the return value is not sh

[issue20075] help(open) eats first line

2013-12-27 Thread Zachary Ware
Zachary Ware added the comment: The patch looks good to me (aside from extra whitespace on the blank lines in methodobject.c, and I agree with Serhiy about s/brackets/parens/). Also, I like the suggestion of using __text_signature__ instead of '(...)'. However, just to avoid any possible iss

[issue20075] help(open) eats first line

2013-12-27 Thread Gennadiy Zlobin
Gennadiy Zlobin added the comment: Yes, so basically signature line in help(open) is not shown because ast.parse fails to parse the return value -> file object According to grammar, it should be -> file or -> 'file object' or something like this. as for sqlite, it fails to parse square br

[issue20075] help(open) eats first line

2013-12-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > The best fix would be to convert the docstrings to something inspect can > parse. Preferably by converting the functions to use Argument Clinic, > though you could manually mark up the docstring by hand if necessary. We can't check all docstrings in the std

[issue20075] help(open) eats first line

2013-12-27 Thread Larry Hastings
Larry Hastings added the comment: The best fix would be to convert the docstrings to something inspect can parse. Preferably by converting the functions to use Argument Clinic, though you could manually mark up the docstring by hand if necessary. -- __

[issue20075] help(open) eats first line

2013-12-27 Thread Vajrasky Kok
Vajrasky Kok added the comment: The patch does not fix it. It becomes like this: open(...) Open file and return a stream. Raise IOError upon failure. It's not just help(open) has problem, help(sqlite3.connect) got it as well: connect(...) check_same_thread, factory, cached_statements,

[issue20075] help(open) eats first line

2013-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- stage: -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue20075] help(open) eats first line

2013-12-26 Thread Gennadiy Zlobin
Gennadiy Zlobin added the comment: Hi guys, probably this patch can fix it? -- keywords: +patch nosy: +gennad Added file: http://bugs.python.org/file33276/20075.patch ___ Python tracker ___

[issue20075] help(open) eats first line

2013-12-26 Thread Meador Inge
Meador Inge added the comment: Looks like the changes from 78ec18f5cb45 attempt to skip the signature, but can't handle multi-line signatures. -- nosy: +meador.inge ___ Python tracker __

[issue20075] help(open) eats first line

2013-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Indeed. However in Modules/_io/_iomodule.c: PyDoc_STRVAR(open_doc, "open(file, mode='r', buffering=-1, encoding=None,\n" " errors=None, newline=None, closefd=True, opener=None) -> file object\n" "\n" "Open file and return a stream. Raise IOError upon fail

[issue20075] help(open) eats first line

2013-12-26 Thread Zachary Ware
Zachary Ware added the comment: Interestingly, it doesn't look like pydoc's fault: P:\ath\to\cpython\>PCbuild\python_d.exe -ISc "import sys;print(sys.version);print(open.__doc__[:75]);print('pydoc' in sys.modules)" 3.4.0b1 (default:94a04b8b3a12, Dec 26 2013, 09:27:14) [MSC v.1600 32 bit (Intel

[issue20075] help(open) eats first line

2013-12-26 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The output of help(open) (and `pydoc open`) in 3.4 is: Help on built-in function open in module io: open(...) errors=None, newline=None, closefd=True, opener=None) -> file object Open file and return a stream. Raise IOError upon failure. ...