[issue6105] json.dumps doesn't respect OrderedDict's iteration order

2009-05-26 Thread Robert Lehmann

Robert Lehmann  added the comment:

This only seems to be the case with the C implementation of json (_json). 

>>> json.encoder.c_make_encoder = None
>>> json.dumps(OrderedDict(items))
'{"one": 1, "two": 2, "three": 3, "four": 4, "five": 5}'

I think the culprit is encoder_listencode_dict (Modules/_json.c:2049).
It uses PyDict_Next to fetch all items from the dictionary and thereby
loses order. A special code branch for dict subclasses
(!PyDict_CheckExact) which uses PyIter* instead should solve the
problem. (PyDict_Next should not honor order no matter what IMO.)

If nobody beats me to it I can try to come up with a patch.

--
nosy: +lehmannro

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6107] Subprocess.Popen output fails on Windows

2009-05-26 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

The following works for me:

>>> import subprocess
>>> p=subprocess.Popen('findstr "disk" c:\\boot.ini',
stdout=subprocess.PIPE)
>>> print p.communicate()[0]
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP
Professional" /fastdetect /NoExecute=OptOut

Tested with python2.5 on Windows XP, and python2.6 on Windows 2000

--
nosy: +amaury.forgeotdarc

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6070] Python 2.6 makes .pyc/.pyo bytecode files executable

2009-05-26 Thread Marco

Marco  added the comment:

TO loewis: 
this new patch works fine.
I've removed the first #endif.

thank you ;)

--
Added file: http://bugs.python.org/file14072/import_patch2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6112] scheduler.cancel does not raise RuntimeError

2009-05-26 Thread Ivo Danihelka

New submission from Ivo Danihelka :

There is a misleading documentation for module sched.
Method scheduler.cancel() does not raise RuntimeError.
It raises ValueError if the given event is not in the queue.

The RuntimeError is mentioned inside the module documentation
and also inside the method __doc__ string.

--
assignee: georg.brandl
components: Documentation
messages: 88338
nosy: fidlej, georg.brandl
severity: normal
status: open
title: scheduler.cancel does not raise RuntimeError
versions: Python 2.5, Python 2.6, Python 3.0, Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6112] scheduler.cancel does not raise RuntimeError

2009-05-26 Thread Georg Brandl

Georg Brandl  added the comment:

Thanks, fixed in r72932.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew

New submission from Matthew :

What I intended was...
I create a list of DIFFERENT instances of the same class, I wanted them
to be different instances, with different values for the properties,
stressing the word "DIFFERENT".

What I originally did was...
The __init__ assigns default values for the properties (eg, iId = 0, and
sName = ''), then I would change to properties before adding it to the
list.  However, the list will contain the right number of elements, but
every element is the same instance of the class.

I resolved this by...
If I change __init__ such that I'm passing it parameters with values to
assign to the properties.  And then adding the instances of the class to
the list.  Then each element in the list is a different instance.  And
this made everything work.

--
components: Windows
messages: 88340
nosy: mbaynham
severity: normal
status: open
title: Dupicate instances of classes in list
versions: Python 2.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6111] Impossible to change preferences in IDLE

2009-05-26 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

I tried with the latest version in py3k (r72934).
No problem for me on Windows 2000.

Did you try to run Idle from a shell window? Are there exceptions showing?

--
nosy: +amaury.forgeotdarc

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Can you please show the code you tried initially?
I suspect that it always adds the same instance to the list...

--
nosy: +amaury.forgeotdarc

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6111] Impossible to change preferences in IDLE

2009-05-26 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

I should have made this more clear in the description, instead of hiding 
it in the components list, but this is an issue for the OSX port.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew

Matthew  added the comment:

I didn't keep a copy of the code that didn't work.  Sorry.

When I changed the way I was initialising the classes, before adding
them to the list, I didn't change any of the logical flow in my code,
and it started to work.

I know it sounds very strange, like it really shouldn't happen, but it did.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

OK, then I'll close this issue.

This is probably a typo in your code, like this one that I make from
time to time:
obj = Obj()
Obj.sName = 'someName'

--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6109] IDLE rendering issue with oriental characters on OSX

2009-05-26 Thread Ezio Melotti

Ezio Melotti  added the comment:

Are these characters displayed correctly in other places?

Usually characters that are not available in a specific font are
replaced by an empty box. In some cases the missing characters can be
borrowed by other fonts, but IIRC that depends on the application.

If you have a script or file that demonstrates the problem, attach it to
the issue (I don't have OSX to test it though).

--
nosy: +ezio.melotti

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6109] IDLE rendering issue with oriental characters on OSX

2009-05-26 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

The same fontname and file display correctly in programs (such as 
Textmate).

