Re: [Python-Dev] CFFI released

2012-06-19 Thread Stefan Behnel
Armin Rigo, 18.06.2012 23:29: On Mon, Jun 18, 2012 at 9:10 PM, Maciej Fijalkowski wrote: Make cffi less buggy (check the tracker for new test cases ;-), faster (closer to swig type wrappers), and easier to use than ctypes, and I am sure there will be interest. I would say it's already

Re: [Python-Dev] PEP 397 - Last Comments

2012-06-19 Thread Martin v. Löwis
Agreed, I would expect the same. I would think taking out the word only and then flipping newer and older in the sentence would correct it. Will change. On 64bit Windows with both 32bit and 64bit implementations of the same (major.minor) Python version installed, the 64bit version will

Re: [Python-Dev] CFFI released

2012-06-19 Thread Greg Ewing
Is there any provision for keeping the compiled C code and distributing it along with an application? Requiring a C compiler to be present at all times could be a difficulty for Windows. -- Greg ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] CFFI released

2012-06-19 Thread Armin Rigo
Hi Greg, On Tue, Jun 19, 2012 at 8:30 AM, Greg Ewing greg.ew...@canterbury.ac.nz wrote: Is there any provision for keeping the compiled C code and distributing it along with an application? Requiring a C compiler to be present at all times could be a difficulty for Windows. We are aware of

Re: [Python-Dev] CFFI released

