[issue17047] Fix double double words words

2013-03-12 Thread Ezio Melotti

Ezio Melotti added the comment:

The files in Modules/_ctypes/libffi/* shouldn't have been changed, but it 
probably doesn't matter much.  You also got the wrong issue id in Misc/NEWS 
(c162e2ff15bd).

--

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



[issue14707] extend() puzzled me.

2013-03-12 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


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

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



[issue17047] Fix double double words words

2013-03-12 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I should have made separate new in 3.3 and new in 3.4 patches to begin with. 
This suggests that we need to recheck with each version. Serhiy and Mathew, 
could you post your search re's or scripts to use again on occasion?

I unlinked the 2.7 news notice, rev82624, misdirected to 14707
 Documentation
 -
 
+- Issue #14707: remove doubled words in docs and docstrings
+  reported by Serhiy Storchaka and Matthew Barnett.
+
 - Issue #16406: combine the pages for uploading and registering to PyPI.
 
 - Issue #16403: Document how distutils uses the maintainer field in

I am unable to properly add the 2 line NEWS note to 3.2 (or 3.3) as explained 
in a response on the python-checkins list. The whole file is deleted and added 
back with three extra lines (I presume they are added), or even with just one 
blank line added, in a monster 319kb patch. If someone wants to add a corrected 
version of the above for 3.2,3,4 on *nix, please go ahead.

Ezio, I do not understand your comment. The only change that looks even 
possibly wrong is 'that that' to 'that', and I am pretty sure I checked the 
context.

--
assignee: terry.reedy - docs@python

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



[issue17399] test_multiprocessing hang on Windows, non-sockets

2013-03-12 Thread Terry J. Reedy

Terry J. Reedy added the comment:

running kill-python results in
Warning -- threading._dangling was modified by test_multiprocessing
Warning -- multiprocessing.process._dangling was modified by 
test_multiprocessing
test test_multiprocessing failed -- multiple errors occurred; run in verbose 
mode for details

-v added the attached details, and the test finished, though failed.

--
Added file: http://bugs.python.org/file29385/test_multi.txt

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



[issue17047] Fix double double words words

2013-03-12 Thread Ezio Melotti

Ezio Melotti added the comment:

AFAIK libffi is maintained externally, so as soon as it gets updated your 
changes will simply get lost (see #17192).  I replied on your python-checkins 
email.  If you still have problems I can add the NEWS entry on 3.x.

--

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



[issue17402] In mmap doc examples map() is shadowed

2013-03-12 Thread py.user

New submission from py.user:

http://docs.python.org/3/library/mmap.html

examples use map as a name for the mmap object

--
assignee: docs@python
components: Documentation
messages: 184015
nosy: docs@python, py.user
priority: normal
severity: normal
status: open
title: In mmap doc examples map() is shadowed
type: performance
versions: Python 3.3

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



[issue17402] In mmap doc examples map() is shadowed

2013-03-12 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
keywords: +easy
nosy: +ezio.melotti
stage:  - needs patch
type: performance - enhancement
versions: +Python 2.7, Python 3.2, Python 3.4

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



[issue17381] IGNORECASE breaks unicode literal range matching

2013-03-12 Thread Ezio Melotti

Ezio Melotti added the comment:

Is this the same issue described in #12728?

--

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



[issue17403] Robotparser fails to parse some robots.txt

2013-03-12 Thread Ben Mezger

New submission from Ben Mezger:

I am trying to parse Google's robots.txt (http://google.com/robots.txt) and it 
fails when checking whether I can crawl the url /catalogs/p? (which it's 
allowed) but it's returning false, according to my question on stackoverflow - 
http://stackoverflow.com/questions/15344253/robotparser-doesnt-seem-to-parse-correctly

Someone has answered it has to do with the line 
rllib.quote(urlparse.urlparse(urllib.unquote(url))[2]) in robotparser's 
module, since it removes the ? from the end of the url. 

Here is the answer I received - http://stackoverflow.com/a/15350039/1649067

--
components: Library (Lib)
messages: 184017
nosy: benmezger
priority: normal
severity: normal
status: open
title: Robotparser fails to parse some robots.txt
type: behavior
versions: Python 2.7

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



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

2013-03-12 Thread klappnase

Changes by klappnase klappn...@web.de:


--
title: ttk::themes missing form ttk.py - ttk::themes missing from ttk.py

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



[issue17399] test_multiprocessing hang on Windows, non-sockets

2013-03-12 Thread Richard Oudkerk

Richard Oudkerk added the comment:

Does this happen every time you run the tests?  (I don't see these errors.)

--

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



[issue17400] ipaddress.is_private needs to take into account of rfc6598

2013-03-12 Thread Christian Heimes

Christian Heimes added the comment:

According to Wikipedia [1] even more address ranges are reserved and 
non-routable. But only three address ranges are marked as private. So 
100.64.0.0/10 is reserved and non-routable but not considered a private address 
range.

[1] http://en.wikipedia.org/wiki/Reserved_IP_addresses

--
nosy: +christian.heimes

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



[issue17402] In mmap doc examples map() is shadowed

2013-03-12 Thread Aman Shah

Aman Shah added the comment:

Corrected map - mymap.

--
keywords: +patch
nosy: +Aman.Shah
Added file: http://bugs.python.org/file29386/issue17402.patch

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



[issue1669349] make install fails if no previous Python installation

2013-03-12 Thread Myroslav Opyr

Myroslav Opyr added the comment:

I've got the issue with Python 2.4.6 and solved the issue with changing 
sequence of altinstall steps (moved sharedinstall before libinstall). See 
attached 
Makefile-2.4.6-unicodedata-zipfile-libinstall-altinstall-sequence.patch.

--
nosy: +Myroslav.Opyr
Added file: 
http://bugs.python.org/file29387/Makefile-2.4.6-unicodedata-zipfile-libinstall-altinstall-sequence.patch

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



[issue11367] xml.etree.ElementTree.find(all): docs are wrong

2013-03-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 958217164846 by Eli Bendersky in branch '3.2':
Issue #11367: fix documentation of some find* methods in ElementTree
http://hg.python.org/cpython/rev/958217164846

New changeset 4012d4b41b2b by Eli Bendersky in branch '3.3':
Issue #11367: fix documentation of some find* methods in ElementTree
http://hg.python.org/cpython/rev/4012d4b41b2b

New changeset 7ae2c90f1ba2 by Eli Bendersky in branch 'default':
Issue #11367: fix documentation of some find* methods in ElementTree
http://hg.python.org/cpython/rev/7ae2c90f1ba2

--
nosy: +python-dev

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



[issue11367] xml.etree.ElementTree.find(all): docs are wrong

2013-03-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8e6db2462a77 by Eli Bendersky in branch '2.7':
Issue #11367: fix documentation of some find* methods in ElementTree
http://hg.python.org/cpython/rev/8e6db2462a77

--

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



[issue11367] xml.etree.ElementTree.find(all): docs are wrong

2013-03-12 Thread Eli Bendersky

Eli Bendersky added the comment:

Thanks for the patches - committed with slight adaptations (in default branch 
the internal documentation switched from comments to docstrings).

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

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



[issue17404] ValueError: can't have unbuffered text I/O for io.open(1, 'wt', 0)

2013-03-12 Thread Robert Collins

New submission from Robert Collins:

The io library rejects unbuffered text I/O, but this is not documented - and in 
fact can be manually worked around:
binstdout = io.open(sys.stdout.fileno(), 'wt', 0)
sys.stdout = io.TextIOWrapper(binstdout, encoding=sys.stdout.encoding)
will get a sys.stdout that is unbuffered.

Note that writing to a pipe doesn't really need to care about buffering anyway, 
if the user writes 300 characters, the codec will output a single block and the 
IO made will be one write:

This test script:
import sys
import io
stream = io.TextIOWrapper(io.open(sys.stdout.fileno(), 'wb', 0), 
encoding='utf8')
for r in range(10):
  stream.write(u'\u1234'*500)

When run under strace -c does exactly 10 writes: so the performance is 
predictable. IMO it doesn't make sense to prohibit unbuffered text write I/O. 
readers may be another matter, but that doesn't suffer the same latency issues.

--
messages: 184025
nosy: rbcollins
priority: normal
severity: normal
status: open
title: ValueError: can't have unbuffered text I/O for io.open(1, 'wt', 0)
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 
3.4, Python 3.5

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



[issue17047] Fix double double words words

2013-03-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 Serhiy and Mathew, could you post your search re's or scripts to use again on 
 occasion?

For example:

  find * -type f -name '*.[ch]' -exec egrep -n '\b([a-zA-Z]+) \1\b' '{}' + | 
grep -v 'long long' | egrep --color '\b([a-zA-Z]+) \1\b'
  find * -type f -name '*.py' -exec egrep -n --color '\b([a-zA-Z]+) \1\b' '{}' +

And similar one-time one-liners for *.rst, *.txt, etc.

--

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



[issue17368] Python version of JSON decoder does not work with object_pairs_hook

2013-03-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM. Perhaps with object_pairs_hook=tuple or object_pairs_hook=dict this test 
will look simpler.

--

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



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

2013-03-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Can you provide some tests for the new method?

--
nosy: +gpolo, serhiy.storchaka
stage:  - test needed
versions: +Python 3.4

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



[issue17404] ValueError: can't have unbuffered text I/O for io.open(1, 'wt', 0)

2013-03-12 Thread Serhiy Storchaka

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


--
components: +IO
nosy: +benjamin.peterson, hynek, pitrou, stutzbach
versions:  -Python 2.6, Python 3.1, Python 3.5

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



[issue17047] Fix double double words words

2013-03-12 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I emailed the libffi subpatch to libffi-discuss.
Please add the 3.x news entry if you can get to it before I am able.
Then this issue can be closed, though the problem will obviously recur without 
an automatic check.

--

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



[issue17399] test_multiprocessing hang on Windows, non-sockets

2013-03-12 Thread Terry J. Reedy

Terry J. Reedy added the comment:

All 4 or 5 times I tried on 3.2, yes.

--

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



[issue17400] ipaddress.is_private needs to take into account of rfc6598

2013-03-12 Thread pmoody

pmoody added the comment:

I don't see anyway to actually assign this bug to myself, but I'll get a patch 
for this.

--
nosy: +pmoody

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



[issue17405] Add _Py_memset_s() to securely clear memory

2013-03-12 Thread Christian Heimes

New submission from Christian Heimes:

Compilers like GCC optimize away code like memset(var, 0, sizeof(var)) if the 
code occurs at the end of a function and var is not used anymore [1]. But 
security relevant code like hash and encryption use this to overwrite sensitive 
data with zeros.

The code in _sha3module.c uses memset() to clear its internal state. The other 
hash modules don't clear their internal states yet.


There exists a couple of solutions for the problem:

 * C11 [ISO/IEC 9899:2011] has a memset_s() function
 * MSVC has SecureZeroMemory()
 * GCC can disable the optimization with #pragma GCC optimize (O0) since GCC 
4.4
 * [2] contains an example for a custom implementation of memset_s() with 
volatile.

[1] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8537

[2] 
https://www.securecoding.cert.org/confluence/display/seccode/MSC06-C.+Be+aware+of+compiler+optimization+when+dealing+with+sensitive+data

--
assignee: christian.heimes
messages: 184032
nosy: christian.heimes
priority: normal
severity: normal
stage: needs patch
status: open
title: Add _Py_memset_s() to securely clear memory
type: security
versions: Python 3.4

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



[issue17405] Add _Py_memset_s() to securely clear memory

2013-03-12 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Even if you get the memset to actually run, that's hardly sufficient for 
security. The OS can could have swapped it to disk.

--
nosy: +benjamin.peterson

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



[issue17405] Add _Py_memset_s() to securely clear memory

2013-03-12 Thread Christian Heimes

Christian Heimes added the comment:

mlock() can prevent swapping but it may need extra capabilities. A working 
memset_s() removes critical information from core dumps at least.

If we don't want to add _Py_memset_s() then I'm going to remove the 
dysfunctional clearstate macro from my sha3 module.

--
nosy: +gregory.p.smith

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



[issue17399] test_multiprocessing hang on Windows, non-sockets

2013-03-12 Thread Richard Oudkerk

Richard Oudkerk added the comment:

Could you try the following program:

import socket
import multiprocessing
import multiprocessing.reduction
import multiprocessing.connection

def socketpair():
with socket.socket() as l:
l.bind(('localhost', 0))
l.listen(1)
s = socket.socket()
s.connect(l.getsockname())
a, _ = l.accept()
return s, a

def bar(s):
print(s)
s.sendall(b'from bar')

if __name__ == '__main__':
a, b = socketpair()
p = multiprocessing.Process(target=bar, args=(b,))
p.start()
b.close()
print(a.recv(100))

--

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



[issue17405] Add _Py_memset_s() to securely clear memory

2013-03-12 Thread Benjamin Peterson

Benjamin Peterson added the comment:

I'm not saying don't add it, just that you can't really win in the securely 
deleting data game unless you have special hardware.

--

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



[issue17399] test_multiprocessing hang on Windows, non-sockets

2013-03-12 Thread Terry J. Reedy

Terry J. Reedy added the comment:

In Command Prompt, 3.2 gave same error as before, 3.3 a different error.
multi-test.txt has full tracebacks.

--
Added file: http://bugs.python.org/file29388/mult-test.txt

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



[issue17400] ipaddress.is_private needs to take into account of rfc6598

2013-03-12 Thread Santoso Wijaya

Changes by Santoso Wijaya santoso.wij...@gmail.com:


--
nosy: +santa4nt

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



[issue17402] In mmap doc examples map() is shadowed

2013-03-12 Thread py.user

py.user added the comment:

how about mm ?

--

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



[issue17399] test_multiprocessing hang on Windows, non-sockets

2013-03-12 Thread Richard Oudkerk

Richard Oudkerk added the comment:

Now could you try the attached file?  (It will not work on 2.7 because a 
missing socket.fromfd().)

P.S. It looks like the error for 3.3 is associated with a file 
f:\python\mypy\traceback.py which presumably clashes with the one in the 
standard library.

--
Added file: http://bugs.python.org/file29389/inherit_socket.py

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



[issue17402] In mmap doc examples map() is shadowed

2013-03-12 Thread py.user

Changes by py.user bugzilla-mail-...@yandex.ru:


Added file: http://bugs.python.org/file29390/mm.patch

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



[issue17404] ValueError: can't have unbuffered text I/O for io.open(1, 'wt', 0)

2013-03-12 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

The proposed workaround seems to work (wb instead of wt!), with the 
following restrictions:

- it's not really unbuffered: the encoder has its own buffers (OK, in the 
stdlib only 'idna' encoding will retain data)

- it won't work for reading: TextIOWrapper calls the read1() method, which is 
only defined by BufferedIO objects.

IMO this explains why it's not a supported combination in io.open().

--
nosy: +amaury.forgeotdarc

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



[issue17404] ValueError: can't have unbuffered text I/O for io.open(1, 'wt', 0)

2013-03-12 Thread Robert Collins

Robert Collins added the comment:

Huh, I didn't realise idna would retain data! But that will still be within the 
TextIOWrapper itself, right?

And a stream opened 'wt' cannot be read from anyway, so the read1 limitation is 
irrelevant.

--

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



[issue17399] test_multiprocessing hang on Windows, non-sockets

2013-03-12 Thread Terry J. Reedy

Terry J. Reedy added the comment:

According to difflib, the attached file is identical with the code in your 
previous message. With my traceback renamed, both files print b'from bar' with 
3.3 and the same error message as before with 3.2.

--

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



[issue17399] test_multiprocessing hang on Windows, non-sockets

2013-03-12 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Let me try downloading again.

--

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



[issue17405] Add _Py_memset_s() to securely clear memory

2013-03-12 Thread Gregory P. Smith

Gregory P. Smith added the comment:

I'd personally say don't bother with this.  Let people who _need_ this use 
their own C extension modules to handle all secure data as we're not in a 
position to make and test any guarantees about what happens to data anywhere 
within a Python VM.

If this is added, at least document it (comments since its an _internal 
function) as being best effort with no guarantee that it is better than nothing.

--

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



[issue17399] test_multiprocessing hang on Windows, non-sockets

2013-03-12 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Both 3.2 and 3.3 give essentially the same traceback as 3.2 did before, both 
with installed python and yesterdays debug builds.

--
Added file: http://bugs.python.org/file29391/multi-test2.txt

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



[issue17404] ValueError: can't have unbuffered text I/O for io.open(1, 'wt', 0)

2013-03-12 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

 But that will still be within the TextIOWrapper itself, right?

Yes. And I just noticed that the _io module (the C version) will also buffer 
encoded bytes, up to f._CHUNK_SIZE.

On the other hand, TextIOWrapper is broken for buffering codecs, encode() is 
never called with final=True

 import io
 buffer = io.BytesIO()  # -- not really buffered, right?
 output = io.TextIOWrapper(buffer, encoding='idna')
 output.write(www.somesite.com)
16
 print(buffer.getvalue())
b''# -- ok, _CHUNK_SIZE buffering
 output.flush()
 print(buffer.getvalue())
b'www.somesite.'   # -- the last word is missing!
 output.close()
 print(buffer.getvalue())
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: I/O operation on closed file.


And it's even worse with python 2.7::

 import io as io
 buffer = io.BytesIO()
 output = io.TextIOWrapper(buffer, encoding='idna')
 output.write(www.somesite.com)
Traceback (most recent call last):
  File stdin, line 3, in module
TypeError: must be unicode, not str

--

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



[issue17232] Improve -O docs

2013-03-12 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I added :const: and tweaked -OO entry and -h startup display.
Tested new html and python_d -h. Any other comments before I apply?

--
assignee: docs@python - terry.reedy
Added file: http://bugs.python.org/file29392/17232-O.diff

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



[issue17232] Improve -O docs

2013-03-12 Thread Antoine Pitrou

Antoine Pitrou added the comment:

There's a typo in your patch:

+-O : remove assert and __debug__-dependent statements; change .py\n\
+ to .pyo; also PYTHONOPTIMIZE=x\n\

should say .pyc, not .py.

--

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



[issue17232] Improve -O docs

2013-03-12 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Also, in 3.2 and higher I'm not sure there's a point in mentioning pyc/pyo 
files; they're all shelved in __pycache__ now.

--

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



[issue17399] test_multiprocessing hang on Windows, non-sockets

2013-03-12 Thread Richard Oudkerk

Richard Oudkerk added the comment:

 Both 3.2 and 3.3 give essentially the same traceback as 3.2 did before, 
 both with installed python and yesterdays debug builds.

It looks like on your machine socket handles are not correctly inherited by 
child processes -- I had assumed that they always would be.

I suppose to fix things for 3.2 and earlier it would be necessary to backport 
the functionality of socket.socket.share() and socket.fromshare() from 3.3.

--

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



[issue17232] Improve -O docs

2013-03-12 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I corrected my copy of the .diff.

Since this issue is so far focused on removing the false optimize claim, hiding 
.pyx info is a new sub-issue. I will follow whatever the consensus is, but 
since this is a cpython-specific doc and help, I would prefer to give complete 
info. In fact, I would like to add 'stored in __pycache__' or even 'hidden away 
in  __pycache__', the latter to suggest that most people should generally 
forget about them. On Windows, _xxx files like __pycache__ appear in both 
Command Prompt dir and Explorer file listings, so beginners need to known that 
__cache__ is both normal and ignorable.

--

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



[issue17400] ipaddress.is_private needs to take into account of rfc6598

2013-03-12 Thread Lei Miao

Lei Miao added the comment:

Thanks Peter.

On 13 March 2013 03:35, pmoody rep...@bugs.python.org wrote:


 pmoody added the comment:

 I don't see anyway to actually assign this bug to myself, but I'll get a
 patch for this.

 --
 nosy: +pmoody

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue17400
 ___


--

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



[issue17399] test_multiprocessing hang on Windows, non-sockets

2013-03-12 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


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

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



[issue17399] test_multiprocessing hang on Windows, non-sockets

2013-03-12 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


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

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



[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2013-03-12 Thread Piotr Dobrogost

Piotr Dobrogost added the comment:

@sbt

 (...) and it seems that on Windows open() is more or less implemented
 as a wrapper of sopen(..., ..., SH_DENYNO, ...).

 So the only reason that trying to reopen a NamedTemporaryFile fails on
 Windows is because when we reopen we need to use O_TEMPORARY.

Could you elaborate on this? What's the relation between SH_DENYNO argument to 
sopen() and O_TEMPORARY flag?

--

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



[issue17399] test_multiprocessing hang on Windows, non-sockets

2013-03-12 Thread Terry J. Reedy

Terry J. Reedy added the comment:

My original report was for 32 bit debug build on 64 bit Win 7 machine. I just 
re-ran test_multiprocessing with installed 64 bit python with same result. Was 
I don't see these errors. on different Windows or non-Windows.

One option is to skip the failing sub-tests on Windows, like some other 
sub-tests:
skipped 'does not work with windows sockets'
and consider the limitation on use of multi-processing in 2.7,3.2 as won't 
fix. (My view is that 3.2 users should upgrade as soon as dependencies allow.) 
Backporting new features requires pydev discussion.

--

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



[issue17399] test_multiprocessing hang on Windows, non-sockets

2013-03-12 Thread Richard Oudkerk

Richard Oudkerk added the comment:

 My original report was for 32 bit debug build on 64 bit Win 7 machine.
 I just re-ran test_multiprocessing with installed 64 bit python with same 
 result. Was I don't see these errors. on different Windows or non-Windows.

On 64-bit Windows 7 with both 32 and 64 bit builds.

 One option is to skip the failing sub-tests on Windows, like some other 
 sub-tests:
 skipped 'does not work with windows sockets'
 and consider the limitation on use of multi-processing in 2.7,3.2 as won't 
 fix. 
 (My view is that 3.2 users should upgrade as soon as dependencies allow.) 

Yes, I would be inclined to do that.

 Backporting new features requires pydev discussion.

I only meant exposing that functionality in the private _multiprocessing 
extension.

--

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



[issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows

2013-03-12 Thread Richard Oudkerk

Richard Oudkerk added the comment:

Sorry, I was not very clear.

If you use the O_TEMPORARY flag with open() to get a file handle, then the 
share mode used with the underlying CreateFile() function is 

X = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE

whereas, if you don't use O_TEMPORARY then the share mode is

Y = FILE_SHARE_READ | FILE_SHARE_WRITE

While a handle is open with share mode X, you can only reopen the file if you 
also use share mode X.  Therefore (using the msvcrt) you can only reopen it 
using O_TEMPORARY.*


* sopen() does give some extra control over the share mode, but you still can't 
use it to get share mode X without also using O_TEMPORARY.

--

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



[issue17406] Upload Windows 9x/NT4 build

2013-03-12 Thread André Gillibert

New submission from André Gillibert:

Since Python 2.6 and 2.7 officially don't support Windows 95/98/Me and Windows 
NT 3.51/4.0, I created a build running on these Windows versions.

May I upload them so you can show them on your Web site?

--
components: Build
messages: 184057
nosy: NanoTech
priority: normal
severity: normal
status: open
title: Upload Windows 9x/NT4 build
type: enhancement
versions: Python 2.6, Python 2.7

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



[issue17406] Upload Windows 9x/NT4 build

2013-03-12 Thread Ezio Melotti

Ezio Melotti added the comment:

I don't think that is possible -- on python.org we only host our own builds.  
Also the bug tracker is not the right place to discuss this, the website 
mailing list is probably more appropriate.

--
nosy: +ezio.melotti
resolution:  - rejected
stage:  - committed/rejected
status: open - closed

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



[issue17399] test_multiprocessing hang on Windows, non-sockets

2013-03-12 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Same OS, different hardware, drivers, and buried settings, surprisingly 
different behavior. Oh, well. I will test any changes you decide on that need 
testing.

--

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



[issue17368] Python version of JSON decoder does not work with object_pairs_hook

2013-03-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4a5ad099b176 by Ezio Melotti in branch '2.7':
#17368: Fix an off-by-one error in the Python JSON decoder that caused a 
failure while decoding empty object literals when object_pairs_hook was 
specified.
http://hg.python.org/cpython/rev/4a5ad099b176

New changeset 40c36d873f41 by Ezio Melotti in branch '3.2':
#17368: Fix an off-by-one error in the Python JSON decoder that caused a 
failure while decoding empty object literals when object_pairs_hook was 
specified.
http://hg.python.org/cpython/rev/40c36d873f41

New changeset dd2fad6b47c0 by Ezio Melotti in branch '3.3':
#17368: merge with 3.2.
http://hg.python.org/cpython/rev/dd2fad6b47c0

New changeset 885ffda21849 by Ezio Melotti in branch 'default':
#17368: merge with 3.3.
http://hg.python.org/cpython/rev/885ffda21849

--
nosy: +python-dev

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



[issue17407] RotatingFileHandler issue when using multiple loggers instances (but one process/thread) to the same file

2013-03-12 Thread James Kesser

New submission from James Kesser:

I believe I have come across a bug with RotatingFileHandler in 
logging/handlers.py

The attached script shows that when you are logging using RotatingFileHandler 
pointed at the same file from multiple logger instances, it works at first 
showing logging events from each. However, after the first rotation occurs, the 
events seem to be group together and do not get logged in order. Instead they 
are logged in groups according to which instance is performing the logging.

NOTE: While searching for a bug report of this issue I was flooded with issues 
relating to multiple processes. This is not the case here. I have attached a 
script and the log files that are generated when running this as a single 
process / thread.

first log file contains:

a aaa...
b bbb...
a aaa...
b bbb...
a aaa...
b bbb...
a aaa...
b bbb...
a aaa...

subsequent log files contain events all from either a or b only, not 
intertwined like you would expect.

I first noticed this using v2.4.3 of the logging library, however I was able to 
reproduce this on 2.7 and 3.3 as well.

--
components: Library (Lib)
files: rotating_file_handler_test.tar
messages: 184061
nosy: James.Kesser
priority: normal
severity: normal
status: open
title: RotatingFileHandler issue when using multiple loggers instances (but one 
process/thread) to the same file
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file29393/rotating_file_handler_test.tar

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



[issue17368] Python version of JSON decoder does not work with object_pairs_hook

2013-03-12 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed.  I used OrderedDict to make sure that the object hook is actually used.

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

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



[issue17402] In mmap doc examples map() is shadowed

2013-03-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c226133b1493 by Ezio Melotti in branch '2.7':
#17402: avoid shadowing built-in map in mmap examples.  Initial patch by Aman 
Shah.
http://hg.python.org/cpython/rev/c226133b1493

New changeset df27ea4bdebd by Ezio Melotti in branch '3.2':
#17402: avoid shadowing built-in map in mmap examples.  Initial patch by Aman 
Shah.
http://hg.python.org/cpython/rev/df27ea4bdebd

New changeset bf0632a17ab4 by Ezio Melotti in branch '3.3':
#17402: merge with 3.2.
http://hg.python.org/cpython/rev/bf0632a17ab4

New changeset b49971a1e70d by Ezio Melotti in branch 'default':
#17402: merge with 3.3.
http://hg.python.org/cpython/rev/b49971a1e70d

--
nosy: +python-dev

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



[issue17402] In mmap doc examples map() is shadowed

2013-03-12 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the report and the patches!
(py.user, if you specify your real name, next time I can give you credits too.)

--
assignee: docs@python - ezio.melotti
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed

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



[issue17387] Error in C API documentation of PySequenceMethods

2013-03-12 Thread Alex Orange

Alex Orange added the comment:

I must admit I'm a little new to the development side of things. Can someone 
point me at a repo or something that the documentation files are in? I'm sort 
of guessing that the html is the processed output of something.

--

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



[issue17387] Error in C API documentation of PySequenceMethods

2013-03-12 Thread Ezio Melotti

Ezio Melotti added the comment:

See http://docs.python.org/devguide/ and the Doc/c-api dir in the CPython repo.

--

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



[issue7980] time.strptime not thread safe

2013-03-12 Thread William McBrine

William McBrine added the comment:

I'm still seeing this, in the 2.7.2 that comes with OS X 10.8.2.

--
nosy: +William.McBrine

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



[issue17407] RotatingFileHandler issue when using multiple loggers instances (but one process/thread) to the same file

2013-03-12 Thread Ned Deily

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


--
nosy: +vinay.sajip

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



[issue17307] HTTP PUT request Example

2013-03-12 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Karl, I am getting back to this. Thanks for your review comments on the patch.

1. Agree with your explanation on HTTP PUT. I shall modify the comment.
2. I think, it is okay to remove the HTTP PUT server example. I wrote it for 
test purposes and I think, it is a good idea to publish the test servers in the 
python docs.

--

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



[issue14468] Update cloning guidelines in devguide

2013-03-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 50e726533391 by Ezio Melotti in branch 'default':
#14468: move a paragraph and link to the list of branches.
http://hg.python.org/devguide/rev/50e726533391

--

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