Even when both textmate and IDLE have been configured to use the same 
font the text looks fine in textmate and broken in IDLE.

My gut feeling is that this is an issue with the Tk port to OSX. 

The same bad output is seen in the GUI version of wish when you read the 
file there manually using this code:

% open /Users/ronald/Desktop/Chinese.txt
file10
% read file10


The output of the last statement also contains squares, and at the same 
positions as when I open the file in IDLE.

What I don't know is if there is some magical Tcl code that will fix 
this issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew

Matthew  added the comment:

Trust me this was no typo.

I debugged my code by adding print statements to see what values were
going into the list, and print statements to see the values that were
coming out.

It might be that running code from the application Blender does bazaar
things, or it could be anything, I don't know.  All I know is all the
instances I had in the list, had the same property values as the last
element that was added to the list.  I know it's amazingly weird.

--
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6102] When the package has non-ascii path and .pyc file, we cannot import them.

2009-05-26 Thread Ezio Melotti

Ezio Melotti  added the comment:

Your problem could be related to #3297, but katakana characters don't
have a codepoint greater than U+ so it could be something else.
(What is the value of sys.maxunicode there though?)

I tried your script on Linux with Python3.1b1 and en_US.UTF-8 but I
wasn't able to reproduce the issue.
I ran the script from the terminal with "python3 test.py" twice and it
worked both the time (is this the correct way to use the script?).
Can you try with Python3.1 and see if it works?

I also tried to create a directory called デスクトップ with an
__init__.py in it, I imported it and reloaded and it worked properly,
even when the .pyc was there.

If you delete the .pyc an reload the script again, does it work?

(Next time upload the files separately, it's easier for us to see them.)

--
components: +Unicode -None
nosy: +ezio.melotti

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Ezio Melotti

Ezio Melotti  added the comment:

Even if it's a real bug, without the code we can't do anything.
Try to reproduce what you did or get that code back somehow (ctrl+z? ;)

--
nosy: +ezio.melotti

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6114] distutils build_ext path comparison only based on strings

2009-05-26 Thread Sven Rebhan

New submission from Sven Rebhan :

If python is installed into a symlink'ed directory, the variables
"sys.exec_prefix" and "sys.executable" can contain different paths.
Therefore, the respective test in build_ext.py fails (line 202)
and a wrong library search directory (-L.) is set.

The attached patch fixes this issue, by using os.path.samefile() instead
of the string comparison to see whether two files are identical
irrespective of their paths.

--
assignee: tarek
components: Distutils
files: python-2.5.2-build_ext-pathcompare.patch
keywords: patch
messages: 88351
nosy: sleipnir, tarek
severity: normal
status: open
title: distutils build_ext path comparison only based on strings
type: behavior
versions: Python 2.5, Python 2.6
Added file: 
http://bugs.python.org/file14073/python-2.5.2-build_ext-pathcompare.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6114] distutils build_ext path comparison only based on strings

2009-05-26 Thread jougs

Changes by jougs :


--
nosy: +jougs

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew

Matthew  added the comment:

First File


This is the main one, it's the one that is called from the Blender
application.

--
Added file: http://bugs.python.org/file14074/MyWalls.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew

Matthew  added the comment:

Second file

The loads of code for building a wall

--
Added file: http://bugs.python.org/file14075/WallWithDoors.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew

Matthew  added the comment:

Third file...

all the classes for holding the data

--
Added file: http://bugs.python.org/file14076/modDataObjects.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew

Matthew  added the comment:

Forth and final file...

Just a little error handling and stuff I want all my classes to inherit

--
Added file: http://bugs.python.org/file14077/modBasics.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew

Matthew  added the comment:

If you want to run it I'm afraid you'll have to:
1) install Blender (www.blender.org)
2) put all those files in C:\Program Files\Blender
Foundation\Blender\.blender\scripts\MyWalls\src\
3) in the Blender application goto scripts ---> Objects ---> Build Walls

Then look at the terminal window that comes with Blender and you'll see
it's just gone wrong.

And if you change the Class ClsFeatureVariables, so that the properties
are set when it initialises you'll see it all works OK.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

It's a typo :-)
In WallWithDoors.py, line 146:
cTempVariable = ClsFeatureVariable
You forgot the () at the end...

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew

Matthew  added the comment:

So why is it able to create instances and add them to the
lstFeatureVariables list, surely it should go wrong there and not allow
the instances to be created.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew

Matthew  added the comment:

OK, sorry for the rambling, just ignore it

Cheers...

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6115] Header and doc related to PyNumber_Divide and PyNumber_InPlaceDivide should be removed in py3k

2009-05-26 Thread Haoyu Bai

New submission from Haoyu Bai :

