[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
Alexandre Vassalotti alexan...@peadrop.com added the comment: Now, that 2.7 is out we won't able to commit this anymore. It is sad to abandon a good patch like this. -- resolution: - wont fix stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1745 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
George Sakkis george.sak...@gmail.com added the comment: Is there any update on this for 2.7 ? -- nosy: +gsakkis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1745 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
George Sakkis george.sak...@gmail.com added the comment: FWIW I updated the patch to r79264; it applies cleanly and passes the tests but other than that I can't tell if it's ready. It would be nice to have it in 2.7 though. -- Added file: http://bugs.python.org/file16618/backport-keyword-only-arguments-full-3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1745 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
Alexandre Vassalotti alexan...@peadrop.com added the comment: Mark Dickinson added the comment: (1) should the 'signed' parameter remain keyword-only in 2.7? We should keep it as a keyword-only argument. Also, issue #1745 might bring keyword-only arguments to 2.7. (2) When specifying the byteorder, is there a need to allow u'big' and u'little' as well as 'big' and 'little'? Allow both. Since, 'big' == u'big' is True, it would be weird to treat them differently in this case. Plus, it will make life easier for people who uses: from __future__ import unicode_literals in their code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1745 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
Changes by Alexandre Vassalotti alexan...@peadrop.com: -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1745 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
Changes by Alexandre Vassalotti alexan...@peadrop.com: -- nosy: +alexandre.vassalotti stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1745 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
Michael Foord mich...@voidspace.org.uk added the comment: Running out of time for 2.7 as well... -- nosy: +michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1745 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
Benjamin Peterson benja...@python.org added the comment: 2009/4/3 Michael Foord rep...@bugs.python.org: Michael Foord mich...@voidspace.org.uk added the comment: Running out of time for 2.7 as well... How so? The first 2.7 alpha probably won't be until the end of summer. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1745 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
Changes by Benjamin Peterson [EMAIL PROTECTED]: -- versions: +Python 2.7 -Python 2.6 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1745 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
Guido van Rossum [EMAIL PROTECTED] added the comment: This will definitely not be in 2.6. -- keywords: -26backport ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1745 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
Benjamin Peterson [EMAIL PROTECTED] added the comment: On Mon, Aug 4, 2008 at 1:35 AM, tav [EMAIL PROTECTED] wrote: tav [EMAIL PROTECTED] added the comment: What's holding back the backport to 2.6? The fact that we are working towards the 3rd and final beta. -- nosy: +tav ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1745 ___ -- Cheers, Benjamin Peterson There's no place like 127.0.0.1. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1745 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
tav [EMAIL PROTECTED] added the comment: What's holding back the backport to 2.6? -- nosy: +tav ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1745 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
Benjamin Peterson [EMAIL PROTECTED] added the comment: This will probably have to be deferred to 2.7. -- nosy: +benjamin.peterson ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1745 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
Eric Smith [EMAIL PROTECTED] added the comment: The patch doesn't apply cleanly for me. I can fix the non-clean patch, but another error is that obj2ast_arguments doesn't call arguments() with the correct parameters. If I pass in NULL's for the new params, all tests pass, but that just tells me it's not being tested thoroughly. I'll spend some time looking at it, but if anyone else wants to look at it, go ahead. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1745 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
Georg Brandl [EMAIL PROTECTED] added the comment: Bumping priority. -- keywords: +26backport priority: normal - critical __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1745 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
Robin Stocker [EMAIL PROTECTED] added the comment: I've updated the patch to apply cleanly again. Added file: http://bugs.python.org/file9828/backport-keyword-only-arguments-full-2.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1745 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
Changes by Eric Smith [EMAIL PROTECTED]: -- nosy: +eric.smith __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1745 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
Robin Stocker added the comment: Guido: The check was only done for call nodes, not for function definitions. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1745 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
Robin Stocker added the comment: Ok, I checked all the logs and updated the patch. test_collections uses n = 254 now and all tests pass. I left revision 54043 out on purpose, because it fixes Lib/inspect.py and Lib/pydoc.py for both PEP 3102 and 3107, so it should be included in the patch for PEP 3107. Added file: http://bugs.python.org/file9108/backport-keyword-only-arguments-full.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1745 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
Georg Brandl added the comment: Keyword-only-args are not yet documented. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1745 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
Robin Stocker added the comment: Thanks for the feedback! It's on line 111 in test_collections.py:: n = 1 import string, random names = [''.join([random.choice(string.letters) for j in range(10)]) for i in range(n)] Big = namedtuple('Big', names) b = Big(*range(n)) I think the condition is triggered because Big's __new__ (which seems to be dynamically generated by namedtuple using exec) has an argument list with 1 arguments. Ok, I'm now looking through SVN logs and have already added some more changes to my patchset. Thanks, I had changed MAGIC but didn't know that marshal.c uses it. So I won't handle documentation in this issue then. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1745 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
Christian Heimes added the comment: I vaguely remember that I had to modify the tests to use 254 args in Python 3.0. -- nosy: +tiran priority: - normal __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1745 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
Guido van Rossum added the comment: There's something I misunderstand then. I thought 2.x also didn't accept 255 args, but that test would seem to prove I'm wrong. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1745 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
New submission from Robin Stocker: The attached patch ports the implementation of keyword-only arguments from revision 52491 back to trunk. This is the first time I've worked on the C internals, so here are some notes: - test_collections is the only test which fails, because it tries to call a function with more than 255 arguments, which results in a SyntaxError because of the following added code in Python/ast.c. What should be done about it? if (nposargs + nkwonlyargs 255) { ast_error(n, more than 255 arguments); return NULL; } - The patch only adds what's in revision 52491. There is at least one more change involving keyword-only arguments, for example issue1573. Are there others? Should they be included in this patch or in a separate one? - There are some changes which were generated, like Python/Python-ast.c (which needs to be checked in separately). - Is there documentation which needs to be updated? -- components: Interpreter Core files: backport-keyword-only-arguments.patch messages: 59391 nosy: robin.stocker severity: normal status: open title: Backport of PEP 3102 keyword-only arguments to 2.6 type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file9078/backport-keyword-only-arguments.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1745 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
Robin Stocker added the comment: Another note: Because the marshalling of code objects is changed, is there a version number of the format which has to be incremented? __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1745 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
Guido van Rossum added the comment: Thanks for tackling this! What line in test_collections.py is calling a function with 255 args? I'm a bit surprised since this has always been disallowed AFAICT. I'd like to see everything related to keyword-only args included in one patch. Hopefully the unittests and/or svn history will give you an idea of what to do. There should be docs in the reference manual. Maybe Georg knows where. Don't worry about the generated Python-ast.c patch. The version number you're looking for is MAGIC in Python/import.c. -- nosy: +georg.brandl, gvanrossum __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1745 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1745] Backport of PEP 3102 keyword-only arguments to 2.6
Changes by Guido van Rossum: -- keywords: +patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1745 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com