Re: Python Unicode handling wins again -- mostly

2013-11-30 Thread Mark Lawrence

On 30/11/2013 02:08, Roy Smith wrote:

In article 529934dc$0$29993$c3e8da3$54964...@news.astraweb.com,
  Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:


(8) What's the uppercase of baffle spelled with an ffl ligature?

Like most other languages, Python 3.2 fails:

py 'baffle'.upper()
'BAfflE'

but Python 3.3 passes:

py 'baffle'.upper()
'BAFFLE'


I disagree.

The whole idea of ligatures like fi is purely typographic.  The crossbar
on the f (at least in some fonts) runs into the dot on the i.
Likewise, the top curl on an f run into the serif on top of the l
(and similarly for ffl).

There is no such thing as a FFL ligature, because the upper case
letterforms don't run into each other like the lower case ones do.
Thus, I would argue that it's wrong to say that calling upper() on an
ffl ligature should yield FFL.

I would certainly expect, x.lower() == x.upper().lower(), to be True for
all values of x over the set of valid unicode codepoints.  Having
u\uFB04.upper() == FFL breaks that.  I would also expect len(x) ==
len(x.upper()) to be True.



http://bugs.python.org/issue19819 talks about these beasties.  Please 
don't come back to me as I haven't got a clue!!!


--
Python is the second best programming language in the world.
But the best has yet to be invented.  Christian Tismer

Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list


Re: Managing Google Groups headaches

2013-11-30 Thread pecore
Dennis Lee Bieber wlfr...@ix.netcom.com writes:

 [NNTP] clients provide full-fledged editors
   and conversely full-fledged editors provide
   NNTP clients
-- 
https://mail.python.org/mailman/listinfo/python-list


any lib to convert 3200+ pic to animated gif?

2013-11-30 Thread oyster
I want to make an animated GIF from 3200+ png
I searched and found http://code.google.com/p/visvis/source/browse/#hg/vvmovie
and I wrote:
[code]
allPic=glob.glob('*.png')
allPic.sort()
allPic=[Image.open(i) for i in allPic]
writeGif('lala3.gif',allPic, duration=0.5, dither=0)
[/code]

However I got
[quote]
allPic=[Image.open(i) for i in allPic]
  File e:\prg\py\python-2.7.3\lib\site-packages\PIL\Image.py, line
1952, in open
fp = __builtin__.open(fp, rb)
IOError: [Errno 24] Too many open files: 'out0572.png'
[/quote]

Is there other lib for py? thanks
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: any lib to convert 3200+ pic to animated gif?

2013-11-30 Thread Chris Angelico
On Sun, Dec 1, 2013 at 1:21 AM, oyster lepto.pyt...@gmail.com wrote:
 I want to make an animated GIF from 3200+ png
 I searched and found http://code.google.com/p/visvis/source/browse/#hg/vvmovie
 and I wrote:
 allPic=glob.glob('*.png')
 allPic.sort()
 allPic=[Image.open(i) for i in allPic]
 writeGif('lala3.gif',allPic, duration=0.5, dither=0)

 However I got
 IOError: [Errno 24] Too many open files: 'out0572.png'

Yes, trying to open 3200 files is likely to be a problem!

The question is, how can you load them into memory one by one, and
keep closing them? I'm not very familiar with PIL, but a glance at the
code suggests that the Image.open() calls will create, but possibly
not verify, the images. Does this work?

images = []
for pic in allPic:
img = Image.open(pic)
img.verify()
images.append(img)
allPic = images

Use that instead of your list comprehension. In theory, at least, that
should abandon the file objects (not explicitly closing them, alas,
but abandoning them should result in them being closed in CPython), so
you ought to get them all opened and read.

Otherwise, someone with more knowledge of PIL may be able to help.
According to the PIL docs, this list may be more focussed on what
you're trying to do, so if you don't get a response here, try there:

https://mail.python.org/mailman/listinfo/image-sig

Hope that helps!

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Unicode handling wins again -- mostly

2013-11-30 Thread wxjmfauth
Le samedi 30 novembre 2013 03:08:49 UTC+1, Roy Smith a écrit :
 
 
 
 The whole idea of ligatures like fi is purely typographic.  The crossbar 
 
 on the f (at least in some fonts) runs into the dot on the i.  
 
 Likewise, the top curl on an f run into the serif on top of the l 
 
 (and similarly for ffl).
 


And do you know the origin of this typographical feature?
Because, mechanically, the dot of the i broke too often.

I cann't proof that's the truth, I read this many times in
the literature speaking about typography and about unicode.

In my opinion, a very plausible explanation.

jmf

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Unicode handling wins again -- mostly

2013-11-30 Thread Gregory Ewing

wxjmfa...@gmail.com wrote:

And do you know the origin of this typographical feature?
Because, mechanically, the dot of the i broke too often.

In my opinion, a very plausible explanation.


It doesn't sound very plausible to me, because there
are a lot more stand-alone 'i's in English text than
there are ones following an f. What is there to stop
them from breaking?

It's more likely to be simply a kerning issue. You
want to get the stems of the f and the i close together,
and the only practical way to do that with mechanical
type is to merge them into one piece of metal.

Which makes it even sillier to have an 'ffi' character
in this day and age, when you can simply space the
characters so that they overlap.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list


Re: Python Unicode handling wins again -- mostly

2013-11-30 Thread Gregory Ewing

Steven D'Aprano wrote:

On Sat, 30 Nov 2013 00:37:17 -0500, Roy Smith wrote:


So, who am I to argue with the people who decided that I needed to be
able to type a PILE OF POO character.


Blame the Japanese for that.  Apparently some of the biggest users of
Unicode are the various Japanese mobile phone manufacturers, TV stations, 
map makers and similar.


Also there's apparently a pun in Japanese involving the
words for 'poo' and 'luck'. So putting a poo symbol in
your text message means 'good luck'. Given that, it's
not *quite* as silly as it seems.

--
Best of poo,
Greg
--
https://mail.python.org/mailman/listinfo/python-list


Change a file type in Python?

2013-11-30 Thread Eamonn Rea
When opening a file, you'd say whether you want to read or write to a file. 
This is fine, but say for example later on in the program I change my mind and 
I want to write to a file instead of reading it. Yes, I could just say 'r+w' 
when opening the file, but what if I don't know if I'm going to do both? What 
if I have the user decide, and then later on I let the user change this.

Is it possible to do so without opening the file again and using the same file 
object?

Thanks!
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Unicode handling wins again -- mostly

2013-11-30 Thread Ned Batchelder

On 11/30/13 5:37 PM, Gregory Ewing wrote:

wxjmfa...@gmail.com wrote:

And do you know the origin of this typographical feature?
Because, mechanically, the dot of the i broke too often.

In my opinion, a very plausible explanation.


It doesn't sound very plausible to me, because there
are a lot more stand-alone 'i's in English text than
there are ones following an f. What is there to stop
them from breaking?

It's more likely to be simply a kerning issue. You
want to get the stems of the f and the i close together,
and the only practical way to do that with mechanical
type is to merge them into one piece of metal.

Which makes it even sillier to have an 'ffi' character
in this day and age, when you can simply space the
characters so that they overlap.