As function implementation of PyNumber_Divide and PyNumber_InPlaceDivide
are already removed, there are still function declaration in abstract.h,
and also entries in document:
http://docs.python.org/dev/py3k/c-api/number.html?highlight=pynumber_divide

I got some symbol undefined problem because of this. Please see the
attached patch for fixing either the header and doc.

Thank you!

--
assignee: georg.brandl
components: Documentation, Interpreter Core
files: divide.patch
keywords: patch
messages: 88360
nosy: bhy, georg.brandl
severity: normal
status: open
title: Header and doc related to PyNumber_Divide and PyNumber_InPlaceDivide 
should be removed in py3k
versions: Python 3.0, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file14078/divide.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc :


--
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6070] Python 2.6 makes .pyc/.pyo bytecode files executable

2009-05-26 Thread Marco

Changes by Marco :


Removed file: http://bugs.python.org/file14049/import_patch.c

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6070] Python 2.6 makes .pyc/.pyo bytecode files executable

2009-05-26 Thread Marco

Changes by Marco :


Removed file: http://bugs.python.org/file14070/import_patch2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6105] json.dumps doesn't respect OrderedDict's iteration order

2009-05-26 Thread Skip Montanaro

Skip Montanaro  added the comment:

I can't see that the order of keys should matter for language-neutral
serialization libs like json or xmlrpclib.  You're quite possibly
going to be communicating with something on the other end which doesn't
have an OrderedDict-like class.  Why add the extra complication to the
library?

Even with Python of recent enough vintage at both ends, I can't see
that you could dumps() an OrderedDict then loads() the resulting
string and get an OrderedDict out as a result.  You should get a dict,
right?

--
nosy: +skip.montanaro

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew

Changes by Matthew :


Removed file: http://bugs.python.org/file14074/MyWalls.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew

Changes by Matthew :


Removed file: http://bugs.python.org/file14075/WallWithDoors.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew

Changes by Matthew :


Removed file: http://bugs.python.org/file14076/modDataObjects.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6113] Dupicate instances of classes in list

2009-05-26 Thread Matthew

Changes by Matthew :


Removed file: http://bugs.python.org/file14077/modBasics.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5201] Using LDFLAGS='-rpath=\$$LIB:/some/other/path' ./configure breaks the build

2009-05-26 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

The patch looks good, beside the fact that you didn't call super() in
setUp/tearDown.

I'll commit it asap and fix that small issue

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5164] backport distutils 3.x changes into 2.7 when appliabl

2009-05-26 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

I don't need a ticket for this I guess, it's done progressively

--
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1180] Option to ignore or substitute ~/.pydistutils.cfg

2009-05-26 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

I am taking over this issue (I am figuring out you are OK with this
Martin) and put it in my work pile so it goes in 2.7

--
assignee: loewis -> tarek

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2856] os.listdir doc should mention that Unicode decoding can fail

2009-05-26 Thread Martin v. Löwis

Changes by Martin v. Löwis :


--
versions: +Python 2.7 -Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5977] distutils build_ext.get_outputs returns wrong result (patch)

2009-05-26 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

done in r72585 and propagated in 2.6, 3.0, 3.1 branches

Thank you !

--
status: open -> closed
versions: +Python 2.6, Python 3.0

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3872] Python 2.6rc2: Tix ComboBox error

2009-05-26 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

If you follow-up to a closed issue, your follow-up inevitably gets ignored.

Please understand that the issue you encountered is completely different
from the one reported here (which was about the Windows build).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5999] compile error on HP-UX 11.22 ia64 - 'mbstate_t' is used as a type, but has not been defined as a type

2009-05-26 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

I have two questions:
1. does your system provide the mbstate_t type?
2. if so, what header file needs to be included?

Also, please confirm a few things:
a. configure has detected that your system has mbrtowc
b. configure's analysis is correct, i.e. your system has mbrtowc indeed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4947] sys.stdout fails to use default encoding as advertised

2009-05-26 Thread Denilson Figueiredo de Sá

Changes by Denilson Figueiredo de Sá :


--
nosy: +denilsonsa

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5977] distutils build_ext.get_outputs returns wrong result (patch)

2009-05-26 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

Sorry about that, I was travelling and didn't see that the buildbots
turned red. (I ran the test but didn't build python again)

I have changed that because build_ext.compiler is a string option, e.g.
the compiler type. Turning it into a compiler instance when the command
is run twice it breaks  because it is used as a string argument to
create a compiler.

Maybe a solution would be to rename the option name into "compiler_type"
and keep build_ext.compiler as a compiler instance.

--
nosy: +benjamin.peterson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6007] distutils tricks you into thinking you can build extensions with mingw

2009-05-26 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

