[issue15540] Python 3.3 and numpy

2012-08-03 Thread Travis Oliphant
Travis Oliphant added the comment: On Aug 3, 2012, at 1:35 AM, Martin v. Löwis wrote: > > Martin v. Löwis added the comment: > >> This is a mis-understanding of what NumPy does and why.There is >> a need to byte-swap only when the data is stored on disk in the >> reverse order from the

[issue15540] Python 3.3 and numpy

2012-08-03 Thread Ondřej Čertík
Ondřej Čertík added the comment: Here is my new patch: https://github.com/numpy/numpy/pull/372 It implements what I was talking about (and fixes the NumPy tests bug). -- ___ Python tracker ___

[issue15540] Python 3.3 and numpy

2012-08-03 Thread Ondřej Čertík
Ondřej Čertík added the comment: Martin, > So if the byte swapping is done before the Unicode object is created: > why did Dave and Ondřej run into problems then? As I wrote above (http://bugs.python.org/msg167280), this happened because of wrong NumPy tests, that need to be fixed. They are te

[issue15540] Python 3.3 and numpy

2012-08-03 Thread Stefan Krah
Stefan Krah added the comment: Martin v. L??wis wrote: > I don't mind that at all, either. What I dislike is "I have this issue, > here is what I've got, and I will continue to work on it" kind of reports > (when Dave clearly said that his patch is work-in-progress). There is a > worse kind, whe

[issue15540] Python 3.3 and numpy

2012-08-03 Thread Martin v . Löwis
Martin v. Löwis added the comment: > FWIW, with regard to Martin's tangential comment about appropriate > use of the tracker, I'm personally fine with using the tracker for > 'I found this problem, attempted to fix it (but failed), here's my > attempt'. I don't mind that at all, either. Wh

[issue15540] Python 3.3 and numpy

2012-08-02 Thread Martin v . Löwis
Martin v. Löwis added the comment: > This is a mis-understanding of what NumPy does and why.There is > a need to byte-swap only when the data is stored on disk in the > reverse order from the native machine So is there ever a need to byte-swap Unicode strings? I can see how *numeric* dat

[issue15540] Python 3.3 and numpy

2012-08-02 Thread Ondrej Certik
Ondrej Certik added the comment: I wrote this initial patch for the issue last week: https://github.com/numpy/numpy/pull/366 with huge help from Stefan and others. As far as the unicode issue goes, Travis and I just talked about this and I think I now understand what is going on the unic

[issue15540] Python 3.3 and numpy

2012-08-02 Thread Nick Coghlan
Nick Coghlan added the comment: While I agree this is important (e.g. I know Dave started looking into this as getting NumPy working is currently a blocker for Fedora migrating their Python 3 stack to 3.3), the burden is definitely on the NumPy side to get the code point values using the right

[issue15540] Python 3.3 and numpy

2012-08-02 Thread Travis Oliphant
Travis Oliphant added the comment: On Aug 2, 2012, at 6:09 PM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >> The byte-swapping must be done prior to conversion to a Python >> Unicode-Object when selecting data out of the array. > > But then it shouldn't affect the invariant

[issue15540] Python 3.3 and numpy

2012-08-02 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: +certik ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue15540] Python 3.3 and numpy

2012-08-02 Thread Stefan Krah
Stefan Krah added the comment: > There is a need to byte-swap only when the data is stored on disk in the > reverse order from the native machine (i.e. NumPy is pointing to > memory-mapped data). In that case it should be a matter of disabling some NumPy unit tests. It seems that currently gen

[issue15540] Python 3.3 and numpy

2012-08-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The byte-swapping must be done prior to conversion to a Python > Unicode-Object when selecting data out of the array. But then it shouldn't affect the invariants which are commented out in Dave's patch. -- ___ Pyth

[issue15540] Python 3.3 and numpy

2012-08-02 Thread Travis Oliphant
Travis Oliphant added the comment: On Aug 2, 2012, at 5:28 PM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > Agreed with Martin. Byte-swapped unicode data in unicode objects doesn't make > sense, since it will break the semantics of many operations. If numpy wants > to supp

[issue15540] Python 3.3 and numpy

2012-08-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Agreed with Martin. Byte-swapped unicode data in unicode objects doesn't make sense, since it will break the semantics of many operations. If numpy wants to support byte-swapped unicode data (what for?), they should store it in a different object type. --

[issue15540] Python 3.3 and numpy

2012-08-02 Thread Martin v . Löwis
Martin v. Löwis added the comment: The byte swapping in numpy is clearly a misfeature when applied to Unicode. I don't think Python should support that, and I can't imagine anybody is using this for a purpose that couldn't also be achieved in a better way. Not sure why you are submitting these

[issue15540] Python 3.3 and numpy

2012-08-02 Thread Stefan Krah
Stefan Krah added the comment: A couple of days ago there was another effort by Ondřej Čertík to get NumPy working with 3.3, see the thread starting here: http://comments.gmane.org/gmane.comp.python.numeric.general/51087 I participated in that discussion and we hit the same problem with the byt

[issue15540] Python 3.3 and numpy

2012-08-02 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue15540] Python 3.3 and numpy

2012-08-02 Thread Dave Malcolm
Changes by Dave Malcolm : -- nosy: +teoliphant ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue15540] Python 3.3 and numpy

2012-08-02 Thread Dave Malcolm
Changes by Dave Malcolm : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue15540] Python 3.3 and numpy

2012-08-02 Thread Alex Gaynor
Changes by Alex Gaynor : -- nosy: +alex ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue15540] Python 3.3 and numpy

2012-08-02 Thread Dave Malcolm
Changes by Dave Malcolm : -- nosy: +haypo, loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue15540] Python 3.3 and numpy

2012-08-02 Thread Dave Malcolm
Changes by Dave Malcolm : Added file: http://bugs.python.org/file26669/hack-out-test-against-MAX_UNICODE-from-cpython-3.3.patch ___ Python tracker ___ __

[issue15540] Python 3.3 and numpy

2012-08-02 Thread Dave Malcolm
New submission from Dave Malcolm: I've been trying to get numpy working with Python 3.3, and to so I had to make some changes to CPython - hence I'm posting this to the Python bug tracker. numpy pokes at the insides of PyUnicodeObject in a few places and is thus affected by the PEP 393 changes