Re: [Python-Dev] Providing support files to assist 3.x extension authors

2010-01-03 Thread Stefan Behnel

Case Vanhorsen, 20.12.2009 01:38:

When I ported gmpy (Python to GMP multiple precision library) to
Python 3.x, I began to use PyLong_AsLongAndOverflow frequently. I
found the code to slightly faster and cleaner than using PyLong_AsLong
and checking for overflow.


You might want to look at the code Cython generates for integer type 
conversions. We use specialised coercion code that gets generated 
on-the-fly to convert Python long/int from and to all sorts of C integer 
types with compile time (portability) and runtime size/value checks. 
Depending on your needs, this may or may not be faster than the above C-API 
function.


Stefan

___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Proposing PEP 345 : Metadata for Python Software Packages 1.2

2010-01-03 Thread David Lyon

> On Mon, Dec 28, 2009 at 1:15 AM,  Tarek Ziade wrote:
>
> This new operator removes the ambiguity the original proposal had,
> without making it more
> complex for common use cases. So if you dislike it, you will need to
> propose something
> else that also fixes the ambiguity we had.

Ok.

> Environment markers
>..
>Here are some example of fields using such markers:
>
>Requires-Dist: pywin32 (>1.0); sys.platform == 'win32'

  Requires-Dist: [Windows] pywin32 1.0+

That's simpler, shorter, and less ambiguous. Easier to
parse for package managers.

David



___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Proposing PEP 345 : Metadata for Python Software Packages 1.2

2010-01-03 Thread MRAB

David Lyon wrote:

On Mon, Dec 28, 2009 at 1:15 AM,  Tarek Ziade wrote:

This new operator removes the ambiguity the original proposal had,
without making it more
complex for common use cases. So if you dislike it, you will need to
propose something
else that also fixes the ambiguity we had.


Ok.


Environment markers
..
Here are some example of fields using such markers:

Requires-Dist: pywin32 (>1.0); sys.platform == 'win32'


  Requires-Dist: [Windows] pywin32 1.0+

That's simpler, shorter, and less ambiguous. Easier to
parse for package managers.


'win32' is more specific than 'Windows' and, to me, '1.0+' means
'>=1.0', not '>1.0'.
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Proposing PEP 345 : Metadata for Python Software Packages 1.2

2010-01-03 Thread Martin v. Löwis
>> Requires-Dist: pywin32 (>1.0); sys.platform == 'win32'
> 
>   Requires-Dist: [Windows] pywin32 1.0+
> 
> That's simpler, shorter, and less ambiguous. Easier to
> parse for package managers.

Don't you want the PEP to complete? Why this bike-shedding?

I can agree it's shorter. I can't agree that it's simpler,
or less ambiguous.

Regards,
Martin
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Proposing PEP 345 : Metadata for Python Software Packages 1.2

2010-01-03 Thread [email protected]

On Jan 3, 2010, at 7:21 PM, Martin v. Löwis wrote:

>>> Requires-Dist: pywin32 (>1.0); sys.platform == 'win32'
>> 
>>  Requires-Dist: [Windows] pywin32 1.0+
>> 
>> That's simpler, shorter, and less ambiguous. Easier to
>> parse for package managers.
> 
> Don't you want the PEP to complete? Why this bike-shedding?

Really

Enough, already!

S

___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Proposing PEP 345 : Metadata for Python Software Packages 1.2

2010-01-03 Thread David Lyon

Hi Martin, Happy New Year,

>>> Requires-Dist: pywin32 (>1.0); sys.platform == 'win32'
>>
>>   Requires-Dist: [Windows] pywin32 1.0+
>>
>> That's simpler, shorter, and less ambiguous. Easier to
>> parse for package managers.
>
> Don't you want the PEP to complete? Why this bike-shedding?

Well, I'm just helping out by pointing out some simpler ways
as Tarek asked me. I was only answering his question. I was out
celebrating so it took longer to reply than normal.

Bike-Shedding ? Me ? which bikeshed? wanting simple?

Anyway, I'm just reading the PEPs and commenting. If there
are some alterations that can be done, lets discuss them.

> I can agree it's shorter.
> ..

Cool.

What I'd really like is a 'Code-Repository:' keyword
so that we can install programs/libraries directly into
a system.

I feel that this would really simplify the packaging
landscape, making it much easier for the scientific
community and others to do python software installs.

This would allow us to perphaps have something even
*more modern* than CPAN.

So yes, getting PEP-345 right is important to me.

Have a nice day.

David



___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com