> Per issue3308, it is not really possible to build Python extensions with
> MinGW anymore (as far as I can tell).

I'm interpreting the issue differently - it was withdrawn by the
submitter, indicating that it isn't an issue with Python.

Even though I still don't understand the original issue, apparently,
it is an issue only if the localtime() function is used. Extensions
that don't use it might still work fine, according to the report.

> If my understanding of the issue is correct, then the mingw32 compiler
> should be removed from distutils and the documentation corrected to
> indicate the lack of support for this compiler toolchain.

I think this is exaggerating the actual state. The compiler is certainly
supported.

--
nosy: +loewis
title: distutils tricks you into thinking you can build extensions with mingw 
-> distutils tricks you into thinking you can build   extensions with mingw

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5977] distutils build_ext.get_outputs returns wrong result (patch)

2009-05-26 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

new_compiler takes "compiler" as a compiler name. It would make much
sense to make it accept a compiler instance.

now for people setup.py, I wasn't aware that people are using
build_ext.compiler as a compiler, besides Python itself.

IMHO we should rename the compiler option to "compiler_type" then
provide an API build_ext.get_compiler() then fix Python setup.py file.

Then this should not go into 2.6 but in 2.7, and we should put back the
option in new_compiler like it was (it's wrong but at least it works if
you run the command just once, which is the most common case)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5977] distutils build_ext.get_outputs returns wrong result (patch)

2009-05-26 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

typo: 

It would make much... -> It would not make much...

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6010] unable to retrieve latin-1 encoded data from sqlite3

2009-05-26 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

This is not a bug. By default, pysqlite decodes all strings to Unicode,
assuming UTF-8 encoding (which SQLite assumes when parsing statements).

To override this default, you need to change the connection's text_factory:

py> import sqlite3
py> db = sqlite3.connect(':memory:')
py> db.text_factory = str
py> cur = db.cursor()
py> cur.execute("create table foo (x)")

py> cur.execute("insert into foo values ('café')")

py> cur.execute("select * from foo")

py> _.fetchall()
[('caf\xe9',)]

--
nosy: +loewis
resolution:  -> invalid
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6012] enhance getargs O& to accept cleanup function

2009-05-26 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

I would propose a different approach: the same function can be both
argument parser and cleanup function. In parsing, the PyObject* points
to the parameter being converted. In cleanup, it points to NULL.

This would allow the O& to continue to be used even if cleanup is
needed. As not all converters would need or support cleanup, converters
that do need cleanup could be required to return Py_CLEANUP_SUPPORTED
(which would be, say, 131072).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6007] distutils tricks you into thinking you can build extensions with mingw

2009-05-26 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

>> I think this is exaggerating the actual state. The compiler is
>> certainly supported.
> 
> Can you elaborate on what "supported" means?  To me, it would mean that
> it could build all the same Python extensions which MSVC can build.

"Supported" means that it will invoke the compiler with the right
command line arguments.

It can't possibly mean what you suggest: gcc simply cannot compile all
code that MSVC can compile - in particular, will will not support many
of the VC extensions to C that a Python extension module may use. COM
interfaces are particularly difficult, making it fail on, e.g. PyWin32.
This was always the case, and never stopped people contributing mingw
support.

--
title: distutils tricks you into thinking you can build extensions with mingw 
-> distutils tricks you into thinking you can build extensions with mingw

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1621] Do not assume signed integer overflow behavior

2009-05-26 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

> I'm finding many overflow checks that look like:
> 
>   size = Py_SIZE(a) * n;
>   if (n && size / n != Py_SIZE(a)) {
>   PyErr_SetString(PyExc_OverflowError,
>   "repeated bytes are too long");
>   return NULL;
>   }
> 
> where size and n have type Py_ssize_t.  That particular one comes
> from bytesobject.c (in py3k), but this style of check occurs
> frequently throughout the source.
> 
> Do people think that all these should be fixed?  

If this really invokes undefined behavior already (i.e. a compiler
could set "size" to -1, and have the test fail - ie. not give
an exception, and still be conforming) - then absolutely yes.

> The fix itself s reasonably straightforward:  instead of multiplying
> and then checking for an overflow that's already happened (and hence
> has already invoked undefined behaviour according to the standards),
> get an upper bound for n *first* by dividing PY_SSIZE_T_MAX
> by Py_SIZE(a) and use that to do the overflow check *before*
> the multiplication.  It shouldn't be less efficient:  either way
> involves an integer division, a comparison, and a multiplication.

[and then perform the multiplication unsigned, to silence the
warning - right?]

I think there is a second solution: perform the multiplication
unsigned in the first place. For unsigned multiplication, IIUC,
overflow behavior is guaranteed in standard C (i.e. it's modulo
2**N, where N is the number of value bits for the unsigned value).

