[issue12014] str.format parses replacement field incorrectly

2011-05-06 Thread Mark Dickinson

Changes by Mark Dickinson :


--
nosy: +eric.smith, mark.dickinson

___
Python tracker 

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



[issue12015] possible characters in temporary file name is too few

2011-05-06 Thread Steve Ward

Steve Ward  added the comment:

It is an issue because...

1) Python falls out of line with most other popular systems and languages.

2) There was never a good reason to decrease the entropy in the first place.  
If there was, the reason of case-sensitive files systems was not given.

3) If case-sensitivity was an issue, why wasn't it raised before?  For more 
than 8 years (2002-08-09 till 2010-11-09) the issue never warranted a change.

The initial commit is here.
http://svn.python.org/view?view=revision&revision=28113

--

___
Python tracker 

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



[issue12015] possible characters in temporary file name is too few

2011-05-06 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc :


--
nosy: +rhettinger

___
Python tracker 

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



[issue8407] expose signalfd(2) and pthread_sigmask in the signal module

2011-05-06 Thread Charles-François Natali

Changes by Charles-François Natali :


Removed file: http://bugs.python.org/file21901/pending_signals-2.patch

___
Python tracker 

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



[issue8407] expose signalfd(2) and pthread_sigmask in the signal module

2011-05-06 Thread Charles-François Natali

Charles-François Natali  added the comment:

Oops.
Victor, my mouse got stuck and I mistakenly removed your pending_signals-2 
patch. I'm really sorry about this, could you re-post it?

To try to make up for this, a small comment:
In signal_sigwait, at the end of the function,  you do this:

/* call the signal handler (if any) */
if (PyErr_CheckSignals())
return NULL;

I'm not sure I get this: sigwait is used to handle signals synchronously, and 
in the POSIX semantic, it's incompatible with signal handlers:

"""
sigwait suspends the calling thread until one of the signals in set is 
delivered to the calling thread. It then stores the number of the signal 
received in the location pointed to by sig and returns. The signals in set must 
be blocked and not ignored on entrance to sigwait. If the delivered signal has 
a signal handler function attached, that function is *not* called.
"""

and
"""
The effect of sigwait() on the signal actions for the signals in set is 
unspecified.
"""

So, if anything, you shouldn't check for a pending signal.

--
nosy: +neologix

___
Python tracker 

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



[issue12014] str.format parses replacement field incorrectly

2011-05-06 Thread Eric V. Smith

Eric V. Smith  added the comment:

I haven't had time to completely review this, I will do so later today.

But let me just say that the string is first parsed for replacement strings 
inside curly braces. There's no issue with that, here.

Next, the string is parsed for conversion and format_spec, looking for "!" and 
":" respectively. In your first example that gives:

field_name: '0['
conversion : ']'

It then tries to parse the field_name and gives you the first error.

--

___
Python tracker 

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



[issue12016] Wrong behavior for '\xff\n'.decode('gb2312', 'ignore')

2011-05-06 Thread zy

New submission from zy :

let s='\xff\n' 
The expected result of s.decode('gb2312', 'ignore') is u"\n", while in 2.6.6 it 
is u"".
  s can be replaced with chr(m) + chr(n) , where m is in range of 128~255, and 
n in 0~127.
  In the above cases, try decoding from chr(n) will never interfere with later 
parts in the string if there is any, since chr(n) do not start a multibyte 
sequence.

--
components: Unicode
messages: 135268
nosy: cdqzzy
priority: normal
severity: normal
status: open
title: Wrong behavior for '\xff\n'.decode('gb2312', 'ignore')
type: behavior
versions: Python 2.6

___
Python tracker 

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



[issue12016] Wrong behavior for '\xff\n'.decode('gb2312', 'ignore')

2011-05-06 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti
stage:  -> test needed
versions: +Python 2.7 -Python 2.6

___
Python tracker 

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



[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 26da299ca88e by Ronald Oussoren in branch '3.1':
Fix for issue 10684: Folders get deleted when trying to change case with 
shutil.move (case insensitive file systems only)
http://hg.python.org/cpython/rev/26da299ca88e

New changeset 051190230254 by Ronald Oussoren in branch '2.7':
Backport fix for issue #10684 from 3.x
http://hg.python.org/cpython/rev/051190230254

--
nosy: +python-dev

___
Python tracker 

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



[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

I've committed the fix in 2.7, 3.1, 3.2 and 3.3

--
assignee:  -> ronaldoussoren
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue9670] Exceed Recursion Limit in Thread

2011-05-06 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

For pydebug builds the default stacksize should be increased, and prefer to do 
this by unconditionally changing the stacksize.

W.r.t. the non-osx buildbot failures: it would be better if we could come up 
with a solution that doesn't disable the test for those platform but I won't do 
that work. I therefore propose to only enable the test on OSX.

--

___
Python tracker 

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



[issue12012] _ssl module doesn't compile with OpenSSL 1.0.0d: SSLv2_method is missing

2011-05-06 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Does this happen with a released build of OpenSSL? The Debian bug talks about 
experimental.

+try:
+from _ssl import PROTOCOL_SSLv2
+OPENSSL_NO_SSL2 = False
+except ImportError:
+OPENSSL_NO_SSL2 = True

Please avoid "negative" constants. Calling it HAS_SSLv2 would be fine.

Also, there should be some doc update mentioning that PROTOCOL_SSLv2 is not 
always present.

--

___
Python tracker 

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



[issue12012] _ssl module doesn't compile with OpenSSL 1.0.0d: SSLv2_method is missing

2011-05-06 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage:  -> patch review
versions: +Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue11999] sporadic failure in test_mailbox on FreeBSD

2011-05-06 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

On Fri,  6 May 2011 04:44:00 +0200, R. David Murray wrote:
> [.] the mtime only has a resolution of one second.

You always say that!  But i'm pretty sure from somewhen long ago
that there are filesystems which have a two second time resolution.
And unless i'm mistaken that filesystem is still used widely.

> Attached is a patch implementing the fix.
> It undoes the 6896 patch

I've not yet tried your code but from looking at the patch it
seems to target towards a real approach.