2012-06-19 Thread Armin Rigo
Hi Stefan, On Tue, Jun 19, 2012 at 8:28 AM, Stefan Behnel stefan...@behnel.de wrote: Any reason you didn't write the C parts in Cython? '''As a general rule, when there is a design issue to resolve, we pick the solution that is the “most C-like”.''' (from the documentation). But you are welcome

Re: [Python-Dev] PEP 362: 4th edition

2012-06-19 Thread Larry Hastings
On 06/18/2012 07:35 PM, Yury Selivanov wrote: BTW, http://bugs.python.org/issue15008 has the latest implementation attached (if anybody wants to play with it) I've also posted the latest minor tweaks to the PEP, on behalf of Yury. The new version is already live:

Re: [Python-Dev] cpython: Fix #14772: Return the destination from some shutil functions.

2012-06-19 Thread Antoine Pitrou
On Tue, 19 Jun 2012 01:41:44 +0200 brian.curtin python-check...@python.org wrote: http://hg.python.org/cpython/rev/8281233ec648 changeset: 77514:8281233ec648 user:Brian Curtin br...@python.org date:Mon Jun 18 18:41:07 2012 -0500 summary: Fix #14772: Return the

[Python-Dev] Help to fix this bug http://bugs.python.org/issue15068

2012-06-19 Thread gmspro
Hi, I'm working on this bug to fix it. http://bugs.python.org/issue15068 from sys import stdin str=stdin.read() hello hello world CTRL+D CTRL+D Can anyone tell me where is stdin.read() function defined? Or where is sys.stdin defined? Or which function is called for str=stdin.read() ? Thanks

Re: [Python-Dev] Help to fix this bug http://bugs.python.org/issue15068

2012-06-19 Thread Eli Bendersky
It depends on the Python version. In 3.3, for example, look into Modules/_io/fileio.c Eli On Tue, Jun 19, 2012 at 2:39 PM, gmspro gms...@yahoo.com wrote: Hi, I'm working on this bug to fix it. http://bugs.python.org/issue15068 from sys import stdin str=stdin.read() hello hello world

Re: [Python-Dev] Help to fix this bug http://bugs.python.org/issue15068

2012-06-19 Thread Antoine Pitrou
Hi, On Tue, 19 Jun 2012 04:39:30 -0700 (PDT) gmspro gms...@yahoo.com wrote: Hi, I'm working on this bug to fix it. http://bugs.python.org/issue15068 I'm not sure why you think this is fixable, given the comments on the tracker. What is your plan? from sys import stdin str=stdin.read()

Re: [Python-Dev] Help to fix this bug http://bugs.python.org/issue15068

2012-06-19 Thread Serhiy Storchaka
On 19.06.12 15:13, Antoine Pitrou wrote: sys.stdin _io.TextIOWrapper name='stdin' mode='r' encoding='UTF-8' So it's a TextIOWrapper from the _io module (which is really the implementation of the io module). You'll find its source in Modules/_io. TextIOWrapper objects are defined in

Re: [Python-Dev] PEP 397 - Last Comments

2012-06-19 Thread Brian Curtin
On Tue, Jun 19, 2012 at 1:30 AM, Martin v. Löwis mar...@v.loewis.de wrote: Agreed, I would expect the same. I would think taking out the word only and then flipping newer and older in the sentence would correct it. Will change. On 64bit Windows with both 32bit and 64bit implementations of

[Python-Dev] pep 362 - 5th edition

2012-06-19 Thread Yury Selivanov
Hello, The new revision of PEP 362 has been posted: http://www.python.org/dev/peps/pep-0362/ Summary: 1. What was 'Signature.__deepcopy__' is now 'Signature.__copy__'. __copy__ creates a shallow copy of Signature, shallow copying its Parameters as well. 2. 'Signature.format()' was removed. I

[Python-Dev] PEP 362 minor nits

2012-06-19 Thread Jim Jewett
I've limited this to minor issues, but kept python-dev in the loop because some are questions, rather than merely editorial. Based on: http://hg.python.org/peps/file/tip/pep-0362.txt view pep-0362.txt @ 4466:659639095ace Committing the latest changes to PEP 362 on behalf of Yury Selivanov.

Re: [Python-Dev] PEP 362 minor nits

2012-06-19 Thread Ethan Furman
Jim Jewett wrote: 48 * parameters : OrderedDict 49 An ordered mapping of parameters' names to the corresponding 50 Parameter objects (keyword-only arguments are in the same order 51 as listed in ``code.co_varnames``). Are you really sure you want to promise the

Re: [Python-Dev] PEP 362 minor nits

2012-06-19 Thread Yury Selivanov
Jim, On 2012-06-19, at 11:33 AM, Jim Jewett wrote: I've limited this to minor issues, but kept python-dev in the loop because some are questions, rather than merely editorial. Based on: http://hg.python.org/peps/file/tip/pep-0362.txt view pep-0362.txt @ 4466:659639095ace

Re: [Python-Dev] PEP 362 minor nits

2012-06-19 Thread Jim Jewett
On Tue, Jun 19, 2012 at 11:53 AM, Yury Selivanov yselivanov...@gmail.com wrote: Based on:  http://hg.python.org/peps/file/tip/pep-0362.txt view pep-0362.txt @ 4466:659639095ace ==   142 * args : tuple   143     Tuple of positional arguments values.  Dynamically computed from

Re: [Python-Dev] pep 362 - 5th edition

2012-06-19 Thread Ethan Furman
Yury Selivanov wrote: Hello, The new revision of PEP 362 has been posted: http://www.python.org/dev/peps/pep-0362/ Summary: 1. What was 'Signature.__deepcopy__' is now 'Signature.__copy__'. __copy__ creates a shallow copy of Signature, shallow copying its Parameters as well. 2.

Re: [Python-Dev] pep 362 - 5th edition

2012-06-19 Thread Yury Selivanov
On 2012-06-19, at 11:55 AM, Ethan Furman wrote: Yury Selivanov wrote: Hello, The new revision of PEP 362 has been posted: http://www.python.org/dev/peps/pep-0362/ Summary: 1. What was 'Signature.__deepcopy__' is now 'Signature.__copy__'. __copy__ creates a shallow copy of Signature,

Re: [Python-Dev] pep 362 - 5th edition

2012-06-19 Thread Ethan Furman
Yury Selivanov wrote: On 2012-06-19, at 11:55 AM, Ethan Furman wrote: Yury Selivanov wrote: Hello, The new revision of PEP 362 has been posted: http://www.python.org/dev/peps/pep-0362/ Summary: 1. What was 'Signature.__deepcopy__' is now 'Signature.__copy__'. __copy__ creates a shallow copy

Re: [Python-Dev] pep 362 - 5th edition

2012-06-19 Thread Yury Selivanov
On 2012-06-19, at 1:03 PM, Ethan Furman wrote: Yury Selivanov wrote: On 2012-06-19, at 11:55 AM, Ethan Furman wrote: Yury Selivanov wrote: Hello, The new revision of PEP 362 has been posted: http://www.python.org/dev/peps/pep-0362/ Summary: 1. What was 'Signature.__deepcopy__' is now

Re: [Python-Dev] PEP 362 minor nits

2012-06-19 Thread Yury Selivanov
On 2012-06-19, at 12:33 PM, Jim Jewett wrote: On Tue, Jun 19, 2012 at 11:53 AM, Yury Selivanov yselivanov...@gmail.com wrote: Based on: http://hg.python.org/peps/file/tip/pep-0362.txt view pep-0362.txt @ 4466:659639095ace == 142 * args : tuple 143 Tuple of

Re: [Python-Dev] PEP 362 minor nits

2012-06-19 Thread Jim Jewett
On Tue, Jun 19, 2012 at 2:10 PM, Yury Selivanov yselivanov...@gmail.com wrote: On 2012-06-19, at 12:33 PM, Jim Jewett wrote: On Tue, Jun 19, 2012 at 11:53 AM, Yury Selivanov yselivanov...@gmail.com wrote: Based on:  http://hg.python.org/peps/file/tip/pep-0362.txt view pep-0362.txt @

[Python-Dev] Status of packaging in 3.3

2012-06-19 Thread Éric Araujo
Hi all, We need to make a decision about the packaging module in Python 3.3. Please read this message and breathe deeply before replying :) [Sorry this ends up being so long; Tarek, Georg, Guido, I hope you have the time to read it.] Let me first summarize the history of packaging

Re: [Python-Dev] Status of packaging in 3.3

2012-06-19 Thread Nick Coghlan
Reverting and writing a full packaging PEP for 3.4 sounds like a wise course of action to me. Regards, Nick. -- Sent from my phone, thus the relative brevity :) ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Status of packaging in 3.3

2012-06-19 Thread Ethan Furman
Éric Araujo wrote: This leaves (d), after long reflection, as my preferred choice, even though I disliked the idea at first (and I fully expect Tarek to feel the same way). Thanks for reading; please express your opinion (especially Tarek as d2 project lead, Georg as RM and Guido as BDFL).

Re: [Python-Dev] Status of packaging in 3.3

2012-06-19 Thread Paul Moore
On 19 June 2012 22:46, Éric Araujo mer...@netwok.org wrote: [...]  This leaves (d), after long reflection, as my preferred choice, even though I disliked the idea at first (and I fully expect Tarek to feel the same way). I agree with Nick. It's regrettable, but this is probably the wisest

Re: [Python-Dev] Status of packaging in 3.3

2012-06-19 Thread Chris McDonough
On 06/19/2012 05:46 PM, Éric Araujo wrote: Hi all, We need to make a decision about the packaging module in Python 3.3. Please read this message and breathe deeply before replying :) ... With beta coming, a way to deal with that unfortunate situation needs to be found. We could (a) grant an

Re: [Python-Dev] PEP 362 minor nits

2012-06-19 Thread Yury Selivanov
On 2012-06-19, at 4:17 PM, Jim Jewett wrote: I can tweak the PEP to make it more clear for those who don't know that staticmethods are not exactly methods, but do we really need that? I would prefer it, if only because it surprised me. When do distinguish between methods, staticmethod isn't

Re: [Python-Dev] pep 362 - 5th edition

2012-06-19 Thread Nick Coghlan
On Wed, Jun 20, 2012 at 3:53 AM, Yury Selivanov yselivanov...@gmail.com wrote: On 2012-06-19, at 1:03 PM, Ethan Furman wrote: At some point it was suggested that Signature be put in provisionally so we could modify the API if needed -- are we doing that? Well, it doesn't have much of an API

Re: [Python-Dev] pep 362 - 5th edition

2012-06-19 Thread Yury Selivanov
On 2012-06-19, at 8:39 PM, Nick Coghlan wrote: On Wed, Jun 20, 2012 at 3:53 AM, Yury Selivanov yselivanov...@gmail.com wrote: On 2012-06-19, at 1:03 PM, Ethan Furman wrote: At some point it was suggested that Signature be put in provisionally so we could modify the API if needed -- are we

Re: [Python-Dev] Status of packaging in 3.3

2012-06-19 Thread Antoine Pitrou
On Tue, 19 Jun 2012 17:46:30 -0400 Éric Araujo mer...@netwok.org wrote: I don’t think (a) would give us enough time; we really want a few months (and releases) to hash out the API (most notably with the pip and buildout developers) and clean the bdist situation. Likewise (c) would

Re: [Python-Dev] pep 362 - 5th edition

2012-06-19 Thread Yury Selivanov
On 2012-06-19, at 9:22 PM, Yury Selivanov wrote: On 2012-06-19, at 8:39 PM, Nick Coghlan wrote: 2. The constructor for Parameter objects should require that names for positional-only parameters start with and end with to ensure they can always be distinguished from standard parameters in

Re: [Python-Dev] pep 362 - 5th edition

2012-06-19 Thread Nick Coghlan
On Wed, Jun 20, 2012 at 11:29 AM, Yury Selivanov yseliva...@gmail.com wrote: On 2012-06-19, at 9:22 PM, Yury Selivanov wrote: On 2012-06-19, at 8:39 PM, Nick Coghlan wrote: 2. The constructor for Parameter objects should require that names for positional-only parameters start with and end

Re: [Python-Dev] pep 362 - 5th edition

2012-06-19 Thread Yury Selivanov
On 2012-06-19, at 10:06 PM, Nick Coghlan wrote: On Wed, Jun 20, 2012 at 11:29 AM, Yury Selivanov yseliva...@gmail.com wrote: On 2012-06-19, at 9:22 PM, Yury Selivanov wrote: On 2012-06-19, at 8:39 PM, Nick Coghlan wrote: 2. The constructor for Parameter objects should require that names

Re: [Python-Dev] pep 362 - 5th edition

2012-06-19 Thread Nick Coghlan
On Wed, Jun 20, 2012 at 11:22 AM, Yury Selivanov yselivanov...@gmail.com wrote: On 2012-06-19, at 8:39 PM, Nick Coghlan wrote: 6. I think return_annotation can safely be abbreviated to just annotation. The fact it is on the Signature object rather than an individual parameter is enough to

Re: [Python-Dev] pep 362 - 5th edition

2012-06-19 Thread Nick Coghlan
On Wed, Jun 20, 2012 at 12:15 PM, Yury Selivanov yseliva...@gmail.com wrote: On 2012-06-19, at 10:06 PM, Nick Coghlan wrote: True, the check for name clashes in Signature (and the implied numeric names) will cover the BoundArguments.parameters case Nick, I also would like to keep

Re: [Python-Dev] pep 362 - 5th edition

2012-06-19 Thread Yury Selivanov
On 2012-06-19, at 9:22 PM, Yury Selivanov wrote: On 2012-06-19, at 8:39 PM, Nick Coghlan wrote: 7. The idea of immutable Signature objects does highlight an annoyance with the attribute may be missing style APIs. To actually duplicate a signature correctly, including its return annotation (and

Re: [Python-Dev] pep 362 - 5th edition

2012-06-19 Thread Yury Selivanov
On 2012-06-19, at 10:16 PM, Nick Coghlan wrote: On Wed, Jun 20, 2012 at 11:22 AM, Yury Selivanov yselivanov...@gmail.com wrote: 10. Similar to the discussion of convenience properties on Signature objects themselves, I now think we should drop the args and kwargs Big -1 on this one. Look

Re: [Python-Dev] pep 362 - 5th edition

2012-06-19 Thread Yury Selivanov
Nick, I started a new branch to experiment with immutable Signatures. So far, almost everything works (except a couple unit-tests, that are modifying now immutable Parameters Signatures) https://bitbucket.org/1st1/cpython/changesets/tip/branch(%22pep362-2%22) I hope tomorrow we get some

Re: [Python-Dev] pep 362 - 5th edition

2012-06-19 Thread Nick Coghlan
On Wed, Jun 20, 2012 at 12:36 PM, Yury Selivanov yselivanov...@gmail.com wrote: On 2012-06-19, at 9:22 PM, Yury Selivanov wrote: On 2012-06-19, at 8:39 PM, Nick Coghlan wrote: 7. The idea of immutable Signature objects does highlight an annoyance with the attribute may be missing style APIs.

Re: [Python-Dev] pep 362 - 5th edition

2012-06-19 Thread Yury Selivanov
On 2012-06-19, at 10:16 PM, Nick Coghlan wrote: On Wed, Jun 20, 2012 at 11:22 AM, Yury Selivanov yselivanov...@gmail.com wrote: On 2012-06-19, at 8:39 PM, Nick Coghlan wrote: If we even keep that at all for the initial version of the API, the direct default and annotation attributes would

Re: [Python-Dev] PEP 397 - Last Comments

2012-06-19 Thread Mark Hammond
Sorry, but I missed the announcement of an updated PEP. It looks good to me! Also, I see no reason not to always use a 32bit version of the launcher other than (a) the 64bit code already exists and works and (b) it might mean it is no longer possible to do a complete build of a 64bit Python

Re: [Python-Dev] Status of packaging in 3.3

2012-06-19 Thread Guido van Rossum
Nick nailed it (again). On Tue, Jun 19, 2012 at 3:14 PM, Nick Coghlan ncogh...@gmail.com wrote: Reverting and writing a full packaging PEP for 3.4 sounds like a wise course of action to me. Regards, Nick. -- Sent from my phone, thus the relative brevity :)

Re: [Python-Dev] pep 362 - 5th edition

2012-06-19 Thread Nick Coghlan
On Wed, Jun 20, 2012 at 1:28 PM, Yury Selivanov yselivanov...@gmail.com wrote: On 2012-06-19, at 11:24 PM, Nick Coghlan wrote: The constructor accepts an iterable of Parameter objects rather than a mapping. That's the code I've ended up with:        sig = signature(obj.__func__)