So the code would change to

nbytes = (size_t)Py_SIZE(a)*n;
if (n && (nbytes > Py_SSIZE_T_MAX || nbytes/n != Py_SIZE(a))...
size = (Py_ssize_t)nbytes;

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1621] Do not assume signed integer overflow behavior

2009-05-26 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

>   size = Py_SIZE(a) * n;
> 
> The multiplication should be safe from overflow, and I don't get
> any warning at all either with this rewrite (using -O3 -Wall -Wextra -
> Wsigned-overflow=5) or from the original code, so there's nothing to 
> silence.

This is puzzling, isn't it? It *could* overflow, could it not?

>> I think there is a second solution: perform the multiplication
>> unsigned in the first place.
> 
> That would work too.  I find the above code clearer, though.

I agree in this case. In general, I'm not convinced that it
is always possible to rewrite the code in that way conveniently.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1866] const arg for PyInt_FromString

2009-05-26 Thread Walter Dörwald

Walter Dörwald  added the comment:

The patch no longer applies cleanly to the trunk.

--
nosy: +doerwalter

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6022] test_distutils leaves a 'foo' file behind in the cwd

2009-05-26 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

done in r72636, r72637, r72638, r72639

--
components: +Distutils
status: open -> closed
versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5977] distutils build_ext.get_outputs returns wrong result (patch)

2009-05-26 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

Roumen, the problem you mentioned was existing because of the
empty c file in test_get_outputs. I have fixed it yesterday by creating a
simple c file containing a minimal code:

void inifoo(void) {};

can you check it works for you ?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2661] Mapping tests cannot be passed by user implementations

2009-05-26 Thread Walter Dörwald

Walter Dörwald  added the comment:

Any custom mapping class should have a repr test anyway, so IMHO it
doesn't matter whether the base test has a repr test or not.

The suggested fixes for TestMappingProtocol.test_fromkeys() and
TestHashMappingProtocol.test_mutatingiteration() sound OK however.

David, can you provide a patch?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6011] python doesn't build if prefix contains non-ascii characters

2009-05-26 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

Thanks, I'll work on this during this week end hopefully

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6012] enhance getargs O& to accept cleanup function

2009-05-26 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

> Well, this is not implemented yet. (I introduced another format
> temporary) Does this mean converter should return Py_CLEANUP_SUPPORTED
> instead of 1 when cleanup is needed?

If you are introducing a new character ($), then this isn't actually
needed. I was thinking of reusing O&, literally.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6037] MutableSequence.__iadd__ should return self

2009-05-26 Thread Andrés Marzal

New submission from Andrés Marzal :

I've implemented a LinkedList as a MutableSequence and __iadd__, which
is inherited from MutableSequence, does not perform as expected.
The _abcoll.py file contains this:

class MutableSequence(Sequence):
 ...
   def __iadd__(self, values):
   self.extend(values)

The method __iadd__ does not return anything, buy it should return
self. Right now, the sentence

aLinkedList += [1, 2]

sets the value of aLinkedList to None.

--
components: Library (Lib)
messages: 87872
nosy: amarzal
severity: normal
status: open
title: MutableSequence.__iadd__ should return self
type: behavior
versions: Python 2.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6037] MutableSequence.__iadd__ should return self

2009-05-26 Thread Andrés Marzal

Andrés Marzal  added the comment:

I've implemented a LinkedList as a MutableSequence and __iadd__, which
is inherited from MutableSequence, does not perform as expected.
The _abcoll.py file contains this:

class MutableSequence(Sequence):
 ...
   def __iadd__(self, values):
   self.extend(values)

The method __iadd__ does not return anything, buy it should return
self. Right now, the sentence

aLinkedList += [1, 2]

sets the value of aLinkedList to None.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6038] Should collections.Counter check for int?

2009-05-26 Thread Hagen Fürstenau

New submission from Hagen Fürstenau :

I noticed that while the docs say that "Counts are allowed to be
any integer value including zero or negative counts",
collections.Counter doesn't perform any check on the types of count
values. Instead, non-numerical values will lead to strange behaviour or
exceptions later on:

>>> c = collections.Counter({'a':'3', 'b':'20', 'c':'100'})
>>> c.most_common(2)
[('a', '3'), ('b', '20')]
>>> c+c
Traceback (most recent call last):
  File "", line 1, in 
  File "/local/hagenf/lib/python3.1/collections.py", line 467, in __add__
if newcount > 0:
TypeError: unorderable types: str() > int()

I'd prefer Counter to refuse non-numerical values right away as the
present behaviour may hide bugs (e.g. a forgotten string->int
conversion). Any opinions? (And what about negative values or floats?)