The fi ligature was created because visually, an f and i wouldn't work 
well together: the crossbar of the f was near, but not connected to the 
serif of the i, and the terminal bulb of the f was close to, but not 
coincident, with the dot of the i.


This article goes into great detail, and has a good illustration of how 
an f and i can clash, and how an fi ligature can fix the problem: 
http://opentype.info/blog/2012/11/20/whats-a-ligature/ . Note the second 
fi illustration, which demonstrates using a ligature to make the letters 
appear *less* connected than they would individually!


This is also why simply spacing the characters isn't a solution: a 
specially designed ligature looks better than a separate f and i, no 
matter how minutely kerned.


It's unfortunate that Unicode includes presentation alternatives like 
the fi (and ff, fl, ffi, and fl) ligatures.  It was done to be a 
superset of existing encodings.


Many typefaces have other non-encoded ligatures as well, especially 
display faces, which also have alternate glyphs.  Unicode is a funny mix 
in that it includes some forms of alternates, but can't include all of 
them, so we have to put up with both an ad-hoc Unicode that includes 
presentational variants, and also some other way to specify variants 
because Unicode can't include all of them.


--Ned.

--
https://mail.python.org/mailman/listinfo/python-list


Re: Change a file type in Python?

2013-11-30 Thread Chris Angelico
On Sun, Dec 1, 2013 at 9:45 AM, Eamonn Rea eamonn...@gmail.com wrote:
 Is it possible to do so without opening the file again and using the same 
 file object?

In the general sense, no, but you may be able to abuse things terribly
by calling __init__ on an existing object. The only advantage of that
would be if you have multiple references to the file object, so
normally don't - just close it and reopen. You can't change
access/share mode on the file system without closing and reopening, so
ultimately that's going to have to happen.

As a separate point, can you please use a better client than Google
Groups? It's buggy and your posts come out looking ugly. There are
other news clients, or you can sign up for the email list here:

https://mail.python.org/mailman/listinfo/python-list

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Change a file type in Python?

2013-11-30 Thread Eamonn Rea
Thanks for the help!

Ok, I'll look into the mailing list.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Unicode handling wins again -- mostly

2013-11-30 Thread Steven D'Aprano
On Sun, 01 Dec 2013 11:37:30 +1300, Gregory Ewing wrote:

 Which makes it even sillier to have an 'ffi' character in this day and
 age, when you can simply space the characters so that they overlap.

It's in Unicode to support legacy character sets that included it[1]. 
There are a bunch of similar cases:

* LATIN CAPITAL LETTER A WITH RING ABOVE versus ANGSTROM SIGN
* KELVIN SIGN versus LATIN CAPITAL LETTER A
* DEGREE CELSIUS and DEGREE FAHRENHEIT
* the whole set of full-width and half-width forms

On the other hand, there are cases which to a naive reader might look 
like needless duplication but actually aren't. For example, there are a 
bunch of visually indistinguishable characters[2] in European languages, 
like AΑА and BΒВ. The reason for this becomes more obvious[3] when you 
lowercase them:

py 'AΑА BΒВ'.lower()
'aαа bβв'

Sorting and case-conversion rules would become insanely complicated, and 
context-sensitive, if Unicode only included a single code point per thing-
that-looks-the-same.

The rules for deciding what is and what isn't a distinct character can be 
quite complex, and often politically charged. There's a lot of opposition 
to Unicode in East Asian countries because it unifies Han ideograms that 
look and behave the same in Chinese, Japanese and Korean. The reason they 
do this is for the same reason that Unicode doesn't distinguish between 
(say) English A, German A and French A. One reason some East Asians want 
it to is for the same reason you or I might wish to flag a section of 
text as English and another section of text as German, and have them 
displayed in slightly different typefaces and spell-checked with a 
different dictionary. The Unicode Consortium's answer to that is, this is 
beyond the remit of the character set, and is best handled by markup or 
higher-level formatting.

(Another reason for opposing Han unification is, let's be frank, pure 
nationalism.)



[1] As far as I can tell, the only character supported by legacy 
character sets which is not included in Unicode is the Apple logo from 
Mac charsets.

[2] The actual glyphs depends on the typeface used.

[3] Again, modulo the typeface you're using to view them.



-- 
Steven
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Unicode handling wins again -- mostly

2013-11-30 Thread Tim Chase
On 2013-12-01 00:22, Steven D'Aprano wrote:
 * KELVIN SIGN versus LATIN CAPITAL LETTER A

I should hope so ;-)

-tkc


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Change a file type in Python?

2013-11-30 Thread Steven D'Aprano
On Sat, 30 Nov 2013 14:45:18 -0800, Eamonn Rea wrote:

 When opening a file, you'd say whether you want to read or write to a
 file. This is fine, but say for example later on in the program I change
 my mind and I want to write to a file instead of reading it. Yes, I
 could just say 'r+w' when opening the file, but what if I don't know if
 I'm going to do both? What if I have the user decide, and then later on
 I let the user change this.

I'd say if you're worried about this, your program needs to be redesigned.

In general, with the exception of special purpose files like databases 
(and you're not inventing your own database, I hope) it is good clean 
programming practice to keep files open only so long as you really need 
them to be open.

- It's only possible to have open some number of files open at a 
  time. That number is typically quite large, but not *that* large. 
  Every time you open a file and keep it open, it impacts other
  programs and the operating system by a small amount.

- Particularly on Windows, once you open a file, nothing else can
  open it. That means it can't be backed up, scanned for viruses,
  opened by other programs, deleted or renamed.

- When you open a file for writing, and keep it open, the changes
  you make aren't guaranteed to be written to disk until you
  actually close the file. You can call the sync method, the
  longer you keep it open the more likely the risk of data-loss in
  the case of sudden crash or power interruption.

- To avoid data loss, you should try to avoid updating files in 
  place. If the program crashes, you could leave the file in a
  messed up state.


With very few exceptions, I recommend that you avoid this approach:

# Don't do this.
open file
read data
process in memory
write changes to file
more processing
write changes to file
more processing
write changes to file
close file
exit

in favour of this approach:

open file; read data; close file
process in memory
open file; write to file; close file
more processing
open file; write to file; close file
more processing
open file; write to file; close file
exit


 Is it possible to do so without opening the file again and using the
 same file object?

No. You cannot even re-open a file object using the same file mode. Why 
do you care? It isn't difficult to throw away the file object and create 
a new one. That part is cheap.



-- 
Steven
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Unicode handling wins again -- mostly

2013-11-30 Thread Steven D'Aprano
On Sat, 30 Nov 2013 18:52:48 -0600, Tim Chase wrote:

 On 2013-12-01 00:22, Steven D'Aprano wrote:
 * KELVIN SIGN versus LATIN CAPITAL LETTER A
 
 I should hope so ;-)


I blame my keyboard, where letters A and K are practically right next to 
each other, only seven letters apart. An easy typo to make.



-- 
Stpvpn
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Unicode handling wins again -- mostly