> I also added an additional delta in case the file system clock
> is skewing relative to the system clock.  I made this a class
> attribute so that it is adjustable; perhaps it should be made
> public and documented.

On the other hand, if it shows up after almost five years that the
one second resolution solution doesn't work, and that simply
adjusting to a two second resolution is not smart enough to get
this fixed, then i would not go for something half-automatic which
a user needs to adjust manually, because how could a user do that?

Thus, in my view, if you are *really* looking forward to make
mailbox.py a *good* and *beautiful* thing then the timedelta in
between the filesystem and the host's time() must of course be
tracked-, and the fuzziness should be adjusted automatically.
E.g. similar http://linuxcommand.org/man_pages/adjtimex8.html.

--

___
Python tracker 

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



[issue11999] sporadic failure in test_mailbox on FreeBSD

2011-05-06 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

> I also added an additional delta in case the file system clock
> is skewing relative to the system clock. 

In fact this idea could even be made public e.g. like this

class ClockDrifter:
def add_snapshot(self, exttime, loctime=None):
if loctime is None:
loctime = time.time()
...
def drift_tendency(self):
...
def drift_distance(self):
...

I could think of usages thereof.

--

___
Python tracker 

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



[issue12000] SSL certificate verification failed if no dNSName entry in subjectAltName

2011-05-06 Thread Nicolas Bareil

Nicolas Bareil  added the comment:

Hello Antoine, Steffen,

You are absolutely right about removing the 'not san' part. Here is the
new patch, with tests :

diff -r c22d5b37f6a4 Lib/ssl.py
--- a/Lib/ssl.pyFri May 06 09:31:02 2011 +0300
+++ b/Lib/ssl.pyFri May 06 12:47:14 2011 +0200
@@ -122,8 +122,9 @@
 if _dnsname_to_pat(value).match(hostname):
 return
 dnsnames.append(value)
-if not san:
-# The subject is only checked when subjectAltName is empty
+if not dnsnames:
+# The subject is only checked when there is no dNSName entry
+# in subjectAltName
 for sub in cert.get('subject', ()):
 for key, value in sub:
 # XXX according to RFC 2818, the most specific Common Name
diff -r c22d5b37f6a4 Lib/test/test_ssl.py
--- a/Lib/test/test_ssl.py  Fri May 06 09:31:02 2011 +0300
+++ b/Lib/test/test_ssl.py  Fri May 06 12:47:14 2011 +0200
@@ -277,6 +277,24 @@
 (('organizationName', 'Google Inc'),))}
 fail(cert, 'mail.google.com')
 
+# No DNS entry in subjectAltName but a commonName
+cert = {'notAfter': 'Dec 18 23:59:59 2099 GMT',
+'subject': ((('countryName', 'US'),),
+(('stateOrProvinceName', 'California'),),
+(('localityName', 'Mountain View'),),
+(('commonName', 'mail.google.com'),)),
+'subjectAltName': (('othername', 'blabla'), )}
+ok(cert, 'mail.google.com')
+
+# No DNS entry subjectAltName and no commonName
+cert = {'notAfter': 'Dec 18 23:59:59 2099 GMT',
+'subject': ((('countryName', 'US'),),
+(('stateOrProvinceName', 'California'),),
+(('localityName', 'Mountain View'),),
+(('organizationName', 'Google Inc'),)),
+'subjectAltName': (('othername', 'blabla'),)}
+fail(cert, 'google.com')
+
 # Empty cert / no cert
 self.assertRaises(ValueError, ssl.match_hostname, None, 'example.com')
 self.assertRaises(ValueError, ssl.match_hostname, {}, 'example.com')


Steffen, I will submit a bug report to Mercurial as soon as this patch is 
expected to be integrate in py3k.

--
versions: +Python 3.4

___
Python tracker 

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



[issue10775] assertRaises as a context manager should accept a 'msg' keyword argument.

2011-05-06 Thread Michael Foord

Michael Foord  added the comment:

New patch by Ezio looks good to me. Go ahead and commit. Please raise a 
separate issue for error reporting when invalid argument combinations are used. 
(i.e. additional keyword arguments but no callable.)

--

___
Python tracker 

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



[issue11887] unittest fails on comparing str with bytes if python has the -bb option

2011-05-06 Thread Michael Foord

Michael Foord  added the comment:

_baseAssertEqual should not unconditionally catch and ignore all BytesWarnings.

If tests raise warnings/exceptions because they are doing comparisons that 
raise warnings/exceptions then those tests should be fixed rather than just 
ignoring the warnings.

--
resolution:  -> rejected
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue10775] assertRaises as a context manager should accept a 'msg' keyword argument.

2011-05-06 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 8fc801ca9ea1 by Ezio Melotti in branch 'default':
Issue #10775: assertRaises, assertRaisesRegex, assertWarns, and 
assertWarnsRegex now accept a keyword argument 'msg' when used as context 
managers.  Initial patch by Winston Ewert.
http://hg.python.org/cpython/rev/8fc801ca9ea1

--
nosy: +python-dev

___
Python tracker 

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



[issue10775] assertRaises as a context manager should accept a 'msg' keyword argument.

2011-05-06 Thread Ezio Melotti

Ezio Melotti  added the comment:

Done, thanks for the patch!

--
resolution:  -> accepted
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue11999] sporadic failure in test_mailbox on FreeBSD

2011-05-06 Thread R. David Murray

R. David Murray  added the comment:

Isn't this a bit out of scope for the mailbox module, though?  Mailbox is 
getting called at irregular intervals, and a clock monitor really wants to be a 
polling daemon of some sort, I think.  In which case a complete application 
system that used the mailbox library could adjust the _skewtime appropriately 
based on the output of a daemon, if it really cares that much.

I think we're well into YAGNI territory, though.  We are only concerned about 
how long one second is to the filesystem, and a filesystem that skews or 
jitters more than a tenth of a second over one second is probably pathological 
anyway.

As for the two second filesystem, my understanding is that is the FAT file 
system, and I say we just declare using maildir on FAT to be unsupported.  (But 
I suppose that should be documented).

(As a side note, atime on FAT has a resolution of 1 day, which kind of screws 
up your "new mail" signal)

--

___
Python tracker 

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