--
components: Library (Lib)
messages: 87874
nosy: hagen
severity: normal
status: open
title: Should collections.Counter check for int?
type: behavior
versions: Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6041] change sdist and register command so they use check

2009-05-26 Thread Tarek Ziadé

New submission from Tarek Ziadé :

the check command now is able to check the meta-data, so we can remove
duplicate code located in both "sdist" and "register" and call "check as
a subcommand.

- register will also have a new boolean option called "strict". If set
to True (it's unset by default), register will stop if the metadata are
not OK or if the long_description fails to compile in reST (as long as
docutils is installed of course)

- sdist will have a new boolean option called "medata-check", set to
true by default. That will use "check" to verify the metadata (not the 
long_description reSt compliancy though, just the metadata fields presence)

--
assignee: tarek
components: Distutils
messages: 87900
nosy: tarek
severity: normal
status: open
title: change sdist and register command so they use check
versions: Python 2.7, Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6041] change sdist and register command so they use check

2009-05-26 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

the old check_metadata method, duplicated in sdist and register, will be
marked with a PendingDeprecationWarning.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5732] add a new command called "check" into Distutils

2009-05-26 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

closing (created a new ticket #6041 for sdist and register inclusion)

--
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5732] add a new command called "check" into Distutils

2009-05-26 Thread Tarek Ziadé

Changes by Tarek Ziadé :


--
dependencies: +change sdist and register command so they use check

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6041] change sdist and register command so they use check

2009-05-26 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

done in r72681, r72683

--
dependencies: +add a new command called "check" into Distutils
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1621] Do not assume signed integer overflow behavior

2009-05-26 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

> I don't see why.  There's nothing in -Wall -Wextra -Wsigned-overflow
> that asks for warnings for code that might overflow.

Ah, right. I misunderstood (rather, didn't bother checking) what
-Wsigned-overflow really does.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3527] Py_WIN_WIDE_FILENAMES removal

2009-05-26 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

Looks fine to me, please apply.

--
assignee:  -> ocean-city
resolution:  -> accepted

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4126] remove not decodable environment variables

2009-05-26 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

This patch is out of date with PEP 383

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6012] enhance getargs O& to accept cleanup function

2009-05-26 Thread Martin v. Löwis

Changes by Martin v. Löwis :


--
priority: normal -> release blocker

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4856] Remove checks for win NT

2009-05-26 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

The patch is slightly out of date; if updated, it is fine to apply after
3.1.

I think Py_GetFileAttributesExA can also be removed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6012] enhance getargs O& to accept cleanup function

2009-05-26 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

Modifying convert_to_unicode is incorrect; this function is not an O&
converter. Instead, PyUnicode_FSConverter needs to change.

Attached is a patch that does that, and also uses the O& approach. It
also adjusts the patch to use capsules.

--
Added file: http://bugs.python.org/file13997/conv.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6046] test_distutils.py fails on VC6(Windows)

2009-05-26 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

When I made this change I checked it under VC9, so it should work on
this version.

I'll have to create a VM with VC6 to track it down.
Until then I'll deactivate this test when it's VC6

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6046] test_distutils.py fails on VC6(Windows)

2009-05-26 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

Ok done. can you check on your side ? 

Don't we have a win32+MVCS6 buildslave somewhere ?

That would be nice to have.

I am running 3 differents VMs already when I work on these files. It
would be great to have buildbot making regression tests over all
compiler flavors.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6012] enhance getargs O& to accept cleanup function

2009-05-26 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

> Well, convert_to_unicode used to use O& before

I don't understand. Where does it use it? Before
your patch, convert_to_unicode was a regular one-argument
function, not a ParseTuple O& function. Only your patch
makes it one.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6045] Fix dbm interfaces

2009-05-26 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

> So, either we remove the claim that they have a dict-style interface
> beyond __*item__() and keys(), or we do something about it.

I disagree that this is release-critical. I think it is desirable to
say that the dbm modules support most of a dict-style interface,
and I also think that it is factually correct to claim that they
currently do.

The problem with the current documentation is that it apparently stopped
documenting the "dict-style interface", in the sense

http://www.python.org/doc/2.5/lib/typesmapping.html

did. Instead, the documentation now only documents the dict type itself.
If a dict-style interface was specified, one would have to specify
whether returning views from keys/values/items is part of the dict-style
interface or not.

--
nosy: +loewis

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6045] Fix dbm interfaces

2009-05-26 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

>> I disagree that this is release-critical. I think it is desirable to
>> say that the dbm modules support most of a dict-style interface,
>> and I also think that it is factually correct to claim that they
>> currently do.
> 
> Supporting only __getitem__, __setitem__, __delitem__, __contains__ and
> keys is already "most of a dict-style interface"? 