2013-11-30 Thread Tim Chase
On 2013-12-01 00:54, Steven D'Aprano wrote:
 On Sat, 30 Nov 2013 18:52:48 -0600, Tim Chase wrote:
 
  On 2013-12-01 00:22, Steven D'Aprano wrote:  
  * KELVIN SIGN versus LATIN CAPITAL LETTER A  
  
  I should hope so ;-)  
 
 
 I blame my keyboard, where letters A and K are practically right
 next to each other, only seven letters apart. An easy typo to make.
 
 
 
 -- 
 Stpvpn

I suppose I should have modified my attribution-quote to read Steven
D'Kprano wrote then :-)

-tkc



-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Unicode handling wins again -- mostly

2013-11-30 Thread Chris Angelico
On Sun, Dec 1, 2013 at 11:54 AM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
 On Sat, 30 Nov 2013 18:52:48 -0600, Tim Chase wrote:

 On 2013-12-01 00:22, Steven D'Aprano wrote:
 * KELVIN SIGN versus LATIN CAPITAL LETTER A

 I should hope so ;-)


 I blame my keyboard, where letters A and K are practically right next to
 each other, only seven letters apart. An easy typo to make.

“It’s an easy mistake to make” the PFY concurs “Many’s the time I’ve
picked up a cattle prod thinking it was a lint remover as I’ve helped
groom one of your predecessors before an important board meeting about
slashing the IT budget.”

http://www.theregister.co.uk/2010/11/26/bofh_2010_episode_18/

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Unicode handling wins again -- mostly

2013-11-30 Thread Roy Smith
In article mailman.3431.1385860444.18130.python-l...@python.org,
 Chris Angelico ros...@gmail.com wrote:

 On Sun, Dec 1, 2013 at 11:54 AM, Steven D'Aprano
 steve+comp.lang.pyt...@pearwood.info wrote:
  On Sat, 30 Nov 2013 18:52:48 -0600, Tim Chase wrote:
 
  On 2013-12-01 00:22, Steven D'Aprano wrote:
  * KELVIN SIGN versus LATIN CAPITAL LETTER A
 
  I should hope so ;-)
 
 
  I blame my keyboard, where letters A and K are practically right next to
  each other, only seven letters apart. An easy typo to make.
 
 “It’s an easy mistake to make” the PFY concurs “Many’s the time 
 I’ve
 picked up a cattle prod thinking it was a lint remover as I’ve helped
 groom one of your predecessors before an important board meeting about
 slashing the IT budget.”
 
 http://www.theregister.co.uk/2010/11/26/bofh_2010_episode_18/
 
 ChrisA

What means PFY?  The only thing I can think of is Poor F---ing 
Yankee :-)
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python Unicode handling wins again -- mostly

2013-11-30 Thread Chris Angelico
On Sun, Dec 1, 2013 at 12:27 PM, Roy Smith r...@panix.com wrote:
 http://www.theregister.co.uk/2010/11/26/bofh_2010_episode_18/

 ChrisA

 What means PFY?  The only thing I can think of is Poor F---ing
 Yankee :-)

In the context of the BOFH, it stands for Pimply-Faced Youth and means
BOFH's assistant.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python project

2013-11-30 Thread Jason Friedman
 To be perfectly honest, this is much too large a project for you.  First
 read some python tutorials and learn how to code in python.  If you work it
 every day, maybe you can kind of understand what its about in a very
 superficial sense in a month.  However, if you are having fun learning, then
 add a new small piece to learn.

Joel may be too pessimistic.

The OP (Richard) says he wants to create an online city guide start
with my own city.  I could see that as being anything from a few
simple HTML pages all the way to a database-backed Django site.  Is
there an example of a guide to someone else's city that you are trying
to emulate?  If yes, reply with the link/s.  If no, and because you
know HTML, can you create a mock-up of what you would like your end
result to look like, and then share those links with us?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Change a file type in Python?

2013-11-30 Thread rusi
On Sunday, December 1, 2013 5:34:11 AM UTC+5:30, Eamonn Rea wrote:
 Thanks for the help!

 Ok, I'll look into the mailing list.

[Assuming you are using GG with firefox on linux]

All you need to do is
1. Install 'Its all text' FF addon
2. Point the 'editor' of 'Its all text' to the below python script

After that, a small new edit button will appear outside the text-box and its 
one-click solution

-Python Script--
#!/usr/bin/env python3

# As far as I know both python2 and 3 work
# Windows/Mac no idea :-)

# A script to drop-in as an editor for firefox addon Its all text
# It cleans up two google-group nuisances:
# 1. Useless blank lines
# 2. Excessively long lines
# No efforts at error reporting as stderr is not available in any
# easy way (I know) to firefox (other browsers?)
# To test separately:
# Compose a mail (preferably reply) in GG
# Copy-paste the stuff (maybe with some long lines added without the )
# Run this script with that filename as argv[1]

from sys import argv
from re import sub
import re

# Clean double spacing
def cleands(s):
# Assumption: ASCII 025 (NAK) never occurs in input
s1 = sub(^ *\n *$, \025  , s , flags=re.M)
s2 = sub(^ *\n,   , s1, flags=re.M)
s3 = sub(\025\n, \n   , s2, flags=re.M)
return s3

# Maximum length that (new) lines should attain
Maxlen = 75

# clean all long lines, s is the whole file/text
def cleanall_ll(s):
lines = (cleanll(l) for l in s.split(\n))
return \n.join(lines)

# clean one long line
def cleanll(line):
return ( line if line.startswith() else cleanll_rec(line) )

def cleanll_rec(line):
if len(line) = Maxlen : return line
pos = line.rfind( , 0, Maxlen)
if pos == -1 : #Failed due to no spaces
return line
return line[0:pos] + \n + cleanll_rec(line[pos+1: ])

def clean(s):
return cleanall_ll(cleands(s))

def main():
with open(argv[1])  as f: s = f.read()
with open(argv[1], w) as f: f.write(clean(s))

if __name__ == '__main__' :
main()
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Change a file type in Python?

2013-11-30 Thread Chris Angelico
On Sun, Dec 1, 2013 at 2:02 PM, rusi rustompm...@gmail.com wrote:
 On Sunday, December 1, 2013 5:34:11 AM UTC+5:30, Eamonn Rea wrote:
 Thanks for the help!

 Ok, I'll look into the mailing list.

 [Assuming you are using GG with firefox on linux]

 All you need to do is
 1. Install 'Its all text' FF addon
 2. Point the 'editor' of 'Its all text' to the below python script

 After that, a small new edit button will appear outside the text-box and its 
 one-click solution

Yeah I still think it's a lot easier to switch to a properly-working
system. What you're suggesting still doesn't wrap text properly, as
evidenced by your above over-long line.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Change a file type in Python?

2013-11-30 Thread rusi
On Sunday, December 1, 2013 8:52:03 AM UTC+5:30, Chris Angelico wrote:
 On Sun, Dec 1, 2013 at 2:02 PM, rusi wrote:
  On Sunday, December 1, 2013 5:34:11 AM UTC+5:30, Eamonn Rea wrote:
  Thanks for the help!
 
  Ok, I'll look into the mailing list.
 
  [Assuming you are using GG with firefox on linux]
 
  All you need to do is
  1. Install 'Its all text' FF addon
  2. Point the 'editor' of 'Its all text' to the below python script
 
  After that, a small new edit button will appear outside the text-box and 
  its one-click solution

 What you're suggesting still doesn't wrap text properly, as
 evidenced by your above over-long line.

 ChrisA