[issue12017] Decoding a highly-nested object with json (_speedups enabled) causes segfault

2011-05-06 Thread ivank

New submission from ivank :

Decoding a highly-nested object with json (_speedups enabled) can cause a 
segfault due to a stack overflow:

# python -c "import json; json.loads('[' * 10 + '1' + ']' * 10)"
zsh: segmentation fault  python -c "import json; json.loads('[' * 10 + '1' 
+ ']' * 10)"

# python -c "import json; json.loads('{\"a\":' * 10 + '1' + '}' * 10)"
zsh: segmentation fault  python -c "import json; json.loads('{\"a\":' * 10 
+ '1' + '}' * 10)"

simplejson has the same problem:
https://github.com/simplejson/simplejson/pull/11

I've started on a fix (see patch at that URL), but it doesn't support 
customizing max_depth yet.

--
components: Library (Lib)
messages: 135281
nosy: ivank
priority: normal
severity: normal
status: open
title: Decoding a highly-nested object with json (_speedups enabled) causes 
segfault
type: security
versions: Python 2.7

___
Python tracker 

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



[issue11999] sporadic failure in test_mailbox on FreeBSD

2011-05-06 Thread R. David Murray

R. David Murray  added the comment:

Oh, and to be clear: the problem wasn't that the one second interval was too 
short, the problem was that the times stamps of the files were being compared 
to the wrong check value (the system clock instead of their previous state).  
The extra one tenth second is a "belt and suspenders" addition.

--

___
Python tracker 

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



[issue11999] sporadic failure in test_mailbox on FreeBSD

2011-05-06 Thread R. David Murray

R. David Murray  added the comment:

I am open to the argument that we should make it two seconds and a bit to 
support FAT, but how many people are going to use maildir on FAT?

--

___
Python tracker 

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



[issue12017] Decoding a highly-nested object with json (_speedups enabled) causes segfault

2011-05-06 Thread Ezio Melotti

Changes by Ezio Melotti :


--
components: +Extension Modules -Library (Lib)
nosy: +ezio.melotti
stage:  -> test needed
versions: +Python 3.1, Python 3.2, Python 3.3

___
Python tracker 

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



[issue12017] Decoding a highly-nested object with json (_speedups enabled) causes segfault

2011-05-06 Thread ivank

ivank  added the comment:

 any opinions here on what the default max_depth should be? is there any 
safe number?
 I'm curious as to how many C stack frames I can use after reaching the 