It's also __len__... Indeed, I think that this is the major part of the
dict interface. For a number of additional methods, it would be
straight-forward to support them as well (such as get(), pop(),
popitem(), setdefault(), update()). That they are missing should be
considered as a regular bug/missing feature. However, it appears that
nobody has complained about those missing features in all these years,
so that they are missing can't be that serious.

> However, for the dbm modules I would be in favor of only specifying the
> four mentioned methods, as in the docstring of dbm/__init__.py, and not
> claiming any more.

I don't mind the documentation to explain precisely what is, as long as
it continues to explain what could be.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6048] make distutils use the tarinfo command

2009-05-26 Thread Tarek Ziadé

New submission from Tarek Ziadé :

Currently Distutils uses the "tar" command to build tarballs. 

It's better to use the tarinfo module, so Distutils does not depend on
the "tar" program anymore.

--
assignee: tarek
components: Distutils
messages: 87994
nosy: tarek
severity: normal
status: open
title: make distutils use the tarinfo command
type: behavior
versions: Python 2.7, Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6045] Fix dbm interfaces

2009-05-26 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

> Would inheriting from MutableMapping fix this problem?

In principle: some of it, yes. These types are written in C,
so I'm not sure how exactly it would work. Also, it
still wouldn't provide all methods, e.g. copy(), fromkeys(),
get(), values(), items() would still be missing, as would
iteration (although the dict documentation apparently never
says that iterating over a dict is supported).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6049] str.strip() and " behaviour expected?

2009-05-26 Thread Martin v. Löwis

Changes by Martin v. Löwis :


--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6050] zipfile: Extracting a directory that already exists generates an OSError

2009-05-26 Thread Martin v. Löwis

Changes by Martin v. Löwis :


--
assignee:  -> loewis
nosy: +loewis
priority:  -> release blocker

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6046] test_distutils.py fails on VC6(Windows)

2009-05-26 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

Thanks Roumen,that was it. I've commited the change and added a test to
verify the produced file has the right extension.

Thanks for the feedback Hirokazu

--
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4174] Performance optimization for min() and max() over lists

2009-05-26 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

Perhaps not.
I had however written a general list locking system, generalizing the 
way sort() locks a list for direct manipulation, and rewritten min and 
max to be able to use that.  Perhaps that approach would be of interest?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6053] distutils error on windows

2009-05-26 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

I am currently working on the removal of 'tar' in favor of the usage of
tarinfo, so I'll get back to you in this issue when it's ready

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6053] distutils error on windows

2009-05-26 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

(and also fix the test in 2.6 for this case)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6053] distutils error on windows

2009-05-26 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

ok done, thanks for the patch;

--
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3541] bsddb memory leak on ubuntu

2009-05-26 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

Python 2.5 is in security maintenance mode only.

Please, upgrade to Python 2.6. If you can not upgrade Python, install a
recent bsddb release from http://www.jcea.es/programacion/pybsddb.htm

If you can still reproduce the problem, let me know.

--
assignee:  -> jcea
resolution:  -> out of date
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6053] distutils error on windows

2009-05-26 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

> 2. I got tar error. This happens because tar command I'm using cannot
> recognize path with drive letter. For example, "tar -cf r:/foo ." fails
> with error. I'm using http://gnuwin32.sourceforge.net/packages/gtar.htm

I don't think this is a bug in distutils, but rather in the tar command
that you are using.

--
nosy: +loewis

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2009-05-26 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

> I would appreciate if someone could review the patch and comment on the
> technique.

There are a few minor issues; overall, it looks correct:
- the test for "this is windows" should just use MS_WINDOWS.
- don't declare variables in the middle of a block; we use C89.
- the argument parsing looks incorrect; take a look at rename()
  for guidance. Supporting bytes is optional; IMO, requiring
  Unicode strings for the API would be fine.

I don't quite understand why you can't implement lstat, or why
you would want to call into ntpath. Take a look at how stat()
is implemented in the nt module.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6054] tarfile normalizes arcname

2009-05-26 Thread Martin v. Löwis

Changes by Martin v. Löwis :


--
assignee:  -> lars.gustaebel
nosy: +lars.gustaebel

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1602] windows console doesn't print utf8 (Py30a2)

2009-05-26 Thread Χρήστος Γεωργίου (Christos g...@psf.upfronthosting.co.za, eorgiou)

Χρήστος Γεωργίου (Christos Georgiou)  added the 
comment:

Just in case it helps, this behaviour is on Win XP Pro, Python 2.5.1:

First, I added an alias for 'cp65001' to 'utf_8' in
Lib/encodings/aliases.py .

Then, I opened a command prompt with a bitmap font.