Ok my bad. I offered a 1-click solution, but did 0 clicks :-)
Strictly speaking one needs anywhere between one and two clicks for this
to work properly.  My profuse apologies for the improper and illegitimate
round-down wink

 Yeah I still think it's a lot easier to switch to a properly-working
 system. 

Of course -- if 1.something clicks are too onerous, you are free not to use
it :-)

More seriously this discussion completely misses the point.

I think we are dealing with 3 completely separable problems:
[Slightly changing what I earlier wrote…]

1. Undesirable elements -- spam, troll and more exotic
2. Immature noobs -- literally or almost literally kids
3. Stupid technology -- in this case, GG

The anti-GG crusade is getting pissed-off with 1 and/or 2 and then 
attacking 3.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Change a file type in Python?

2013-11-30 Thread Chris Angelico
On Sun, Dec 1, 2013 at 3:58 PM, rusi rustompm...@gmail.com wrote:
 I think we are dealing with 3 completely separable problems:
 [Slightly changing what I earlier wrote…]

 1. Undesirable elements -- spam, troll and more exotic
 2. Immature noobs -- literally or almost literally kids
 3. Stupid technology -- in this case, GG

 The anti-GG crusade is getting pissed-off with 1 and/or 2 and then
 attacking 3.

Most of it is getting annoyed at the results of 3, and then attacking
3. That's what I do, at least. There have been several people who've
switched to email as a result of being told that their posts are
coming out looking ugly; their posts subsequently are NOT ugly, and
they always had useful content in them, so they become productive and
highly welcome members of the community without being masked behind
buggy technology. Nothing to do with immaturity or spam.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue19728] PEP 453: enable pip by default in the Windows binary installers

2013-11-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a0ec33efa743 by Nick Coghlan in branch 'default':
Issue #19728: don't be sensitive to line endings
http://hg.python.org/cpython/rev/a0ec33efa743

--

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



[issue19726] BaseProtocol is not an ABC

2013-11-30 Thread Rhonda Parker

Rhonda Parker added the comment:

T0 the people that manipulate universe of linux and unix based protocol should 
take in consideration when people skilled programming introduce downloads and 
install protocol to those unskilled in the like because it only creates a 
disassociation resulting in the majority to lean towards those who capitalize 
on the ignorant, creating products for the simple minded at the price of 
integrity and freedom to those who are swayed to such ends.  I just wish linux 
snobs would understand that so many are behind them.  They just have to open 
there arms and accept the ignorant... Just to explain my rant, I have 8 
different programs to install to make one program to work and all but python 
and one other are simple and currently inastalled.  All so my 2 year old can 
play games...

--
nosy: +Rhonda.Parker
versions: +Python 3.5 -Python 3.4

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



[issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS

2013-11-30 Thread Claudiu.Popa

New submission from Claudiu.Popa:

Hi!

test_touch_common fails when using 8.3-STABLE FreeBSD 8.3-STABLE and Python 
3.4.0b1 (default:a0ec33efa743+, Nov 30 2013, 10:36:58). 

Here are the tracebacks:


==
FAIL: test_touch_common (test.test_pathlib.PathTest)
--
Traceback (most recent call last):
  File /tank/libs/cpython/Lib/test/test_pathlib.py, line 1402, in 
test_touch_common
self.assertGreaterEqual(st.st_mtime_ns, old_mtime_ns)
AssertionError: 13858006320 not greater than or equal to 
1385800632871814968

==
FAIL: test_touch_common (test.test_pathlib.PosixPathTest)
--
Traceback (most recent call last):
  File /tank/libs/cpython/Lib/test/test_pathlib.py, line 1402, in 
test_touch_common
self.assertGreaterEqual(st.st_mtime_ns, old_mtime_ns)
AssertionError: 13858006330 not greater than or equal to 
1385800633042814928

--
Ran 319 tests in 0.368s

FAILED (failures=2, skipped=85)
test test_pathlib failed
1 test failed:
test_pathlib

This issue seems to be related with issue15745.

--
components: Tests
messages: 204786
nosy: Claudiu.Popa
priority: normal
severity: normal
status: open
title: test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with 
ZFS
type: behavior
versions: Python 3.4

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



[issue19726] BaseProtocol is not an ABC

2013-11-30 Thread Alexandre Vassalotti

Changes by Alexandre Vassalotti alexan...@peadrop.com:


--
Removed message: http://bugs.python.org/msg204785

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



[issue19828] test_site fails with -S flag

2013-11-30 Thread R. David Murray

R. David Murray added the comment:

See also issue 1674555, which aims to make test_site run without -S and 
everything else run with -S.  I think this issue is invalid, if I understand 
what you wrote correctly, since test_site *should* be reported as a skipped 
test if -S is specified.

--
nosy: +r.david.murray

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



[issue19830] test_poplib emits resource warning

2013-11-30 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
components: +email
nosy: +barry, r.david.murray

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



[issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS

2013-11-30 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +pitrou

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



[issue19088] TypeError with pickle in embedded python3.3 when starting multiple Interpreters.

2013-11-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 96d1207d33d0 by Alexandre Vassalotti in branch '3.3':
Issue #19088: Fix incorrect caching of the copyreg module.
http://hg.python.org/cpython/rev/96d1207d33d0

New changeset 1ceb6f84b617 by Alexandre Vassalotti in branch 'default':
Issue #19088: Merge with 3.3.
http://hg.python.org/cpython/rev/1ceb6f84b617

--
nosy: +python-dev

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



[issue10203] sqlite3.Row doesn't support sequence protocol

2013-11-30 Thread Claudiu.Popa

Claudiu.Popa added the comment:

Hello! Here's a simple patch which makes sqlite.Row to act like a real sequence.

--
keywords: +patch
nosy: +Claudiu.Popa
versions: +Python 3.5 -Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file32902/sqlite1.patch

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



[issue11854] __or__ et al instantiate subclass of set without calling __init__

2013-11-30 Thread Mark Dickinson

Mark Dickinson added the comment:

Closing.  This isn't likely to change in Python 2.7.

--
resolution:  - wont fix
status: open - closed

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



[issue19088] TypeError with pickle in embedded python3.3 when starting multiple Interpreters.

2013-11-30 Thread Alexandre Vassalotti

Changes by Alexandre Vassalotti alexan...@peadrop.com:


--
assignee:  - alexandre.vassalotti
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed

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



[issue19638] dtoa: conversion from '__int64' to 'int', possible loss of data

2013-11-30 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
status: open - closed

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



[issue19808] IDLE applies syntax highlighting to user input in its shell

2013-11-30 Thread Peter Otten

Peter Otten added the comment:

I think the prompt can easily be treated differently because it is written to 
stderr. 
I don't see a difference for user input between input() and raw_input() on 
Linux with Python 2.7.2+ -- syntax-highlighting is applied to both.

--

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



[issue19506] subprocess.communicate() should use a memoryview

2013-11-30 Thread Charles-François Natali

Charles-François Natali added the comment:

Could someone with a dual-core machine try the attached simplistic
benchmark with and without Victor's patch?
I can see some user-time difference with 'time' on my single-core
machine, but I'm curious to see how this would affect things were both
the parent and the child subprocess can run concurrently.

--
Added file: http://bugs.python.org/file32903/test_sub.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19506
___import subprocess
from time import perf_counter as time


DATA = b'x' * 200 * 1024**2


p = subprocess.Popen(['cat'], stdin=subprocess.PIPE,
 stdout=subprocess.DEVNULL, stderr=subprocess.PIPE)
t = time()
p.communicate(DATA)
print(time() - t)
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19839] bz2: regression wrt supporting files with trailing garbage after EOF

2013-11-30 Thread Fabio Erculiani

New submission from Fabio Erculiani:

In Sabayon Linux and Gentoo Linux, distro package metadata is appended at the 
end of bz2 files. Python 2.7, 3.1, 3.2 bz2 modules were handling the following 
attached file just fine, trailing garbage was simply ignored like the bunzip2 
utility does.

example test code:
f = bz2.BZ2File(path, mode=rb)
data = f.read(1024)
while data:
data = f.read(1024)
f.close()

The following code doesn't work with Python 3.3.3 anymore, at some point I 
receive the following exception (that comes from the bz2 module C code):

  File /usr/lib64/python3.3/bz2.py, line 278, in read
return self._read_block(size)
  File /usr/lib64/python3.3/bz2.py, line 239, in _read_block
while n  0 and self._fill_buffer():
  File /usr/lib64/python3.3/bz2.py, line 203, in _fill_buffer
self._buffer = self._decompressor.decompress(rawblock)
OSError: Invalid data stream

Please restore the compatibility with bz2 files with trailing garbage after EOF.

--
components: Library (Lib)
files: sys-libs:zlib-1.2.3-r1~1.tbz2
messages: 204793
nosy: Fabio.Erculiani
priority: normal
severity: normal
status: open
title: bz2: regression wrt supporting files with trailing garbage after EOF
versions: Python 3.3
Added file: http://bugs.python.org/file32904/sys-libs:zlib-1.2.3-r1~1.tbz2

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



[issue19839] bz2: regression wrt supporting files with trailing garbage after EOF

2013-11-30 Thread Fabio Erculiani

Changes by Fabio Erculiani lx...@sabayonlinux.org:


--
type:  - crash

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



[issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS

2013-11-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I don't really know what to do with this. I think you'll have to investigate a 
bit and find out exactly what happens during the test.

--

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



[issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS

2013-11-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

As a data point, if not for ZFS, test_pathlib passes on FreeBSD 6.4:
http://buildbot.python.org/all/builders/x86%20FreeBSD%206.4%203.x/builds/4261/steps/test/logs/stdio
and FreeBSD 7.2:
http://buildbot.python.org/all/builders/x86%20FreeBSD%207.2%203.x/builds/4731/steps/test/logs/stdio

--

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



[issue19088] TypeError with pickle in embedded python3.3 when starting multiple Interpreters.

2013-11-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thanks for the fix. Perhaps you could have added some tests for this?

--

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



[issue19839] bz2: regression wrt supporting files with trailing garbage after EOF

2013-11-30 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
nosy: +nadeem.vawda, serhiy.storchaka
type: crash - behavior
versions: +Python 3.4

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



[issue19506] subprocess.communicate() should use a memoryview

2013-11-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

On a quad-core machine:

- without Victor's patch:

$ time ./python test_sub.py 
0.3926395702847

real0m0.521s
user0m0.412s
sys 0m0.238s

- with Victor's patch:

$ time ./python test_sub.py 
0.3856174530001226

real0m0.516s
user0m0.404s
sys 0m0.247s

--

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



[issue19780] Pickle 4 frame headers optimization

2013-11-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

While the speedup may be nice, I still don't think this optimization complies 
with the protocol definition in the PEP, so I would like to reject this patch.

--
resolution:  - rejected
stage: patch review - committed/rejected
status: open - pending

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



[issue10976] json.loads() raises TypeError on bytes object

2013-11-30 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +ncoghlan

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



[issue17909] Autodetecting JSON encoding

2013-11-30 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +ncoghlan

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



[issue19837] Wire protocol encoding for the JSON module

2013-11-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Still, JSON itself is not a wire protocol; HTTP is. http://www.json.org states 
that JSON is a text format and the grammar description talks UNICODE 
characters, not bytes. The ECMA spec states that JSON text is a sequence of 
Unicode code points.

RFC 4627 is a bit more affirmative, though, and says that JSON text SHALL be 
encoded in Unicode [sic]. The default encoding is UTF-8.

Related issues:
- issue #10976: json.loads() raises TypeError on bytes object
- issue #17909 (+ patch!): autodetecting JSON encoding

 The other simple solution would be to add nameb variants of the affected 
 APIs.

dumpb is not very pretty and can easily be misread as dumb :-)
dump_bytes looks better to me.

--
nosy: +pitrou

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



[issue19506] subprocess.communicate() should use a memoryview

2013-11-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Best of 10 runs.

Unpatched:  3.91057508099766
Patched:3.86466505300632

--

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



[issue19726] BaseProtocol is not an ABC

2013-11-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 Well, it *is* abstract because it has no implementations and all the
 methods raise NotImplementedError.

Hmm, actually, the methods don't raise NotImplementedError, they just have 
default empty implementations.

--

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



[issue19830] test_poplib emits resource warning

2013-11-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also http://permalink.gmane.org/gmane.comp.python.devel/143803 in which 
Victor had found a place of the leak.

--
nosy: +serhiy.storchaka

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



[issue19789] Improve wording of how to undo a call to logging.disable(lvl)

2013-11-30 Thread Vinay Sajip

Vinay Sajip added the comment:

It's not the docstring in the code, it's the actual documentation. I propose to 
change it so that the documentation for disable will read:

Provides an overriding level *lvl* for all loggers which takes precedence over 
the logger's own level. When the need arises to temporarily throttle logging 
output down across the whole application, this function can be useful. Its 
effect is to disable all logging calls of severity *lvl* and below, so that if 
you call it with a value of INFO, then all INFO and DEBUG events would be 
discarded, whereas those of severity WARNING and above would be processed 
according to the logger's effective level. If 
``logging.disable(logging.NOTSET)`` is called, it effectively removes this 
overriding level, so that logging output again depends on the effective levels 
of individual loggers.

Please confirm if this is still not clear enough, otherwise I will commit this 
in a day or two and close the issue.

--
versions: +Python 2.7, Python 3.3, Python 3.4

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



[issue19839] bz2: regression wrt supporting files with trailing garbage after EOF

2013-11-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

decompress() is affected too.

 import bz2
 bz2.decompress(bz2.compress(b'abcd') + b'xyz')
Traceback (most recent call last):
  File stdin, line 1, in module
  File /home/serhiy/py/cpython/Lib/bz2.py, line 505, in decompress
results.append(decomp.decompress(data))
OSError: Invalid data stream

On 3.2 it returns b'abcd'.

--

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



[issue19837] Wire protocol encoding for the JSON module

2013-11-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I propose close this issue as a duplicate of issue10976.

--
nosy: +serhiy.storchaka

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



[issue19683] test_minidom has many empty tests

2013-11-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Rather than removing these empty tests it will be better implement them. 
Otherwise we can accidentally break the code.

I see a lot of empty tests on 3.x.

--
nosy: +serhiy.storchaka

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



[issue19808] IDLE applies syntax highlighting to user input in its shell

2013-11-30 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
versions: +Python 2.7

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



[issue19840] The is no way to tell shutil.move to ignore metadata

2013-11-30 Thread zodalahtathi

New submission from zodalahtathi:

shutil.move sometimes fail when the underlining filesystem has limitations.

Here is a part of a stacktrace I'm getting :

  File /usr/local/lib/python3.3/shutil.py, line 534, in move
copy2(src, real_dst)
  File /usr/local/lib/python3.3/shutil.py, line 244, in copy2
copystat(src, dst, follow_symlinks=follow_symlinks)
  File /usr/local/lib/python3.3/shutil.py, line 192, in copystat
lookup(chmod)(dst, mode, follow_symlinks=follow)
OSError: [Errno 38]

This behaviour is expected because shutil.move uses shutil.copy2 under the hood 
to copy file data and metadata.

However there is no way to tell shutil.move to use shutil.copy and to ignore 
metadata.

Maybe a new copy_metadata parameter (defaulting to True) or copy_function (like 
in shutil.copytree) would be an elegant solution?

--
components: Library (Lib)
messages: 204807
nosy: zodalahtathi
priority: normal
severity: normal
status: open
title: The is no way to tell shutil.move to ignore metadata
type: enhancement
versions: Python 3.3

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



[issue19841] ConfigParser PEP issues

2013-11-30 Thread Ivailo Monev

New submission from Ivailo Monev:

There are a few PEP violations like namespace clashes, the attached patch fixes 
some of them thus solving a problem for me where shared library build with 
Nuitka segmentation faults. The patch does not make the code backwards 
compatible with the vars and map arguments renames as there is no way to do 
that and maybe the new variable names, vvars and mmap are not appropriate but 
you can roll your own patch with the same idea.

Cheers!

--
components: Library (Lib)
files: ConfigParser.patch
keywords: patch
messages: 204808
nosy: Ivailo.Monev
priority: normal
severity: normal
status: open
title: ConfigParser PEP issues
versions: Python 2.7
Added file: http://bugs.python.org/file32905/ConfigParser.patch

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



[issue19842] selectors: refactor BaseSelector implementation

2013-11-30 Thread Charles-François Natali

New submission from Charles-François Natali:

Initially, BaseSelector was simply designed as the base implementation used by 
concrete ones like SelectSelector  Co.

Then BaseSelector evolved to be an ABC, but the problem is that it's really not 
usable as such: the register() and unregister() methods are not abstract, and 
instead store the fileobj - key association in a private dictionary 
(_fd_to_key). Since this attribute is private, it cannot be used by third-party 
selectors implementation which might want to implement the ABC. Also, such 
implementations might not want to use a dictionay internally, and generally, 
inheritance should be avoided in this type of situations (since it breaks 
encapsulation).

In short, BaseSelector mixes up the type definition (ABC) and base 
implementation, which cannot be reused by subclasses anyway.

The attached patch cleans things up by making 
BaseSelector.{register,unregister,get_map} methods abstract (raising 
NotImplementedError by default).
Together with select(), those methods are the bare minimum that a conform 
selector implementation should provide.
get_key() still has a default implementation (atop get_map()), and so does 
modify() (atop register()/unregister()).

The concrete base implementation (on top of which are built SelectSelector  
friends) is moved in a private _BaseSelectorImpl.

I think that's a cleaner design.

The only problem is that it makes some methods abstract, so I had to update 
test_telnetlib and asyncio/test_utils because they are implementing 
BaseSelector for mock tests.

BTW, is there a consensus on ABC names? Like AbstractSelector vs BaseSelector?

--
components: Library (Lib)
files: selectors_base_impl.diff
keywords: needs review, patch
messages: 204809
nosy: gvanrossum, neologix, pitrou
priority: normal
severity: normal
stage: patch review
status: open
title: selectors: refactor BaseSelector implementation
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file32906/selectors_base_impl.diff

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



[issue10976] json.loads() raises TypeError on bytes object

2013-11-30 Thread Nick Coghlan

Nick Coghlan added the comment:

Issue 19837 is the complementary problem on the serialisation side - users 
migrating from Python 2 are accustomed to being able to use the json module 
directly as a wire protocol module, but the strict Python 3 interpretation as a 
text transform means that isn't possible - you have to apply the text encoding 
step separately.

What appears to have happened is that the way JSON is used in practice has 
diverged from JSON as a formal spec.

Formal spec (this is what the Py3k JSON module implements, and Py2 implements 
with ensure_ascii=False): JSON is a Unicode text transform, which may 
optionally be serialised as UTF-8, UTF-16 or UTF-32.

Practice (what the Py2 JSON module implements with ensure_ascii=True, and what 
is covered in RFC 4627): JSON is a UTF-8 encoded wire protocol

So now we're left with the options:

- try to tweak the existing json APIs to handle both the str-str and 
str-bytes use cases (ugly)
- add new APIs within the existing json module
- add a new jsonb module, which dumps to UTF-8 encoded bytes, and reads from 
UTF-8, UTF-16 or UTF-32 encoded bytes in accordance with RFC 4627 (but being 
more tolerant in terms of what is allowed at the top level)

I'm currently leaning towards the jsonb module option, and deprecating the 
encoding argument in the pure text version. It's not pretty, but I think it's 
better than the alternatives.

--
versions: +Python 3.5 -Python 3.3

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



[issue19837] Wire protocol encoding for the JSON module

2013-11-30 Thread Nick Coghlan

Nick Coghlan added the comment:

Not sure yet if we should merge the two issues, although they're the 
serialisation and deserialisation sides of the same problem.

Haskell seems to have gone with the approach of a separate jsonb API for the 
case where you want the wire protocol behaviour, such a solution may work for 
us as well.

--

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



[issue19842] selectors: refactor BaseSelector implementation

2013-11-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I'm wondering, is there a reason we made BaseSelector a public API?

--

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



[issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS

2013-11-30 Thread koobs

koobs added the comment:

Is this similar/related to #15745?

I took both of my buildbots (koobs-freebsd9, koobs-freebsd10) off ZFS until it 
could be resolved

--
nosy: +koobs

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



[issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS

2013-11-30 Thread koobs

koobs added the comment:

Sorry Claudiu I missed the issue reference in your comment

--

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



[issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS

2013-11-30 Thread Claudiu.Popa

Claudiu.Popa added the comment:

I believe it's similar, both test_os and test_pathlib fails when executed from 
within a ZFS container. I checked, I did a fresh checkout of Python inside a 
normal directory and run the tests there, they ran without problems.

--

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



[issue18885] handle EINTR in the stdlib

2013-11-30 Thread Charles-François Natali

Charles-François Natali added the comment:

Alright, here's a first step: select/poll/epoll/etc now return empty
lists/tuples upon EINTR. This comes with tests (note that all those tests
could probably be factored, but that's another story).

--
keywords: +needs review, patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file32907/select_eintr.diff

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



[issue19842] selectors: refactor BaseSelector implementation

2013-11-30 Thread Charles-François Natali

Charles-François Natali added the comment:

 I'm wondering, is there a reason we made BaseSelector a public API?

The idead was to have an ABC so that users can implement their own
selector, and pass it to e.g. asyncio or anything alse expecting a
selector.
Other than that, the only use is as a documentation (i.e. to show
which methods are supported by all selectors implementations).

--

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



[issue16404] Uses of PyLong_FromLong that don't check for errors

2013-11-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch. arraymodule.c is already fixed. Instead I found other bug in 
sysmodule.c. I'm not sure about extending.rst, PyLong_FromLong(0L) should never 
fail if NSMALLNEGINTS + NSMALLPOSINTS  0.

--
keywords: +patch
stage: needs patch - patch review
versions:  -Python 3.2
Added file: http://bugs.python.org/file32908/issue16404.patch

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



[issue19842] selectors: refactor BaseSelector implementation

2013-11-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 The idead was to have an ABC so that users can implement their own
 selector, and pass it to e.g. asyncio or anything alse expecting a
 selector.
 Other than that, the only use is as a documentation (i.e. to show
 which methods are supported by all selectors implementations).

The problem for documentation use is that we're christening it as an
official API, and thus it becomes more difficult to refactor the
inheritance hierarchy.

--

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



[issue19837] Wire protocol encoding for the JSON module

2013-11-30 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


--
nosy: +barry

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



[issue19842] selectors: refactor BaseSelector implementation

2013-11-30 Thread Charles-François Natali

Charles-François Natali added the comment:

 The problem for documentation use is that we're christening it as an
 official API, and thus it becomes more difficult to refactor the
 inheritance hierarchy.

So what would you suggest?

--

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



[issue19842] selectors: refactor BaseSelector implementation

2013-11-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

  The problem for documentation use is that we're christening it as an
  official API, and thus it becomes more difficult to refactor the
  inheritance hierarchy.
 
 So what would you suggest?

Hmmm... Well I guess your proposal makes sense :-) Aka. having a
documented ABC, and then a private base implementation.

Otherwise, you can also document the methods without saying precisely to
which class they belong, which I started doing on asyncio, but
apparently it confuses some people.

--

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



[issue16404] Uses of PyLong_FromLong that don't check for errors

2013-11-30 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


Removed file: http://bugs.python.org/file32908/issue16404.patch

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



[issue18643] implement socketpair() on Windows

2013-11-30 Thread Charles-François Natali

Charles-François Natali added the comment:

Here's a patch adding socketpair to test.support.

This version has been used in test_selectors for quite some time now,
and would probably be useful for other tests as well.

--
Added file: http://bugs.python.org/file32909/socketpair-1.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18643
___diff -r a1a936a3b2f6 Lib/test/support/__init__.py
--- a/Lib/test/support/__init__.py  Fri Nov 29 18:57:47 2013 +0100
+++ b/Lib/test/support/__init__.py  Sat Nov 30 16:35:41 2013 +0100
@@ -90,6 +90,7 @@
 is_jython, check_impl_detail,
 # network
 HOST, IPV6_ENABLED, find_unused_port, bind_port, 
open_urlresource,
+socketpair,
 # processes
 'temp_umask', reap_children,
 # logging
@@ -610,6 +611,31 @@
 port = sock.getsockname()[1]
 return port
 
+if hasattr(socket, 'socketpair'):
+socketpair = socket.socketpair
+else:
+def socketpair(family=socket.AF_INET, type=socket.SOCK_STREAM, proto=0):
+Ad-hoc socketpair implementation.
+if family != socket.AF_INET:
+raise ValueError(Invalid family: {r}.format(family))
+
+with socket.socket(family, type, proto) as l:
+l.bind((HOST, 0))
+l.listen(16)
+c = socket.socket(family, type, proto)
+try:
+c.connect(l.getsockname())
+caddr = c.getsockname()
+while True:
+a, addr = l.accept()
+# check that we've got the correct client
+if addr == caddr:
+return c, a
+a.close()
+except error:
+c.close()
+raise
+ 
 def _is_ipv6_enabled():
 Check whether IPv6 is enabled on this host.
 if socket.has_ipv6:
diff -r a1a936a3b2f6 Lib/test/test_support.py
--- a/Lib/test/test_support.py  Fri Nov 29 18:57:47 2013 +0100
+++ b/Lib/test/test_support.py  Sat Nov 30 16:35:41 2013 +0100
@@ -89,6 +89,17 @@
 s.listen(1)
 s.close()
 
+def test_socketpair(self):
+c, s = support.socketpair()
+self.addCleanup(c.close)
+self.addCleanup(s.close)
+c.send(b'spam')
+self.assertEqual(b'spam', s.recv(1024))
+s.send(b'foo')
+self.assertEqual(b'foo', c.recv(1024))
+c.close()
+self.assertFalse(s.recv(1024))
+
 # Tests for temp_dir()
 
 def test_temp_dir(self):
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16404] Uses of PyLong_FromLong that don't check for errors

2013-11-30 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
components:  -Documentation, Interpreter Core
Added file: http://bugs.python.org/file32910/issue16404.patch

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



[issue19842] selectors: refactor BaseSelector implementation

2013-11-30 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


--
nosy: +giampaolo.rodola

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



[issue19834] Unpickling exceptions pickled by Python 2

2013-11-30 Thread Walter Dörwald

Walter Dörwald added the comment:

OK, here is a patch. Instead of mapping the exceptions module to builtins, it 
does the mapping for each exception class separately. I've excluded 
StandardError, because I think there's no appropriate equivalent in Python 3.

--
keywords: +patch
Added file: http://bugs.python.org/file32911/python-2-exception-pickling.diff

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



[issue19843] Wait for multiple sub-processes to terminate

2013-11-30 Thread Giampaolo Rodola'

New submission from Giampaolo Rodola':

I recently implemented this in psutil and thought it would have been a nice 
addition for subprocess module as well:
https://code.google.com/p/psutil/issues/detail?id=440

Patch in attachment introduces a new subprocess.wait_procs() utility function 
which waits for multiple processes (Popen instances) to terminate.
The use case this covers is quote common: send SIGTERM to a list of processes, 
wait for them to terminate, send SIGKILL as last resort:


 def on_terminate(proc):
... print(process {} terminated.format(proc))
...
 for p in procs:
...p.terminate()
...
 gone, still_alive = wait_procs(procs, timeout=3, callback=on_terminate)
 for p in still_alive:
... p.kill()


Are we still in time for Python 3.4?

--
files: wait_procs.patch
keywords: patch
messages: 204824
nosy: giampaolo.rodola
priority: normal
severity: normal
status: open
title: Wait for multiple sub-processes to terminate
versions: Python 3.4
Added file: http://bugs.python.org/file32912/wait_procs.patch

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



[issue18885] handle EINTR in the stdlib

2013-11-30 Thread koobs

Changes by koobs koobs.free...@gmail.com:


--
nosy: +koobs

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



[issue17397] ttk::themes missing from ttk.py

2013-11-30 Thread klappnase

klappnase added the comment:

 What is your real name?
Michael Lange
 What should I add in the Misc/ACKS file?
Hmm, personally I'd prefer the nick, but it seems to be common practice to use 
the real name; I think I'll leave it to you ;)

--

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



[issue19844] os.path.split fails on windows path

2013-11-30 Thread Hanz Kanst

Changes by Hanz Kanst bohemi...@gmail.com:


--
components: Windows
nosy: Hanz
priority: normal
severity: normal
status: open
title: os.path.split fails on windows path
type: behavior
versions: Python 3.3

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



[issue19844] os.path.split fails on windows path

2013-11-30 Thread Hanz Kanst

New submission from Hanz Kanst:

os.path.split fails on windows path
to reproduce in python 3.3:

file = C:\progs\python\test\target\Amy Winehouse\Amy Winehouse - Back To Black 
(2006)\01 - Rehab.ogg
os.path.split(os.path.abspath(file))[0]
returns
'C:\\progs\\python\testordner\target\\Amy Winehouse'
and
os.path.split(os.path.abspath(file))[1]
returns
'Amy Winehouse - Back To Black (2006)\x01 - Rehab.ogg'

According to the definition the tail should never contain a tail.

--

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



[issue19844] os.path.split fails on windows path

2013-11-30 Thread Hanz Kanst

Hanz Kanst added the comment:

According to the definition the tail should never contain a slash.

--

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



[issue19844] os.path.split fails on windows path

2013-11-30 Thread SilentGhost

SilentGhost added the comment:

file must be a raw string:

file = r'C:\progs\python'

Then everthing works.

--
nosy: +SilentGhost
resolution:  - invalid

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



[issue17397] ttk::themes missing from ttk.py

2013-11-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Now CPython trunk in feature freeze stage until 3.4 realease. So we should wait 
several months before commit this patch.

--
versions: +Python 3.5 -Python 3.4

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



[issue19844] os.path.split fails on windows path

2013-11-30 Thread Christian Heimes

Christian Heimes added the comment:

Ah, you fell victim to a classic gotcha. :)
Either you have to quote \ with \\ or you have to use a raw string. Withouth a 
raw string \t is TAB and \01 is the byte \x01:

 import ntpath
 fname = rC:\progs\python\test\target\Amy Winehouse\Amy Winehouse - Back To 
 Black (2006)\01 - Rehab.ogg
 ntpath.split(fname)
('C:\\progs\\python\\test\\target\\Amy Winehouse\\Amy Winehouse - Back To Black 
(2006)', '01 - Rehab.ogg')

 len(\01)
1
 \01 == chr(1)
True
 len(r\01)
3

--
nosy: +christian.heimes
status: open - closed

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



[issue19844] os.path.split fails on windows path

2013-11-30 Thread Hanz Kanst

Hanz Kanst added the comment:

Hm, how can I handle this if file is an existing string and there is no 
option to assign raw via r'some\raw\string'?

--

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



[issue17897] Optimize unpickle prefetching

2013-11-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Patch is synchronized with tip (it was desynchronized since 23459df0753e).

--
Added file: http://bugs.python.org/file32913/pickle_peek_2.patch

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



[issue17897] Optimize unpickle prefetching

2013-11-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Microbenchmark:

$ ./python -c import pickle; d = b'x' * 10**6; f = open('test.pickle3', 'wb'); 
pickle.dump(d, f, 3); f.close()
$ ./python -m timeit -s from pickle import load  with open('test.pickle3', 
'rb') as f: load(f)

Unpatched:  100 loops, best of 3: 7.27 msec per loop
Patched:100 loops, best of 3: 4.87 msec per loop

--

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



[issue19683] test_minidom has many empty tests

2013-11-30 Thread R. David Murray

R. David Murray added the comment:

On tip it would indeed be better to implement them.  The deletion is only for 
the released branches.

--

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



[issue19840] The is no way to tell shutil.move to ignore metadata

2013-11-30 Thread R. David Murray

R. David Murray added the comment:

Note that the equivalent linux command generates a warning message but does the 
move anyway.  In other words, this seems like a very reasonable request ;)

--
nosy: +r.david.murray

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



[issue19840] The is no way to tell shutil.move to ignore metadata

2013-11-30 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
versions: +Python 3.5 -Python 3.3

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



[issue19841] ConfigParser PEP issues

2013-11-30 Thread R. David Murray

R. David Murray added the comment:

Can you explain what the source of the problem is that you are trying to solve? 
 It sounds like a bug in Nuitka, whatever that is.

It is doubtful that this patch would be applied, for the backward compatibility 
reasons you cite.

--
nosy: +r.david.murray

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



[issue19841] ConfigParser PEP issues

2013-11-30 Thread R. David Murray

R. David Murray added the comment:

Oh, and even if we decided there was enough reason to want to change the 
parameter names (which so far it doesn't look like there is), it could never be 
applied to 2.7, since the 2.7 API is frozen.

--

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



[issue19843] Wait for multiple sub-processes to terminate

2013-11-30 Thread R. David Murray

R. David Murray added the comment:

It's not, the beta is already out.

--
nosy: +r.david.murray
versions: +Python 3.5 -Python 3.4

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



[issue19844] os.path.split fails on windows path

2013-11-30 Thread R. David Murray

R. David Murray added the comment:

If it is an existing string, the backslashes are already in the string.  The r 
prefix or the escaping is only required to get the backslashes into a string 
when you are coding them into a source file.

--
nosy: +r.david.murray

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



[issue19808] IDLE applies syntax highlighting to user input in its shell

2013-11-30 Thread Terry J. Reedy

Terry J. Reedy added the comment:

On a freshly booted machine, I retried 2.7.6/Windows/raw_input() 'for all the' 
and indeed I now see 'for' and 'all' colored.

The colorizing is done char by char. 'fo' is black, 'for' turns orange, 'forr' 
turns black again. Similarly, 'al' is black, 'all is purple, and 'allo' is 
black again. It is not a critical bug, but certainly annoying, especially to a 
new user.

For editor windows, colorizing is only done for .py(wo) files. I do not know 
how the colorizing is switched on after the file name is checked. The shell 
window is an editor window. It should switch to .py mode after printing  and 
back to .txt mode when \n or \n\n is entered to complete a statement. I believe 
the edit will be in pyshell.py

I expect the prompt and echoed input are both written to stdout by the user 
process. Neither are errors and both are colored blue. Warnings and exception 
tracebacks on stderr are red. Both come into the idle process via the socket 
connection, which is different from the idle process stdin connected to the 
keyboard.

--

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



[issue19834] Unpickling exceptions pickled by Python 2

2013-11-30 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

I have reviewed the patch in the review tool. Please take a look!

--

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



[issue6673] Uncaught comprehension SyntaxError eats up all memory

2013-11-30 Thread Alexandre Vassalotti

Changes by Alexandre Vassalotti alexan...@peadrop.com:


--
assignee:  - docs@python
components: +Documentation -Interpreter Core
keywords:  -64bit
nosy: +docs@python
stage:  - needs patch
type: resource usage - enhancement
versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3

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



  1   2   >