IMPORTANT 2.5 API changes for C Extension Modules
flag
4 messages - Collapse all
/groups/adfetch?adid=JYY18BEAAACDL3C0JX8DVjZ4sE9RZPU9FSRgCP-avRN4YT0eROC0jw
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
1.  nnorwitz@gmail.com  
View profile  
(3 users)  More options Apr 5 2006, 2:44 am
Newsgroups: comp.lang.python
From: "nnorw...@gmail.com" <nnorw...@gmail.com>
Date: 4 Apr 2006 23:44:16 -0700
Local: Wed, Apr 5 2006 2:44 am
Subject: IMPORTANT 2.5 API changes for C Extension Modules
If you don't write or otherwise maintain Python Extension Modules
written in C (or C++), you can stop reading.

Python 2.5 alpha 1 is in the process of being released later today.
There are important changes that are in 2.5 to support 64-bit systems.
These changes can cause Python to crash if your module is not upgraded
to support the changes.  Python was changed internally to use 64-bit
values on 64-bit machines for indices.  If you've got a machine with
more than 16 GB of RAM, it would be great if you can test Python with
large (> 2GB) strings and other sequences.

For more details about the Python 2.5 schedule:
http://www.python.org/dev/peps/pep-0356/
For more details about the 64-bit change:
http://www.python.org/dev/peps/pep-0353/
How to fix your module:
http://www.python.org/dev/peps/pep-0353/#conversion-guidelines

The effbot wrote a program to check your code and find potential
problems.
http://svn.effbot.python-hosting.com/stuff/sandbox/python/ssizecheck.py

Please test and upgrade your extension modules!

Cheers,
n


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
2.  David Rushby  
View profile  
 More options Apr 5 2006, 9:27 pm
Newsgroups: comp.lang.python
From: "David Rushby" <DavidRus...@gmail.com>
Date: 5 Apr 2006 18:27:04 -0700
Local: Wed, Apr 5 2006 9:27 pm
Subject: Re: IMPORTANT 2.5 API changes for C Extension Modules
Thank you for taking the time to pull the relevant links together and
make this post, Neal.

    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
3.  konrad.hin...@laposte.net  
View profile  
 More options Apr 6 2006, 6:46 am
Newsgroups: comp.lang.python
From: konrad.hin...@laposte.net
Date: Thu, 6 Apr 2006 12:46:56 +0200
Local: Thurs, Apr 6 2006 6:46 am
Subject: Re: IMPORTANT 2.5 API changes for C Extension Modules
On 05.04.2006, at 08:44, nnorw...@gmail.com wrote:

> Python 2.5 alpha 1 is in the process of being released later today.
> There are important changes that are in 2.5 to support 64-bit systems.
> These changes can cause Python to crash if your module is not upgraded
> to support the changes.  Python was changed internally to use 64-bit
> values on 64-bit machines for indices.  If you've got a machine with
> more than 16 GB of RAM, it would be great if you can test Python with
> large (> 2GB) strings and other sequences.

> For more details about the Python 2.5 schedule:
> http://www.python.org/dev/peps/pep-0356/
> For more details about the 64-bit change:
> http://www.python.org/dev/peps/pep-0353/
> How to fix your module:
> http://www.python.org/dev/peps/pep-0353/#conversion-guidelines

Thanks for the information!

One question: Is there a safe way to keep extension modules backward-
compatible with older Python versions? I am thinking of something like

        #ifndef PY_SSIZE_T_DEFINED
        typedef Py_ssize_t int;
        #endif

assuming that Python 2.5 defines PY_SSIZE_T_DEFINED.

Konrad.
--
------------------------------------------------------------------------
-------
Konrad Hinsen
Laboratoire Leon Brillouin (CEA-CNRS), CEA Saclay,
91191 Gif-sur-Yvette Cedex, France
Tel.: +33-1 69 08 79 25
Fax: +33-1 69 08 82 61
E-Mail: konrad.hin...@cea.fr
------------------------------------------------------------------------
-------


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
4.  Fredrik Lundh  
View profile  
(2 users)  More options Apr 6 2006, 6:49 am
Newsgroups: comp.lang.python
From: "Fredrik Lundh" <fred...@pythonware.com>
Date: Thu, 6 Apr 2006 12:49:42 +0200
Local: Thurs, Apr 6 2006 6:49 am
Subject: Re: IMPORTANT 2.5 API changes for C Extension Modules

konrad.hin...@laposte.net wrote:
> One question: Is there a safe way to keep extension modules backward-
> compatible with older Python versions?

absolutely.

> I am thinking of something like

> #ifndef PY_SSIZE_T_DEFINED
> typedef Py_ssize_t int;
> #endif

> assuming that Python 2.5 defines PY_SSIZE_T_DEFINED.

the "official" way to do this is described in the conversion guidelines:

    http://www.python.org/dev/peps/pep-0353/#conversion-guidelines

</F>


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google