c:\windows\system32>python
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit
(Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print u"\N{EM DASH}"
—

I switched the font to Lucida Console, and retried (without exiting the
python interpreter, although the behaviour is the same when exiting and
entering again: )

>>> print u"\N{EM DASH}"
Traceback (most recent call last):
  File "", line 1, in 
IOError: [Errno 13] Permission denied

Then I tried (by pressing Alt+0233 for é, which is invalid in my normal
cp1253 codepage):

>>> print u"née"

and the interpreter exits without any information. So it does for:

>>> a=u"née"

Then I created a UTF-8 text file named 'test65001.py':

# -*- coding: utf_8 -*-
a=u"néeα"
print a

and tried to run it directly from the command line:

c:\windows\system32>python d:\src\PYTHON\test65001.py
néeαTraceback (most recent call last):
  File "d:\src\PYTHON\test65001.py", line 4, in 
print a
IOError: [Errno 2] No such file or directory

You see? It printed all the characters before failing.

Also the following works:

c:\windows\system32>echo heéε
heéε

and

c:\windows\system32>echo heéε >D:\src\PYTHON\dummy.txt

creates successfully a UTF-8 file (without any UTF-8 BOM marks at the
beginning).

So it's possible that it is a python bug, or at least something can be
done about it.

--
nosy: +tzot

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6058] Add cp65001 to encodings/aliases.py

2009-05-26 Thread Χρήστος Γεωργίου (Christos g...@psf.upfronthosting.co.za, eorgiou)

New submission from Χρήστος Γεωργίου (Christos Georgiou) 
:

Add 'cp65001' (Microsoft term for UTF-8) as an alias to 'utf_8'

--
components: Library (Lib), Unicode
files: alias_cp65001.diff
keywords: patch
messages: 88060
nosy: tzot
severity: normal
status: open
title: Add cp65001 to encodings/aliases.py
type: feature request
versions: Python 2.7
Added file: http://bugs.python.org/file14013/alias_cp65001.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6058] Add cp65001 to encodings/aliases.py

2009-05-26 Thread Χρήστος Γεωργίου (Christos g...@psf.upfronthosting.co.za, eorgiou)

Changes by Χρήστος Γεωργίου (Christos Georgiou) :


--
components: +Windows

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6058] Add cp65001 to encodings/aliases.py

2009-05-26 Thread Χρήστος Γεωργίου (Christos g...@psf.upfronthosting.co.za, eorgiou)

Changes by Χρήστος Γεωργίου (Christos Georgiou) :


Removed file: http://bugs.python.org/file14013/alias_cp65001.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6058] Add cp65001 to encodings/aliases.py

2009-05-26 Thread Χρήστος Γεωργίου (Christos g...@psf.upfronthosting.co.za, eorgiou)

Changes by Χρήστος Γεωργίου (Christos Georgiou) :


Added file: http://bugs.python.org/file14014/alias_cp65001.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6062] build_ext fails to build in the right directory using the package option

2009-05-26 Thread Tarek Ziadé

New submission from Tarek Ziadé :

all in the title. currently working to fix this.

--
assignee: tarek
components: Distutils
messages: 88080
nosy: tarek
severity: normal
status: open
title: build_ext fails to build in the right directory using the package option
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6062] build_ext fails to build in the right directory using the package option

2009-05-26 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

done in r72781

--
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6057] sqlite3 error classes should be documented

2009-05-26 Thread Gerhard Häring

Gerhard Häring  added the comment:

At the very start of the module's documentation it reads:

"""
pysqlite was written by Gerhard Häring and provides a SQL interface
compliant with the DB-API 2.0 specification described by PEP 249.
"""

Where "PEP 249" is a link to the Database API 2.0 specification, which
does document the xception classes and their hierarchy.

--
priority:  -> low

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6054] tarfile normalizes arcname

2009-05-26 Thread Lars Gustäbel

Lars Gustäbel  added the comment:

So, what exactly are trying to accomplish? Why do you need that?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6077] Unicode issue with tempfile on Windows

2009-05-26 Thread Ugra Dániel

New submission from Ugra Dániel :

Opening a file with tempfile.TemporaryFile using "wt+" mode, then
reading content back, will cause reading to stop (without any exception)
when encountering byte '0x1a' (aka. Ctrl+Z) on Windows even tough UTF-16
encoding is used. When using built-in open with the same parameters
(plus a file name of course) everything works as expected. On Linux this
issue does not exists.

--
components: Library (Lib)
files: UnicodeTest.py
messages: 88151
nosy: daniel.ugra
severity: normal
status: open
title: Unicode issue with tempfile on Windows
type: behavior
versions: Python 3.0
Added file: http://bugs.python.org/file14032/UnicodeTest.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >