Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-24 Thread Scott Dial
On 2/24/2011 4:02 AM, M.-A. Lemburg wrote: > I get 788,000 hits for 'latin1 -"latin-1"' on Google, > 'latin-1' gives 2,600,000 hits. Looks like it's still > the preferred way to write that encoding name. That's bogus. You can't search for "latin-1" on Google, it isn't strict enough. The third hit

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-24 Thread M.-A. Lemburg
Alexander Belopolsky wrote: > On Wed, Feb 23, 2011 at 6:32 PM, M.-A. Lemburg wrote: >> Alexander Belopolsky wrote: > .. >>> In what sense is "Latin-1" the official name? The IANA charset >>> registry has the following listing >>> >>> >>> Name: ISO_8859-1:1987[R

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-23 Thread Scott Dial
On 2/23/2011 9:19 PM, Alexander Belopolsky wrote: > On Wed, Feb 23, 2011 at 8:48 PM, Dj Gilcrease wrote: >> Google Code search limited to python >> >> latin1: 3,489 >> http://www.google.com/codesearch?hl=en&lr=&q=latin1+lang%3Apython&sbtn=Search >> latin-1: 5,604 >> http://www.google.com/codesea

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-23 Thread Alexander Belopolsky
On Wed, Feb 23, 2011 at 8:48 PM, Dj Gilcrease wrote: > Google Code search limited to python > > latin1: 3,489 > http://www.google.com/codesearch?hl=en&lr=&q=latin1+lang%3Apython&sbtn=Search > latin-1: 5,604 > http://www.google.com/codesearch?hl=en&lr=&q=latin-1+lang%3Apython&sbtn=Search > > utf8

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-23 Thread Dj Gilcrease
Google Code search limited to python latin1: 3,489 http://www.google.com/codesearch?hl=en&lr=&q=latin1+lang%3Apython&sbtn=Search latin-1: 5,604 http://www.google.com/codesearch?hl=en&lr=&q=latin-1+lang%3Apython&sbtn=Search utf8: 25,341 http://www.google.com/codesearch?hl=en&lr=&q=utf8+lang%3Ap

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-23 Thread Stephen J. Turnbull
M.-A. Lemburg writes: > "Latin-1" is short for "Latin Alphabet No. 1" [...]. > I assume that since the HTML standard used the more popular > name "Latin-1" for its definition of the default character set > and also made use of the term throughout the spec, it > became the de-facto standard n

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-23 Thread Alexander Belopolsky
On Wed, Feb 23, 2011 at 6:32 PM, M.-A. Lemburg wrote: > Alexander Belopolsky wrote: .. >> In what sense is "Latin-1" the official name?  The IANA charset >> registry has the following listing >> >> >> Name: ISO_8859-1:1987                                    [RFC1345,KXS2] >> MIBenum: 4 >> Source:

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-23 Thread M.-A. Lemburg
Alexander Belopolsky wrote: > On Wed, Feb 23, 2011 at 4:23 PM, M.-A. Lemburg wrote: > .. >> "Latin-1" is the official name and the one used internally by Python, > > In what sense is "Latin-1" the official name? The IANA charset > registry has the following listing > > > Name: ISO_8859-1:1987

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-23 Thread Ethan Furman
M.-A. Lemburg wrote: Still, the stdlib and test suite should be examples of using the correct names. I won't argue with the stdlib portion of your argument, but I would think that the best example of test code would be a complete and thorough check of all options. ~Ethan~ __

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-23 Thread Alexander Belopolsky
On Wed, Feb 23, 2011 at 5:21 PM, M.-A. Lemburg wrote: .. > If you open a ticket for this, I'll add the list of hits to > that ticket. > http://bugs.python.org/issue11303 ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/li

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-23 Thread M.-A. Lemburg
Alexander Belopolsky wrote: > On Wed, Feb 23, 2011 at 4:54 PM, M.-A. Lemburg wrote: > .. >> Yet 108 for the correct name, so I can't follow your statement >> that the wrong variant is used more often. > > Hmm, your grepping skills are probably better than mine. I get > > > $ grep -iw latin-1 Li

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-23 Thread Alexander Belopolsky
On Wed, Feb 23, 2011 at 4:23 PM, M.-A. Lemburg wrote: .. > "Latin-1" is the official name and the one used internally by Python, In what sense is "Latin-1" the official name? The IANA charset registry has the following listing Name: ISO_8859-1:1987[RFC1345,K

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-23 Thread Alexander Belopolsky
On Wed, Feb 23, 2011 at 4:54 PM, M.-A. Lemburg wrote: .. > Yet 108 for the correct name, so I can't follow your statement > that the wrong variant is used more often. Hmm, your grepping skills are probably better than mine. I get $ grep -iw latin-1 Lib/*.py | wc -l 24 and $ grep -iw lat

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-23 Thread M.-A. Lemburg
Alexander Belopolsky wrote: > On Wed, Feb 23, 2011 at 4:23 PM, M.-A. Lemburg wrote: > .. >> "Latin-1" is the official name and the one used internally by Python, >> so it would be good to have the test suite and Python code in general >> to use that variant of the name (just as "utf-8" is preferre

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-23 Thread Alexander Belopolsky
On Wed, Feb 23, 2011 at 4:23 PM, M.-A. Lemburg wrote: .. > "Latin-1" is the official name and the one used internally by Python, > so it would be good to have the test suite and Python code in general > to use that variant of the name (just as "utf-8" is preferred over > "utf8"). > > Instead of ad

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-23 Thread M.-A. Lemburg
Alexander Belopolsky wrote: > On Wed, Feb 23, 2011 at 4:07 PM, Guido van Rossum wrote: >> I'm guessing that one of these encoding names is recognized by the C >> code while the other one takes the slow path via the aliasing code. > > This is absolutely right. In fact I am going to propose adding

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-23 Thread Alexander Belopolsky
On Wed, Feb 23, 2011 at 4:07 PM, Guido van Rossum wrote: > I'm guessing that one of these encoding names is recognized by the C > code while the other one takes the slow path via the aliasing code. This is absolutely right. In fact I am going to propose adding strcmp(lower, "latin1") to the foll

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-23 Thread Guido van Rossum
I'm guessing that one of these encoding names is recognized by the C code while the other one takes the slow path via the aliasing code. On Wed, Feb 23, 2011 at 11:16 AM, Alexander Belopolsky wrote: > On Tue, Feb 22, 2011 at 11:34 PM, Jesus Cea wrote: > .. >> Issue filed. It already has a patch.

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-23 Thread Alexander Belopolsky
On Tue, Feb 22, 2011 at 11:34 PM, Jesus Cea wrote: .. > Issue filed. It already has a patch. That was fast!. Now I can sit back > waiting for 3.2.1 before touching my project again :). Mixed feelings > about the waiting. I hope it is short. It looks like you don't need delay your project: if you

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-23 Thread Nick Coghlan
On Wed, Feb 23, 2011 at 3:51 PM, Stephen J. Turnbull wrote: > Jesus Cea writes: > >  > Every time I read a message from [long, incomplete list] and >  > so many others python-devs (not an exhaustive list, if you are not >  > there, you probably should, sorry :), I feel I am faking my >  > knowledg

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-22 Thread Stephen J. Turnbull
Jesus Cea writes: > Every time I read a message from [long, incomplete list] and > so many others python-devs (not an exhaustive list, if you are not > there, you probably should, sorry :), I feel I am faking my > knowledge of Python :-). I am a pretender :). Sure. I suspect even some of tho

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-22 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 23/02/11 03:31, Stephen J. Turnbull wrote: > Please don't wait for consensus or even a second opinion to file the > issue. > > It's reasonable for a new Python user to ask whether something is a > bug or not, but if somebody with your experience an

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-22 Thread Alexander Belopolsky
On Tue, Feb 22, 2011 at 9:31 PM, Stephen J. Turnbull wrote: > Jesus Cea writes: > >  > PPS: If there is consensus that this is a real bug, I would create an >  > issue in the tracker and try to get a minimal testcase. > > All bugs are issues, but not all issues are bugs. > > Please don't wait for

[Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-22 Thread Stephen J. Turnbull
Jesus Cea writes: > PPS: If there is consensus that this is a real bug, I would create an > issue in the tracker and try to get a minimal testcase. All bugs are issues, but not all issues are bugs. Please don't wait for consensus or even a second opinion to file the issue. It's reasonable for

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-22 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 22/02/11 15:32, Eli Bendersky wrote: >> PS: Just checked... Python 3.1.3 imports the pickle just fine. So busy >> migrating my projects to 3.2 (it was my compromise two years ago :), I >> don't have time to debug this :). >> > > I hope you do have

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-22 Thread Eli Bendersky
> PS: Just checked... Python 3.1.3 imports the pickle just fine. So busy > migrating my projects to 3.2 (it was my compromise two years ago :), I > don't have time to debug this :). > I hope you do have a time to open an issue, though :-) Eli ___ Python-

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-22 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 22/02/11 13:20, Michael Foord wrote: >> Traceback (most recent call last): >>File "", line 1, in >> ValueError: operation forbidden on released memoryview object > > That seems like an odd error, but the decision was made that Python 2 > byte-s

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-22 Thread Antoine Pitrou
On Tue, 22 Feb 2011 13:14:18 +0100 Jesus Cea wrote: > > This seems to be a bug in Python 3.2. Any suggestion?. Report an issue and investigate :) Antoine. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/pyth

Re: [Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-22 Thread Michael Foord
On 22/02/2011 12:14, Jesus Cea wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have 10MB pickled structure generated in Python 2.7. I only use basic types (no clases) like sets, dictionaries, lists, strings, etc. The pickle stores a lot of strings. Some of them should be "bytes", while o

[Python-Dev] Strange error importing a Pickle from 2.7 to 3.2

2011-02-22 Thread Jesus Cea
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have 10MB pickled structure generated in Python 2.7. I only use basic types (no clases) like sets, dictionaries, lists, strings, etc. The pickle stores a lot of strings. Some of them should be "bytes", while other should be "unicode". My idea is to