[Patches] [ python-Patches-450267 ] OS/2+EMX port - changes to Python core

noreply@sourceforge.net noreply@sourceforge.net
Sat, 16 Feb 2002 21:16:11 -0800


Patches item #450267, was opened at 2001-08-12 04:34
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=450267&group_id=5470

Category: Core (C code)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Andrew I MacIntyre (aimacintyre)
>Assigned to: Martin v. Löwis (loewis)
Summary: OS/2+EMX port - changes to Python core

Initial Comment:
The attached patch incorporates the changes to the source tree between Python 2.1.1 and the 010812 release 
of the OS/2+EMX port.

It includes changes to files in Include/, Modules/, Objects/ and Python/.

----------------------------------------------------------------------

>Comment By: Andrew I MacIntyre (aimacintyre)
Date: 2002-02-16 21:16

Message:
Logged In: YES 
user_id=250749

Following discussion on python-dev, I have created patches for Objects/stringobject.c and Objects/unicodeobject.c that aim 
to rationalise the %#x/%#X format conversion mess.

These two patches remove approaches specific to the various bugs and standard violations encountered with these format 
conversions, and take the approach of relying on the behaviour of the %x/%X format conversions and directly supplying 
Python's preferred prefix (0x/0X respectively).

The patches presented are against CVS of 15Feb02 1430 AEST, and have been tested on both OS/2 and FreeBSD.

If acceptable, I would prefer to apply my pre-existing patches for these files (the Objects patch below) before these new 
patches, as my earlier patches with their EMX specifics in OS/2 specific #ifdefs are "failsafe" as far as other platforms are 
concerned.  Then if the new approach causes other platforms to fail, these patches can be backed out without breaking 
the OS/2 port.

----------------------------------------------------------------------

Comment By: Andrew I MacIntyre (aimacintyre)
Date: 2002-01-26 22:19

Message:
Logged In: YES 
user_id=250749

I have split the original approach into patches for each of the Include, Modules, Objects and Python directories.

Of particular note:
- the patches to import.c are general to both VACPP and EMX ports, and have been trialled by Michael Muller with 
satisfactory results.
- Modules/unicodedata.c has a name clash between its internally defined _getname() and an EMX routine of the same 
name defined in <stdlib.h>.  Is the solution in the patch acceptable?
- both Objects/stringobject.c and Objects/unicodeobject.c have changes to deal with EMX's runtime not producing a desired 
"0X" prefix in response to a "%X" format specifier (it produces "0x" instead).

The patched source tree has been built and regression tested on both EMX and FreeBSD 4.4, with no unexpected results.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2001-10-01 15:59

Message:
Logged In: YES 
user_id=21627

Please review this patch carefully again, asking in each 
case whether this chunk *really* belongs to this patch. Do 
so by asking "is it specific to the port of Python to 
os2emx?" There are some changes that are desirable, but 
are unrelated (like the whitespace changes in 
PyThread_down_sema). Please submit those in a separate 
patch. There are also changes that don't belong here at 
all, like the inclusion of a Modules/Setup.

If you are revising this patch, you may also split it into 
a part that is absolutely necessary, and a part that is 
nice-to-have. E.g. the termios changes are probably 
system-specific, but I guess the port would work well 
without them.

Without going in small steps, it seems that we won't move 
at all. You may consider making use of your checkin 
permissions for uncritical operations. If you need help in 
CVS operations, please let me know.


----------------------------------------------------------------------

Comment By: Andrew I MacIntyre (aimacintyre)
Date: 2001-08-13 06:21

Message:
Logged In: YES 
user_id=250749

Thanks for the feedback.  At this stage of the game, I'd prefer to work with a "supervisor" rather than take on CVS commit 
privs, though I realise that "supervisors" are a scarce resource.


----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-08-12 07:53

Message:
Logged In: YES 
user_id=6380

Hi Andrew,

Thanks for the patches.

There's a lot of code (here and in the two previous
patches). I'm going to see if we can give you CVS commit
permission so you can apply the changes yourself.

Note that commit permission (if you get it) doesn't mean
that the patch is automatically approved -- I've seen some
changes in your diffs that look questionable. You probably
know which ones. :-)

In general, the guidelines are that you can make changes
freely (a) in code you own because it's in a file or
directory that's specific to your port; (b) in code specific
to your port that's inside #ifdefs for your port (this
includes adding); (c) to fix an *obvious* small typo or
buglet that bothers your compiler (example: if your compiler
warns about an unused variable, feel free to delete it, as
long as the unusedness isn't dependent on an #ifdef).

For other changes we all appreciate it if you discuss them
on python-dev or on the SF patch manager first.

Oh, and if you ever check something in that breaks the build
on another platform or causes the test suite to fail, people
will demand very quick remedies or the checkin will be
reversed. :-)

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=450267&group_id=5470