Python recursion limit
 and what ulimit -s looks like on every platform
 http://hg.python.org/cpython/file/tip/Lib/test/test_parser.py#l537
 ivan`, maybe this is useful

--

___
Python tracker 

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



[issue12017] Decoding a highly-nested object with json (_speedups enabled) causes segfault

2011-05-06 Thread Alex Gaynor

Alex Gaynor  added the comment:

Why not use Py_EnterRecursiveCall?

--
nosy: +alex

___
Python tracker 

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



[issue11999] sporadic failure in test_mailbox on FreeBSD

2011-05-06 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

I like all kind of single-screw solutions.
And i feel a bit uncomfortable with your usual tightness.
(0.1 seconds - i mean, come on)

--

___
Python tracker 

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



[issue11999] sporadic failure in test_mailbox on FreeBSD

2011-05-06 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

> how many people are going to use maildir on FAT?

Dunno.
But it's maybe the lowest common denominator of mountable
readwrite filesystems.  Except for that MacBook i always had
a shared FAT partition on my private PCs.

--

___
Python tracker 

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



[issue11935] MMDF/MBOX mailbox need utime

2011-05-06 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

@david: note i got stuck on updating my patch for mailbox.py and
switched to do test_mmap.py instead, so that i don't know wether
i will be able to finish it today.  Is it really true that
mailbox.py even writes mailboxes without locking in case of an
appending write?  So i really have to look at that before i will
proceed and write the patch.

--

___
Python tracker 

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



[issue11999] sporadic failure in test_mailbox on FreeBSD

2011-05-06 Thread R. David Murray

R. David Murray  added the comment:

All right, let's make it two seconds and a bit, then.

Why do you think a tenth of second is too small?  A clock with a skew of half 
that much would be badly broken.

--

___
Python tracker 

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



[issue12017] Decoding a highly-nested object with json (_speedups enabled) causes segfault

2011-05-06 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +barry
priority: normal -> high
stage: test needed -> needs patch
versions: +Python 2.6

___
Python tracker 

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



[issue11898] Sending binary data with a POST request in httplib can cause Unicode exceptions

2011-05-06 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Hello Bernhard, 

I tried to a POST of JPEG file, through urllib2 (which internally uses httplib) 
and goes through the code that you pointed out and I don't face any problem. I 
am able to POST binaries using httplib.

I am also surprised at UnicodeDecodeError which is being raised. The POST data 
is string (8-bit strings) in Python2.7 and the portion of code will have no 
problem in creating the content.

You will get UnicodeDecodeError, only if you explicitly pass a Unicode Object 
as Data and never when you pass string or binary string.

Perhaps mechanize is doing something wrong here and sending a Unicode object.

So, this really does not look like a bug to me.

(Also a note on patch. The patch tries to silence the error, which is wrong 
thing to do).

If you can provide a simple snippet to reproduce this error, feel free reopen 
this again. I am closing this as 'works for me'.

Thanks.

--
assignee:  -> orsenthil
resolution:  -> works for me
stage: test needed -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue11999] sporadic failure in test_mailbox on FreeBSD

2011-05-06 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

I agree that it's fun to see pieces of code interacting like gears
in a transmission, but often it gets ugly due to the noise from
the outside which requires to add ugly fuzziness or honour stupid
design decisions.
Maybe an environment variable like PYMAILBOX_SKEW and then one
could run test_mailbox.py and see if it works for 0.01?? :)

--

___
Python tracker 

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



[issue9670] Exceed Recursion Limit in Thread

2011-05-06 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

Version 4 of the patch has two changes w.r.t version 3:

* Increase the stack size on OSX to ensure that tests pass with
  --with-pydebug

* Only test the recursion behavior on OSX (where we know the bug is
  fixed)

--
Added file: http://bugs.python.org/file21907/issue9670-v4.patch

___
Python tracker 

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



[issue12000] SSL certificate verification failed if no dNSName entry in subjectAltName

2011-05-06 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset d4c2a99d1bad by Antoine Pitrou in branch '3.2':
Issue #12000: When a SSL certificate has a subjectAltName without any
http://hg.python.org/cpython/rev/d4c2a99d1bad

New changeset 1b37827984ba by Antoine Pitrou in branch 'default':
Issue #12000: When a SSL certificate has a subjectAltName without any
http://hg.python.org/cpython/rev/1b37827984ba

--
nosy: +python-dev

___
Python tracker 

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



[issue12000] SSL certificate verification failed if no dNSName entry in subjectAltName

2011-05-06 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Patch committed in 3.2 and 3.x, thank you!

--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Nadeem Vawda

Nadeem Vawda  added the comment:

test_move_dir_caseinsensitive is failing on some of the XP buildbots:

http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/4514
http://www.python.org/dev/buildbot/all/builders/x86%20XP-5%203.x/builds/2696
http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.2/builds/239

--

___
Python tracker 

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



[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

That's rather annoying. I'm reopening the issue because of this.

I'm looking into the issue and will revert when I cannot find a solution soon.

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

___
Python tracker 

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



[issue12000] SSL certificate verification failed if no dNSName entry in subjectAltName

2011-05-06 Thread Mads Kiilerich

Changes by Mads Kiilerich :


--
nosy: +kiilerix

___
Python tracker 

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



[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

This seems to be a bug in ntpath.samefile, in particular in this code:


# determine if two files are in fact the same file
try:
# GetFinalPathNameByHandle is available starting with Windows 6.0.
# Windows XP and non-Windows OS'es will mock _getfinalpathname.
if sys.getwindowsversion()[:2] >= (6, 0):
from nt import _getfinalpathname
else:
raise ImportError
except (AttributeError, ImportError):
# On Windows XP and earlier, two files are the same if their absolute
# pathnames are the same.
# Non-Windows operating systems fake this method with an XP
# approximation.
def _getfinalpathname(f):
return abspath(f)

def samefile(f1, f2):
"Test whether two pathnames reference the same actual file"
return _getfinalpathname(f1) == _getfinalpathname(f2)

Python2 doesn't have ntpath.samefile and shutil then falls back to comparing 
"os.path.normcase(os.path.abspath(src))" with the same transformation of dst.

On XP _getfinalpath doesn't call os.path.normcase, hence it doesn't notice that 
"a" and "A" refer to the same file (on all common NT filesystems)

--

___
Python tracker 

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



[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

I'm not sure what the right course of action is, revert my patch try to get 
ntpath.samefile fixed and then reapply my patch or something else?

ntpath.samefile is definitely broken on XP:

* Create a file "a.txt"
* Start python3.2
  >>> os.path.samefile("a.txt", "A.TXT")
  False

--

___
Python tracker 

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



[issue12014] str.format parses replacement field incorrectly

2011-05-06 Thread Ben Wolfson

Ben Wolfson  added the comment:

The semantics the docs suggest for index fields (namely that whatever is in the 
index field is just passed to getitem) do seem to be right, no other processing 
is done here, for instance:

>>> d = {"{0}":"hi"}
>>> "{0[{0}]}".format(d)
'hi'
>>> import string
>>> list(string.Formatter().parse("{0[{0}]}"))
[('', '0[{0}]', '', None)]
>>> 

Which is what you'd expect, but makes me think that treating "!" and ":" in the 
index field separately is definitely wrong.

--

___
Python tracker 

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



[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Brian Curtin

Brian Curtin  added the comment:

On XP, os.path.samefile is really "os.path.abspath(x) == os.path.abspath(y)", 
which does not work correctly with different cases. We could add a ".lower()" 
to line 657 of Lib/ntpath.py so the abspath is always returned in lower, so the 
XP version of samefile compares two lower case strings.

On versions after XP, this isn't an issue.

--

___
Python tracker 

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



[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

The attached patch seems to fix ntpath.samefile (at least for the shutils 
tests, I haven't run a full testsuite and cannot build python on a windows 
machine anyway)

--
Added file: http://bugs.python.org/file21908/npath-fix.txt

___
Python tracker 

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



[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Brian Curtin

Brian Curtin  added the comment:

I don't have time to test it at the moment, but it seems fine to me.

--

___
Python tracker 

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



[issue11178] Running tests inside a package by module name fails

2011-05-06 Thread Michael Foord

Michael Foord  added the comment:

This isn't reproducable (any more?) on Python 2.7, but is on Python 3.2.

Running "python -m unittest package" doesn't find tests in submodules, but 
without running full discovery even when passed an explicit module name I don't 
think that is avoidable.

--
versions: +Python 3.3 -Python 2.7

___
Python tracker 

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



[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

I'm currrently running 'python -mtest.regrtest -uall' on an XP machine where 
I've applied my test to a binary install of 3.2.

I'll apply my patch if that testrun indicates that I don't introduce other 
problems, and I'll revert my shutil patch when the change to ntpath.samefile 
isn't fine after call.

--

___
Python tracker 

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



[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 011e4bb8b933 by Ronald Oussoren in branch '3.2':
ntpath.samefile fails to detect that "A.TXT" and "a.txt" refer to the same file 
on Windows XP.
http://hg.python.org/cpython/rev/011e4bb8b933

--

___
Python tracker 

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



[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

I've committed my fix for ntpath.samefile for 3.3 and 3.2.

I've also filed a new issue because ntpath.samefile has no unittests.

--

___
Python tracker 

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



[issue12018] No tests for ntpath.samefile, ntpath.sameopenfile

2011-05-06 Thread Ronald Oussoren

New submission from Ronald Oussoren :

Python 3.2 introduced ntpath.samefile, but the implementation is not tested in 
test_ntpath.py. The same seems true of ntpath.sameopenfile.

As noted in #10684 ntpath.samefile is broken on XP, which would have been 
caught by unittest. I've committed a fix for that particular bug, but haven't 
added unittests.

--
components: Windows
keywords: easy
messages: 135307
nosy: ronaldoussoren
priority: low
severity: normal
stage: test needed
status: open
title: No tests for ntpath.samefile, ntpath.sameopenfile
type: behavior
versions: Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue10684] Folders get deleted when trying to change case with shutil.move (case insensitive file systems only)

2011-05-06 Thread Ronald Oussoren

Changes by Ronald Oussoren :


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

___
Python tracker 

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



[issue12018] No tests for ntpath.samefile, ntpath.sameopenfile

2011-05-06 Thread Brian Curtin

Changes by Brian Curtin :


--
nosy: +brian.curtin

___
Python tracker 

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



[issue12017] Decoding a highly-nested object with json (_speedups enabled) causes segfault

2011-05-06 Thread Ezio Melotti

Changes by Ezio Melotti :


--
assignee:  -> ezio.melotti

___
Python tracker 

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



[issue11277] Crash with mmap and sparse files on Mac OS X

2011-05-06 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

On Fri,  6 May 2011 02:54:07 +0200, Nadeem Vawda wrote:
> I think so. [.]
> it turns out that the OS X sparsefile crash is also covered by
> LargeMmapTests.test_large_offset() in test_mmap [!!!]. [.]

So i followed your suggestion and did not do something on zlib no
more.  Even if that means that there is no test which checksums an
entire superlarge mmap() region.
Instead i've changed/added test cases in test_mmap.py:

- Removed all context-manager usage from LargeMmapTests().
  This feature has been introduced in 3.2 and is already tested
  elsewhere.  Like this the test is almost identical on 2.7 and 3.x.
- I've dropped _working_largefile().  This creates a useless large
  file only to unlink it directly.  Instead the necessary try:catch:
  is done directly in the tests.
- (Directly testing after .flush() without reopening the file.)
- These new tests don't run on 32 bit.

May the juice be with you

--
Added file: http://bugs.python.org/file21909/11277-test_mmap.1.py
Added file: http://bugs.python.org/file21910/11277-test_mmap-27.1.py

___
Python tracker 

___diff --git a/Lib/test/test_mmap.py b/Lib/test/test_mmap.py
--- a/Lib/test/test_mmap.py
+++ b/Lib/test/test_mmap.py
@@ -1,4 +1,5 @@
-from test.support import TESTFN, run_unittest, import_module, unlink, requires
+from test.support import TESTFN, run_unittest, import_module, unlink
+from test.support import requires, _4G
 import unittest
 import os
 import re
@@ -662,44 +663,87 @@
 def tearDown(self):
 unlink(TESTFN)
 
-def _working_largefile(self):
-# Only run if the current filesystem supports large files.
-f = open(TESTFN, 'wb', buffering=0)
+def _test_splice(self, f, i):
+# Test splicing with pages around "critical" values in respect to
+# memory management
+# Issue 11277: does mmap() force materialization of backing store?
+m = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
 try:
-f.seek(0x8001)
-f.write(b'x')
-f.flush()
-except (IOError, OverflowError):
-raise unittest.SkipTest("filesystem does not have largefile 
support")
+# Memory page before xy
+self.assertEqual(m[i+0:i+2], b'  ')
+# Memory page after xy
+self.assertEqual(m[i+10:i+12], b'  ')
+# Cross pages
+self.assertEqual(m[i+2:i+10], b'DEARdear')
 finally:
-f.close()
-unlink(TESTFN)
+m.close()
 
-def test_large_offset(self):
+def _test_subscr(self, f, idx, expect):
+# Test subscript for critical values like INT32_MAX, UINT32_MAX
+m = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
+try:
+self.assertEqual(m[idx], expect)
+finally:
+m.close()
+
+@unittest.skipUnless(sys.maxsize > _4G, "Can't run on a 32-bit system.")
+def test_around_32bit_sbitflip(self):
+start = 0x7FFA
 if sys.platform[:3] == 'win' or sys.platform == 'darwin':
 requires('largefile',
-'test requires %s bytes and a long time to run' % 
str(0x18000))
-self._working_largefile()
-with open(TESTFN, 'wb') as f:
-f.seek(0x14FFF)
-f.write(b" ")
+ 'test requires %s bytes and a long time to run' %
+ str(start+12))
+with open(TESTFN, 'w+b') as f:
+try:
+f.seek(start)
+f.write(b'  DEARdear  ')
+f.flush()
+except (IOError, OverflowError):
+raise unittest.SkipTest('filesystem does not have largefile '
+'support')
+self._test_splice(f, start)
+self._test_subscr(f, start+len(b'  DEA'), ord(b'R'))
+self._test_subscr(f, start+len(b'  DEARdea'), ord(b'r'))
+unlink(TESTFN)
 
-with open(TESTFN, 'rb') as f:
-with mmap.mmap(f.fileno(), 0, offset=0x14000, 
access=mmap.ACCESS_READ) as m:
-self.assertEqual(m[0xFFF], 32)
+@unittest.skipUnless(sys.maxsize > _4G, "Can't run on a 32-bit system.")
+def test_around_32bit_excess(self):
+start = 0xFFFA
+if sys.platform[:3] == 'win' or sys.platform == 'darwin':
+requires('largefile',
+ 'test requires %s bytes and a long time to run' %
+ str(start+12))
+with open(TESTFN, 'w+b') as f:
+try:
+f.seek(start)
+f.write(b'  DEARdear  ')
+f.flush()
+except (IOError, OverflowError):
+raise unittest.SkipTest('filesystem does not have largefile '
+'support')
+se

[issue11277] Crash with mmap and sparse files on Mac OS X

2011-05-06 Thread Steffen Daode Nurpmeso

Changes by Steffen Daode Nurpmeso :


Removed file: http://bugs.python.org/file21869/11277-27.2.diff

___
Python tracker 

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



[issue11277] Crash with mmap and sparse files on Mac OS X

2011-05-06 Thread Steffen Daode Nurpmeso

Changes by Steffen Daode Nurpmeso :


Removed file: http://bugs.python.org/file21885/11277-27.3.diff

___
Python tracker 

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



[issue12000] SSL certificate verification failed if no dNSName entry in subjectAltName

2011-05-06 Thread Mads Kiilerich

Mads Kiilerich  added the comment:

In my opinion the RFCs are a bit unclear about how iPAddress subjectAltNames 
should be handled. (I also don't know if Python currently do the right thing by 
accepting and matching IP addresses if specified in commonName.)

Until now Python failed to the safe side by not matching on subjectAltName 
iPAddress but also not falling back to commonName if they were specified. 
AFAICS, with this change it is possible to create strange certificates that 
Python would accept when an IP address matched commonName but other 
implementations would reject because of iPAddress mismatch.

That is probably not a real problem, but I wanted to point it out as the 
biggest issue I could find with this fix. Nice catch.

We could perhaps add IP addresses to dnsnames even though we don't match on 
them.

--

___
Python tracker 

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



[issue9971] Optimize BufferedReader.readinto

2011-05-06 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

+if (n <= 0) {
+if (written > 0 || n == 0)
+break;
+if (n == -2) {
+Py_INCREF(Py_None);
+res = Py_None;
+}
+goto end;
+}

I think the logic is flawed: if n = -1 and written is > 0, the error will be 
silenced.
Other than that, the patch looks good to me.

--

___
Python tracker 

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



[issue11963] Use real assert* for test_trigger_memory_error (test_parser)

2011-05-06 Thread Éric Araujo

Éric Araujo  added the comment:

IIRC the code uses C stdio to print its error message, not Python APIs, so this 
would explain why replacing sys.stdout doesn’t work.

There’s another test that spits things to stdout: test_subprocess.  Should I 
clean it up too?

--

___
Python tracker 

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



[issue11995] test_pydoc loads all Python modules

2011-05-06 Thread Éric Araujo

Éric Araujo  added the comment:

Isn’t the root problem that pydoc uses import rather than imp or PEP 302 
things?  We could change that.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue11762] Ast doc: warning and version number

2011-05-06 Thread Éric Araujo

Éric Araujo  added the comment:

The Python Insider blog has a nice phrasing: “The AST module exposes a 
constant, ``ast.__version__``, which provides a means for user code to vary its 
behaviour depending on the version of the AST it encounters.”

--

___
Python tracker 

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



[issue12019] Dead or buggy code in importlib.test.__main__

2011-05-06 Thread Éric Araujo

New submission from Éric Araujo :

I was stealing importlib’s test/__main__ file for packaging (thanks!) and I 
noticed this bug thanks to pyflakes: “sep” is undefined.  It looks like the bug 
hasn’t been noticed because it’s in a dead block that depends on __file__ 
containing '__pycache__'.  Is this a leftover from a previous version of the 
PEP without __file__/__cached__ distinction?  Or maybe __file__ is set to the 
pyc file for pyc-only imports?

--
components: Tests
messages: 135314
nosy: barry, brett.cannon, eric.araujo
priority: normal
severity: normal
status: open
title: Dead or buggy code in importlib.test.__main__
versions: Python 3.2, Python 3.3

___
Python tracker 

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



[issue12017] Decoding a highly-nested object with json (_speedups enabled) causes segfault

2011-05-06 Thread Ezio Melotti

Ezio Melotti  added the comment:

Attached patch fixes the issues. The patch includes 6 tests that caused a 
segfault and that now raise a "RuntimeError: maximum recursion depth exceeded" 
error, matching the behavior of the Python version.

The recursion happen because scan_once_str/unicode might call 
_parse_object_str/unicode (for objects/dicts) and _parse_array_str/unicode (for 
arrays/lists), and these functions might call scan_once_str again for their 
inner elements.
To fix the problem I added Py_Enter/LeaveRecursiveCall around the calls to 
_parse_object_str and _parse_array_str in scan_once_str/unicode.

For some reason the message raised with json.loads('{"a":' * 10 + '1' + '}' 
* 10), is a generic "maximum recursion depth exceeded while calling a 
Python object", but that's probably not too important.
The other messages work fine.

--
keywords: +patch
nosy: +benjamin.peterson, georg.brandl
priority: high -> release blocker
stage: needs patch -> commit review
Added file: http://bugs.python.org/file21911/issue12017.diff

___
Python tracker 

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



[issue12001] Extend json.dumps to handle N-triples strings

2011-05-06 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I'm not sure there's any sense in trying to bend the json module into producing 
other formats.

--
nosy: +pitrou, rhettinger

___
Python tracker 

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



[issue12001] Extend json.dumps to handle N-triples strings

2011-05-06 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Feature creep would not be good for the json module.

--

___
Python tracker 

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



[issue11977] Document int.conjugate, .denominator, ...

2011-05-06 Thread Éric Araujo

Éric Araujo  added the comment:

Benjamin: In 2.7, long implements those ABCs too.  I have added it to the doc 
in a local commit, I’ll push when I can.

Jonas: Does the commit fix your use case?  The attributes are now documented in 
the sense that a human can find them, but can Sphinx?

--
nosy: +eric.araujo

___
Python tracker 

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



[issue11977] Document int.conjugate, .denominator, ...

2011-05-06 Thread Éric Araujo

Éric Araujo  added the comment:

BTW: If not, you can always use things like :attr:`int.real 
` (real target in angle brackets, rest is text to 
display) but it’s a bit unwieldy.

--

___
Python tracker 

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



[issue11975] Fix referencing of built-in types (list, int, ...)

2011-05-06 Thread Éric Araujo

Éric Araujo  added the comment:

> Intersphinx-ing of int, list, float, ... should work with
> ":class:`int`" (list, float, ...).

Is this a problem in our markup or a bug in intersphinx?  IIRC, you can use 
func, class, mod, method or what you want, all these roles look up objects in 
the same way.

> Also, intersphinx-ing list methods, e.g. ":meth:`list.insert`",
> should work.

If this work within one documentation set (as I believe it does) but not with 
intersphinx, it’s an intersphinx bug which should be reported to the Sphinx bug 
tracker on bitbucket.

--

___
Python tracker 

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



[issue11983] Inconsistent hash and comparison for code objects

2011-05-06 Thread Éric Araujo

Éric Araujo  added the comment:

What fix would you propose?

--
nosy: +eric.araujo

___
Python tracker 

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



[issue8808] imaplib should support SSL contexts

2011-05-06 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset aba7d1f2d2a9 by Antoine Pitrou in branch 'default':
Issue #8808: The IMAP4_SSL constructor now allows passing an SSLContext
http://hg.python.org/cpython/rev/aba7d1f2d2a9

--
nosy: +python-dev

___
Python tracker 

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



[issue11964] Undocumented change to indent param of json.dump in 3.2

2011-05-06 Thread Éric Araujo

Éric Araujo  added the comment:

I will fix this.

Prashanth Raghu: (sorry to call you by your full name, which is not very nice 
in my language, but I’m not sure which is your first name) “The .rst file that 
was downloaded as of 30-04-2011 (dd-mm-) had the updated doc”: Yes, I saw 
that, but I reported a lack of versionchanged information (see example near the 
top of http://docs.python.org/dev/library/site).

--
assignee: docs@python -> eric.araujo

___
Python tracker 

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



[issue8808] imaplib should support SSL contexts

2011-05-06 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Thank you! I've tweaked the patch slightly (mostly cosmetics (*)) and committed 
it to 3.3. I've left out the poplib doc changes, they could be committed 
separately.

(*) 80-line character limit, calling logout() on the test server

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue11968] wsgiref's wsgi application sample code does not work

2011-05-06 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for the report.  Can you tell more about the bug you perceive?  The doc 
and code for wsgiref were carefully updated to play well with Python 3 clean 
bytes/characters distinction, so I’m surprised by this bug report.  Maybe you 
mistakenly tried the example with a Python 2.x version?

--
nosy: +eric.araujo

___
Python tracker 

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



[issue11989] deprecate shutil.copy2

2011-05-06 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for the report.  Could you elaborate a bit on the rational for the 
change?  Aesthetics are usually not sufficient to change things; on the other 
hand, use of simplicity is a goal.

Is is easier to remember two functions for two uses or to have one function 
with a parameter?  Are users confused by the two functions with unhelpful 
names?  These are the kinds of questions to answer before considering breaking 
everyone’s code with a deprecation and removal.

Would you be willing to raise the issue on the python-ideas mailing list to get 
feedback?  Thanks in advance.

--
nosy: +eric.araujo, rhettinger
versions: +Python 3.3 -Python 3.4

___
Python tracker 

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



[issue6116] frame.f_locals keeps references to things for too long

2011-05-06 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Le jeudi 05 mai 2011 à 18:45 +, Facundo Batista a écrit :
> 
> Antoine, to see if I understood correctly... if we build the dict, and
> just return it but don't save it in the frame, this leak would be
> solved? (yes, it'd be slower because everytime it's asked, it'd need
> to be built again)

I would let Jean-Paul confirm the answer, but: yes.

--

___
Python tracker 

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



[issue12001] Extend json.dumps to handle N-triples strings

2011-05-06 Thread Éric Araujo

Éric Araujo  added the comment:

Agreed.  The purpose of the json module is clearly defined, and there is room 
for other modules to address other problems (like yaml).  It should be easy to 
write a Python function to convert a string to its N-triples serialization.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue12002] ftplib.FTP.abort fails with TypeError on Python 3.x

2011-05-06 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for the report.  If you would like to turn your suggestion into a diff 
file (see guidelines at http://docs.python.org/devguide) containing the code 
change and a test, you could get into the Misc/ACKS file and get eternal glory 
:)

--
nosy: +eric.araujo
stage:  -> needs patch
versions:  -Python 3.4

___
Python tracker 

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



[issue12007] Console commands won't work

2011-05-06 Thread Éric Araujo

Éric Araujo  added the comment:

Definitely looks like a shell, libcurses or readline configuration issue, 
sorry.  Please reopen this bug if you have new information contradicting our 
conclusion.

--
nosy: +eric.araujo
status: pending -> closed

___
Python tracker 

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



[issue9971] Optimize BufferedReader.readinto

2011-05-06 Thread John O'Connor

John O'Connor  added the comment:

Good catch. v3 attached.

--
Added file: http://bugs.python.org/file21912/buffered_readinto3.patch

___
Python tracker 

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



[issue12008] HtmlParser non-strict goes wrong with unquoted attributes

2011-05-06 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo, r.david.murray
versions: +Python 3.3

___
Python tracker 

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



[issue12009] netrc module crashes if netrc file has comment lines

2011-05-06 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for the report.  Would you like to submit a patch?  If so, guidelines 
are on http://docs.python.org/devguide

--
nosy: +eric.araujo
versions: +Python 3.1, Python 3.2, Python 3.3

___
Python tracker 

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



[issue12012] _ssl module doesn't compile with OpenSSL 1.0.0d: SSLv2_method is missing

2011-05-06 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue12012] _ssl module doesn't compile with OpenSSL 1.0.0d: SSLv2_method is missing

2011-05-06 Thread Éric Araujo

Éric Araujo  added the comment:

The original bug requesting that SSLv2 be disabled is #589706; the updated 
openssl package with this change is in Debian unstable and testing now.

--

___
Python tracker 

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



[issue11975] Fix referencing of built-in types (list, int, ...)

2011-05-06 Thread Jonas H.

Jonas H.  added the comment:

> Is this a problem in our markup or a bug in intersphinx?

It's a markup problem -- those types are documented as functions, using the 
:func: role/`.. func::` directive.

It's not only a markup mismatch but, strictly speaking, it's *wrong* 
documentation: str, int, ... aren't functions, they're *classes* and should be 
documented as such. It's a bit odd to search for information on the str *class* 
in the list of built-in *functions*.


> If this work within one documentation set (as I believe it does)

It does not. For example, in http://docs.python.org/library/functions.html#max 
there's a reference to list.sort using :meth:`list.sort` but no link could be 
generated. How could it possibly work without decent documentation about the 
list data type?

--

___
Python tracker 

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



[issue12013] file /usr/local/lib/python3.1/lib-dynload/_socket.so: symbol inet_aton: referenced symbol not found

2011-05-06 Thread Éric Araujo

Éric Araujo  added the comment:

Looks like a compilation problem.  Did you install that Python yourself?  Can 
you run the test suite to see if there are problems with the _socket module?

--
nosy: +eric.araujo

___
Python tracker 

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



[issue12014] str.format parses replacement field incorrectly

2011-05-06 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +eric.araujo
versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6

___
Python tracker 

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



[issue12015] possible characters in temporary file name is too few

2011-05-06 Thread Éric Araujo

Éric Araujo  added the comment:

FWIW: Conformity with popular systems is not a goal.

--
nosy: +eric.araujo
versions:  -Python 3.1, Python 3.2, Python 3.4

___
Python tracker 

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



[issue12015] possible characters in temporary file name is too few

2011-05-06 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +ncoghlan, pitrou

___
Python tracker 

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



[issue12016] Wrong behavior for '\xff\n'.decode('gb2312', 'ignore')

2011-05-06 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +haypo, lemburg

___
Python tracker 

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



[issue12003] documentation: alternate version of xrange seems to fail.

2011-05-06 Thread Éric Araujo

Éric Araujo  added the comment:

Hi.  Python 2.6 is in security mode, its documentation is not updated nor 
released anymore.  Is this bug present in the documentation of 2.7 or 3.x 
versions?

--
nosy: +eric.araujo
versions:  -Python 2.6

___
Python tracker 

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



[issue11984] Wrong "See also" in symbol and token module docs

2011-05-06 Thread Éric Araujo

Éric Araujo  added the comment:

IIUC, the parser and token module somehow can be used together.  If so, the 
interlinks are okay, provided the text is revised to remove mention of the 
“second example”.  If I’m wrong, let’s remove the link.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue12014] str.format parses replacement field incorrectly

2011-05-06 Thread Eric V. Smith

Eric V. Smith  added the comment:

> but makes me think that treating "!" and ":" in the index field separately is 
> definitely wrong.

But it doesn't know they're in an index field when it's doing the parsing for 
':' or '!'.

It might be possible to change this so that the field name is fully parsed 
first, but I'm not sure the benefit would justify the effort. What's your use 
case where you need this feature?

--

___
Python tracker 

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



[issue12003] documentation: alternate version of xrange seems to fail.

2011-05-06 Thread alejandro david weil

alejandro david weil  added the comment:

Yes it is. I copied both versions but forgot to specify the second is in 2.7.

This is read in the current (2.7) documentation:
# from: http://docs.python.org/library/functions.html?highlight=xrange#xrange
islice(count(start, step), (stop-start+step-1)//step)

and test_xrange.py shows the output of this code against range(). The code 
includes 2 samples of parameters which gives the unexpected results.

--

___
Python tracker 

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



[issue11977] Document int.conjugate, .denominator, ...

2011-05-06 Thread Jonas H.

Jonas H.  added the comment:

It doesn't. Sphinx still can't make any links, which btw also means that it's 
impossible to reference those methods within the Python documentation.

Also I want to point out that I find the information very hard to find as a 
human. The fact that integers are based on `numbers.Number` is -- at this point 
in time where 95% of all Python developers don't know about the `numbers` 
module or abstract base classes in general -- an implementation detail and as 
such should not affect the way `int` is documented.

I propose to have decent class references for int, str, ... similar to the 
reference for dict -- that is, document all attributes and methods in one place 
and make them referencable. For those who want to deep-dive into CPython 
internals, a note about those functionality actually being implemented in ABCs 
could be added.

(But I think that's out of scope for this ticket. I could open a new one if 
anyone agrees with me... :-)

--

___
Python tracker 

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



[issue11977] Document int.conjugate, .denominator, ...

2011-05-06 Thread Georg Brandl

Georg Brandl  added the comment:

Reopening, it makes sense to have everything available for linking.

(Even if they are quite obscure attributes.)

--
nosy: +georg.brandl
status: closed -> open

___
Python tracker 

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



[issue11977] Document int.conjugate, .denominator, ...

2011-05-06 Thread Éric Araujo

Éric Araujo  added the comment:

> Also I want to point out that I find the information very hard to
> find as a human. The fact that integers are based on `numbers.Number`
> is -- at this point in time where 95% of all Python developers don't
> know about the `numbers` module or abstract base classes in general
> -- an implementation detail and as such should not affect the way
> `int` is documented.
Not really: int is not based on numbers.Number, but the ABC serves as 
documentation.

> I propose to have decent class references for int, str, ... similar
> to the reference for dict -- that is, document all attributes and
> methods in one place and make them referencable.
Hum, I think this should be fixed, but not with tons of text containing 
duplicated information (once for int, once for long, once for float...)  Ezio: 
you recently fixed a similar problem with collections ABCs methods; what’s your 
opinion here?

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue12014] str.format parses replacement field incorrectly

2011-05-06 Thread Eric V. Smith

Eric V. Smith  added the comment:

Note also that the nested expansion is only allowed in the format_spec part, 
per the documentation. Your last examples are attempting to do it in the 
field_name, which leads to the errors you see. Your very last example doesn't 
look right to me. I'll have to investigate why it's giving you that error 
message.

--

___
Python tracker 

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



[issue11975] Fix referencing of built-in types (list, int, ...)

2011-05-06 Thread Éric Araujo

Éric Araujo  added the comment:

str, list and friends are both functions and classes, if you want to go that 
way :)  Let’s keep purism out of this and discuss the result: we agree that 
missing links are a problem, so let’s fix it.

> How could it possibly work
What’s missing is class and method directives.  If you’re interested in 
submitting a patch, guidelines are found at 
http://docs.python.org/dev/documenting/markup#information-units and 
http://docs.python.org/devguide

> without decent documentation about the list data type?
I can understand your feelings, but such a comment is a bit harsh for all the 
volunteer time that’s been put into documenting Python.  
http://docs.python.org/dev/library/functions#list and 
http://docs.python.org/dev/library/stdtypes#typesseq seem quite “decent” to me.

--

___
Python tracker 

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



[issue11072] Add MLSD command support to ftplib

2011-05-06 Thread Eric V. Smith

Eric V. Smith  added the comment:

Yes, I think this should be committed. I think the API is reasonable, which is 
the primary concern. If there are implementation bugs, they can be addressed as 
they're found.

--

___
Python tracker 

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



  1   2   >