[issue23063] `python setup.py check --restructuredtext --strict --metadata` fails with: `warning: check: Could not finish the parsing.` if the RST document uses code or code-block directives.

2014-12-16 Thread Marc Abramowitz

Marc Abramowitz added the comment:

Testing a few common cases:

$ python setup.py check --restructuredtext --strict --metadata
running check
error: The docutils package is needed.

$ python setup.py check --restructuredtext --strict --metadata
running check
warning: check: Cannot analyze code. Pygments package not found. (line 66)

warning: check: Cannot analyze code. Pygments package not found. (line 99)

error: Please correct your package.

$ python setup.py check --restructuredtext --strict --metadata  echo RST was 
OK.
running check
RST was OK.

--

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



[issue23063] `python setup.py check --restructuredtext --strict --metadata` fails with: `warning: check: Could not finish the parsing.` if the RST document uses code or code-block directives.

2014-12-16 Thread Marc Abramowitz

Marc Abramowitz added the comment:

Note that this patch does 2 things:

1. Improves the error message
2. Prevents check from failing when there are code-blocks

If I only did #1 and not #2, then output looks like this:

$ python setup.py check --restructuredtext --strict --metadata  echo RST was 
OK.
running check
warning: check: Could not finish the parsing: 'Values' object has no attribute 
'syntax_highlight'.

error: Please correct your package.

--

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



[issue22733] MSVC ffi_prep_args doesn't handle 64-bit arguments properly

2014-12-16 Thread Tim Golden

Tim Golden added the comment:

Likewise.

--

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



[issue14134] xmlrpc.client.ServerProxy needs timeout parameter

2014-12-16 Thread Demian Brecht

Demian Brecht added the comment:

 in GNU/Linux system timeout has been reached -- means that  system timeout 
 will *never* reached.

That's quite likely because the system limits may be very large. For example, 
on my OSX box:

--- ~ » sysctl net.inet.tcp.keepinit
net.inet.tcp.keepinit: 75000

According to Apple developer docs, this is in seconds. Meaning for your example 
to run all 100 iterations, you'd be looking at an inordinate amount of time to 
finish a loop that timed out at each connection attempt and deferred to system 
defaults for the timeout value. Not exactly never, but far from a reasonable 
time frame. Of course, this can be tuned to a more reasonable limit.

--

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



[issue20577] IDLE: Remove FormatParagraph's width setting from config dialog

2014-12-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 51de0da524b4 by Terry Jan Reedy in branch '2.7':
Issue #20577: move configuration of FormatParagraph extension to new extension
https://hg.python.org/cpython/rev/51de0da524b4

New changeset 3ffa8438d274 by Terry Jan Reedy in branch '3.4':
Issue #20577: move configuration of FormatParagraph extension to new extension
https://hg.python.org/cpython/rev/3ffa8438d274

--
nosy: +python-dev

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



[issue14134] xmlrpc.client.ServerProxy needs timeout parameter

2014-12-16 Thread Andrej A Antonov

Andrej A Antonov added the comment:

I just will write next code-fragment:

import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP)
s.connect(('python.org', 80))
print(
'is my operation system using (by default) tcpkeepalive-algorithm 
for testing broken-connection? answer:',
s.getsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE)
)
# answer is 0 (false) -- for all GNU/Linux


my previous code-example has 100-iteration -- only for we could catch the 
right-moment when testing (and for nothing else).

--

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



[issue20577] IDLE: Remove FormatParagraph's width setting from config dialog

2014-12-16 Thread Terry J. Reedy

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


--
assignee:  - terry.reedy
resolution:  - fixed
stage: commit review - resolved
status: open - closed

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



[issue14134] xmlrpc.client.ServerProxy needs timeout parameter

2014-12-16 Thread Andrej A Antonov

Andrej A Antonov added the comment:

 in GNU/Linux system timeout has been reached -- means that  system timeout 
 will *never* reached.

 That's quite likely because the system limits may be very large.

I tested system-timeout GNU/Linux (on various computers). I waited more then 5 
days. system-timeout works on GNU/Linux -- only if was custom-set tcpkeepalive, 
else (by default): even after 5 days system-timeout was not reached.

--

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



[issue23060] Assert fails in multiprocessing.heap.Arena.__setstate__ on Windows

2014-12-16 Thread Tim Golden

Tim Golden added the comment:

I agree that this is a fragile assertion; it's too far removed from the
CreateFileMapping call which can generate it and almost impossible to
work around (in calling code) if it should fail in the way we're seeing
in the buildbot.

I think we're better off relying on a genuine exception bubbling up from
the CreateFileMapping/MapViewOfFile calls than trying to assert the
no-exception error return.

While the preallocate self.buffer hack you mention would probably have
the effect of preventing the assertion, it's really just adding another
layer of unwanted complexity. (And might still not work in some future
memory-allocation algorithm).

@Richard: if you're watching, have I missed anything?

--

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



[issue22980] C extension naming doesn't take bitness into account

2014-12-16 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 16.12.2014 05:54, Steve Dower wrote:
 Nobody seemed too bothered by it, so I committed a slightly simpler change 
 that only includes the most specific tag (that is, .cp35-win32.pyd or 
 .pyd). We can always add another tag easily enough if it seems useful, or 
 roll this change back if it was a mistake.

I'm not sure the format you've chosen is a good idea. We now have
a different tag for .pyc (PEP 3149) and .pyd files, in addition
to yet another tag format defined in wheels (PEP 425 and PEP 427).

The .pyd format looks similar to PEP 425 abi tag + platform tag,
but it's missing the abi flags.

IMO, we should use one of the available PEP standards instead
of creating yet another variant.

The checkin also only adds import support for the tags.

Shouldn't distutils also be changed to create such .pyd files
per default or at least via an option ?

--

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



[issue23064] pep8 asyncore.py

2014-12-16 Thread liu chang

New submission from liu chang:

pep8 Lib/asycore.py.

--
components: Library (Lib)
files: pep8-asyncore.patch
hgrepos: 287
keywords: patch
messages: 232730
nosy: 畅.刘
priority: normal
severity: normal
status: open
title: pep8 asyncore.py
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file37462/pep8-asyncore.patch

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



[issue14134] xmlrpc.client.ServerProxy needs timeout parameter

2014-12-16 Thread Andrej A Antonov

Andrej A Antonov added the comment:

@demian.brecht , for high probably to catch *infinite_freeze* (at GNU/Linux) -- 
if we may will run requests of xmlrpc.client.ServerProxy -- parallely:


(when running next code -- need to make some network-disconnections on 
network-router-computer)



#!/usr/bin/env python3

import threading
from xmlrpc.client import ServerProxy

ITERATION_COUNT = 100
THREAD_COUNT = 100

def thread_func(thread_name):
for i in range(ITERATION_COUNT):
try:
server = ServerProxy(http://betty.userland.com;)
rpc_result = server.examples.getStateName(41)
print('{}/iter_{} {!r}'.format(thread_name, i, rpc_result))
except Exception as e:
print('{}/iter_{} error: {} {}'.format(thread_name, i, type(e), 
str(e)))

def main():
print('* testing begin *')

thread_list = []

for i in range(THREAD_COUNT):
thread_name = 'thread_{}'.format(i)
thread_list.append(threading.Thread(target=thread_func, 
args=(thread_name,)))

for thr in thread_list:
thr.start()

for thr in thread_list:
thr.join()

print('* testing end *')

if __name__ == '__main__':
main()

--

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



[issue21619] Cleaning up a subprocess with a broken pipe

2014-12-16 Thread Martin Panter

Martin Panter added the comment:

Here is a patch to fix this by calling wait() even if stdin.close() fails, 
including a test case. With my patch, the subprocess context manager __exit__() 
will still raise a BrokenPipeError, but no zombie will be left.

--
keywords: +patch
Added file: http://bugs.python.org/file37463/pipe-cleanup.patch

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



[issue23065] Pyhton27.dll at SysWOW64 not updated when updating Python 2.7.X

2014-12-16 Thread GamesGamble

New submission from GamesGamble:

Hello,
the Python27.dll at C:\Windows\SysWOW64 not get updated when updating Python 
2.7.X at Windows 7 SP1 (Reported weak spot from Kaspersky Pure 3.0 weak spot 
search). When I´am manually deinstalling Python und install Python after 
deinstalling It got the updated *.dll .

--
components: Windows
messages: 232733
nosy: GamesGamble, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Pyhton27.dll at SysWOW64 not updated when updating Python 2.7.X
type: security
versions: Python 2.7

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



[issue23063] `python setup.py check --restructuredtext --strict --metadata` fails with: `warning: check: Could not finish the parsing.` if the RST document uses code or code-block directives.

2014-12-16 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
keywords: +patch
Added file: http://bugs.python.org/file37464/cfabe07bc98f.diff

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



[issue23063] `python setup.py check --restructuredtext --strict --metadata` fails with: `warning: check: Could not finish the parsing.` if the RST document uses code or code-block directives.

2014-12-16 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
stage:  - patch review
versions:  -Python 3.2, Python 3.3, Python 3.6

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



[issue23063] `python setup.py check --restructuredtext --strict --metadata` fails with: `warning: check: Could not finish the parsing.` if the RST document uses code or code-block directives.

2014-12-16 Thread Berker Peksag

Berker Peksag added the comment:

Could you add a test? See Lib/distutils/tests/test_check.py.

--
nosy: +berker.peksag

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



[issue23056] tarfile raises an exception when reading an empty tar in streaming mode

2014-12-16 Thread liu chang

liu chang added the comment:

2232 def next(self):
2233 Return the next member of the archive as a TarInfo object, when
2234TarFile is opened for reading. Return None if there is no more
2235available.
2236 
2237 self._check(ra)
2238 if self.firstmember is not None:
2239 m = self.firstmember
2240 self.firstmember = None
2241 return m
2242 
2243 # Read the next block.
2244 self.fileobj.seek(self.offset)
2245 tarinfo = None

raise a StreamError at #2244, It should catch this Error and return None. I 
would like to post a patch to fix it.

--
nosy: +liu chang

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



[issue23056] tarfile raises an exception when reading an empty tar in streaming mode

2014-12-16 Thread liu chang

liu chang added the comment:

a simple fix

--
keywords: +patch
Added file: http://bugs.python.org/file37465/fix-tar-23056.patch

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



[issue23055] PyUnicode_FromFormatV crasher

2014-12-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is updated patch for 2.7 (backported tests from 3.5), patches for 3.2 and 
3.3.

--
Added file: http://bugs.python.org/file37466/issue23055-2.7-2.patch
Added file: http://bugs.python.org/file37467/issue23055-3.2.patch
Added file: http://bugs.python.org/file37468/issue23055-3.3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23055
___diff -r 9927781e457f Lib/test/test_unicode.py
--- a/Lib/test/test_unicode.py  Mon Dec 15 14:02:43 2014 +0200
+++ b/Lib/test/test_unicode.py  Tue Dec 16 13:52:24 2014 +0200
@@ -1700,6 +1700,9 @@ class UnicodeTest(
 if sys.maxunicode  0x:
 check_format(u'\U0010',
  b'%c', c_int(0x10))
+else:
+with self.assertRaises(OverflowError):
+PyUnicode_FromFormat(b'%c', c_int(0x1))
 with self.assertRaises(OverflowError):
 PyUnicode_FromFormat(b'%c', c_int(0x11))
 # Issue #18183
@@ -1750,8 +1753,45 @@ class UnicodeTest(
  b'%zu', c_size_t(123))
 
 # test long output
+min_long = -(2 ** (8 * sizeof(c_long) - 1))
+max_long = -min_long - 1
+check_format(unicode(min_long),
+ b'%ld', c_long(min_long))
+check_format(unicode(max_long),
+ b'%ld', c_long(max_long))
+max_ulong = 2 ** (8 * sizeof(c_ulong)) - 1
+check_format(unicode(max_ulong),
+ b'%lu', c_ulong(max_ulong))
 PyUnicode_FromFormat(b'%p', c_void_p(-1))
 
+# test padding (width and/or precision)
+check_format(u'123'.rjust(10, u'0'),
+ b'%010i', c_int(123))
+check_format(u'123'.rjust(100),
+ b'%100i', c_int(123))
+check_format(u'123'.rjust(100, u'0'),
+ b'%.100i', c_int(123))
+check_format(u'123'.rjust(80, u'0').rjust(100),
+ b'%100.80i', c_int(123))
+
+check_format(u'123'.rjust(10, u'0'),
+ b'%010u', c_uint(123))
+check_format(u'123'.rjust(100),
+ b'%100u', c_uint(123))
+check_format(u'123'.rjust(100, u'0'),
+ b'%.100u', c_uint(123))
+check_format(u'123'.rjust(80, u'0').rjust(100),
+ b'%100.80u', c_uint(123))
+
+check_format(u'123'.rjust(10, u'0'),
+ b'%010x', c_int(0x123))
+check_format(u'123'.rjust(100),
+ b'%100x', c_int(0x123))
+check_format(u'123'.rjust(100, u'0'),
+ b'%.100x', c_int(0x123))
+check_format(u'123'.rjust(80, u'0').rjust(100),
+ b'%100.80x', c_int(0x123))
+
 # test %V
 check_format(u'repr=abc',
  b'repr=%V', u'abc', b'xyz')
diff -r 9927781e457f Misc/NEWS
--- a/Misc/NEWS Mon Dec 15 14:02:43 2014 +0200
+++ b/Misc/NEWS Tue Dec 16 13:52:24 2014 +0200
@@ -10,6 +10,9 @@ What's New in Python 2.7.10?
 Core and Builtins
 -
 
+- Issue #23055: Fixed a buffer overflow in PyUnicode_FromFormatV.  Analysis
+  and fix by Guido Vranken.
+
 - Issue #23048: Fix jumping out of an infinite while loop in the pdb.
 
 Library
diff -r 9927781e457f Objects/unicodeobject.c
--- a/Objects/unicodeobject.c   Mon Dec 15 14:02:43 2014 +0200
+++ b/Objects/unicodeobject.c   Tue Dec 16 13:52:24 2014 +0200
@@ -735,15 +735,10 @@ PyUnicode_FromFormatV(const char *format
   * objects once during step 3 and put the result in an array) */
 for (f = format; *f; f++) {
  if (*f == '%') {
- if (*(f+1)=='%')
- continue;
- if (*(f+1)=='S' || *(f+1)=='R')
- ++callcount;
- while (isdigit((unsigned)*f))
- width = (width*10) + *f++ - '0';
- while (*++f  *f != '%'  !isalpha((unsigned)*f))
- ;
- if (*f == 's')
+ f++;
+ while (*f  *f != '%'  !isalpha((unsigned)*f))
+ f++;
+ if (*f == 's' || *f=='S' || *f=='R')
  ++callcount;
  }
 }
@@ -760,12 +755,16 @@ PyUnicode_FromFormatV(const char *format
 /* step 3: figure out how large a buffer we need */
 for (f = format; *f; f++) {
 if (*f == '%') {
-const char* p = f;
+const char* p = f++;
 width = 0;
 while (isdigit((unsigned)*f))
 width = (width*10) + *f++ - '0';
-while (*++f  *f != '%'  !isalpha((unsigned)*f))
-;
+precision = 0;
+if (*f == '.') {
+f++;
+while (isdigit((unsigned)*f))
+precision = (precision*10) + *f++ - '0';
+}
 
 /* skip the 'l' or 'z' in {%ld, %zd, %lu, %zu} since
  * they 

[issue19858] Make pickletools.optimize aware of the MEMOIZE opcode.

2014-12-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch which addresses Antoine's comments. Also added dis() output for 
binary example in comments.

--
Added file: http://bugs.python.org/file37469/pickle_optimize_memoize_2.patch

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



[issue22783] Pickle: use NEWOBJ instead of NEWOBJ_EX if possible

2014-12-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Updated patch addresses Antoine's comments. Also added few comments explaining 
binary data.

--
Added file: http://bugs.python.org/file37470/pickle_newobj_2.patch

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



[issue22980] C extension naming doesn't take bitness into account

2014-12-16 Thread Steve Dower

Steve Dower added the comment:

I justified leaving out the ABI tag in an earlier post as well as in an email 
to distutils-sig, where two of the PEPs you mention were developed, and nobody 
had any comment. Cache tags don't include platform information and are 
worthless here.

distutils uses the first extension from _imp.extension_suffixes() and so will 
automatically tag binaries. I also tested with setuptools and Cython.

--

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



[issue23014] Don't have importlib.abc.Loader.create_module() be optional

2014-12-16 Thread Nick Coghlan

Nick Coghlan added the comment:

I'm still a fan of never - it's a good escape hatch that means we never have 
to contort the new API to deal with some of the more esoteric use cases that 
involved completely overloading the import process in the loader :)

--

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



[issue23064] pep8 asyncore.py

2014-12-16 Thread R. David Murray

R. David Murray added the comment:

Thanks for the effort, but we do not apply PEP8-only patches.  The small 
improvements in readability do not justify the costs of code churn and the 
chance of introducing bugs.

(Also, FYI, PEP8 discourages using \ for line continuation.)

--
nosy: +r.david.murray
resolution:  - rejected
stage:  - resolved
status: open - closed

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



[issue19698] Implement _imp.exec_builtin and exec_dynamic

2014-12-16 Thread Nick Coghlan

Nick Coghlan added the comment:

Turns out I had written up a recap of the PEP 451 C extension support status 
back in July, so I just resent that to import-sig.

--

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



[issue22945] Ctypes inconsistent between Linux and OS X

2014-12-16 Thread Daniel Standage

Daniel Standage added the comment:

Sorry for my radio silence. Your example was very helpful, and restores the 
behavior I was looking for. Thanks!

--
resolution:  - works for me
status: open - closed

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



[issue23014] Don't have importlib.abc.Loader.create_module() be optional

2014-12-16 Thread Brett Cannon

Brett Cannon added the comment:

Yeah, we need to settle the whole load_module() thing at PyCon because I'm 
tired of it hanging over our heads since the code is entirely structured to 
yank it out and if it's going to stay I want to clean up _bootstrap.py to make 
the code flow easier to follow.

--

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



[issue23066] re.match hang

2014-12-16 Thread Jie Yin

New submission from Jie Yin:

The following expression hang in 2.7.9 for the module re:

re.match('^([a-zA-Z0-9]+|[\\s]+|[,.])+$', 'Feature Test Macro Requirements for 
glibc ()')

--
components: Interpreter Core
messages: 232746
nosy: writalnaie
priority: normal
severity: normal
status: open
title: re.match hang
type: security
versions: Python 2.7

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



[issue23066] re.match hang

2014-12-16 Thread Benjamin Peterson

Changes by Benjamin Peterson benja...@python.org:


--
nosy: +serhiy.storchaka

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



[issue23066] re.match hang

2014-12-16 Thread Guido van Rossum

Guido van Rossum added the comment:

Please go to python-list to get help about writing re expressions for parsing. 
The example regexp does not technically hang, it is just exploring a very large 
set of alternatives, none of which match (because the trailing '()' doesn't 
match anything).

--
nosy: +gvanrossum
resolution:  - not a bug
status: open - closed

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



[issue19858] Make pickletools.optimize aware of the MEMOIZE opcode.

2014-12-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c49b7acba06f by Serhiy Storchaka in branch '3.4':
Issue #19858:  pickletools.optimize() now aware of the MEMOIZE opcode, can
https://hg.python.org/cpython/rev/c49b7acba06f

New changeset e7dd739b4b4e by Serhiy Storchaka in branch 'default':
Issue #19858:  pickletools.optimize() now aware of the MEMOIZE opcode, can
https://hg.python.org/cpython/rev/e7dd739b4b4e

--
nosy: +python-dev

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



[issue23060] Assert fails in multiprocessing.heap.Arena.__setstate__ on Windows

2014-12-16 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Or perhaps:

buffer = mmap.mmap(-1, self.size, tagname=self.name)
assert _winapi.GetLastError() == _winapi.ERROR_ALREADY_EXISTS
self.buffer = buffer

?

--
nosy: +pitrou

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



[issue15513] Correct __sizeof__ support for pickle

2014-12-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fed774c926f5 by Serhiy Storchaka in branch '3.4':
Issue #15513: Added a __sizeof__ implementation for pickle classes.
https://hg.python.org/cpython/rev/fed774c926f5

New changeset e11d99ed3d3f by Serhiy Storchaka in branch 'default':
Issue #15513: Added a __sizeof__ implementation for pickle classes.
https://hg.python.org/cpython/rev/e11d99ed3d3f

--
nosy: +python-dev

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



[issue22783] Pickle: use NEWOBJ instead of NEWOBJ_EX if possible

2014-12-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2ffaac4c8e53 by Serhiy Storchaka in branch 'default':
Issue #22783: Pickling now uses the NEWOBJ opcode instead of the NEWOBJ_EX
https://hg.python.org/cpython/rev/2ffaac4c8e53

--
nosy: +python-dev

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



[issue19858] Make pickletools.optimize aware of the MEMOIZE opcode.

2014-12-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Many thanks for all your reviews Antoine!

--
assignee:  - serhiy.storchaka
resolution:  - fixed
stage: patch review - resolved
status: open - closed

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



[issue22783] Pickle: use NEWOBJ instead of NEWOBJ_EX if possible

2014-12-16 Thread Serhiy Storchaka

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


--
assignee:  - serhiy.storchaka
resolution:  - fixed
stage: patch review - resolved
status: open - closed

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



[issue22777] Test pickling with all protocols

2014-12-16 Thread Serhiy Storchaka

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


--
status: open - closed

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



[issue23063] `python setup.py check --restructuredtext --strict --metadata` fails with: `warning: check: Could not finish the parsing.` if the RST document uses code or code-block directives.

2014-12-16 Thread Marc Abramowitz

Marc Abramowitz added the comment:

OK, I added a test.

See:

* 
https://bitbucket.org/msabramo/cpython/commits/9b8f6812ff6981b5f195b6bf73cefb0fea46fba6
* 
https://bitbucket.org/msabramo/cpython/pull-request/1/fix-distutils-setuppy-check/diff

If you want, I can also update the diff attached here, but maybe it's easier to 
just look at my branch on Bitbucket? Whatever is most convenient for you...

--

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



[issue23063] `python setup.py check --restructuredtext --strict --metadata` fails with: `warning: check: Could not finish the parsing.` if the RST document uses code or code-block directives.

2014-12-16 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
hgrepos: +288

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



[issue23063] `python setup.py check --restructuredtext --strict --metadata` fails with: `warning: check: Could not finish the parsing.` if the RST document uses code or code-block directives.

2014-12-16 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


Added file: http://bugs.python.org/file37471/9b8f6812ff69.diff

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



[issue23063] `python setup.py check --restructuredtext --strict --metadata` fails with: `warning: check: Could not finish the parsing.` if the RST document uses code or code-block directives.

2014-12-16 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
hgrepos:  -286

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



[issue23063] `python setup.py check --restructuredtext --strict --metadata` fails with: `warning: check: Could not finish the parsing.` if the RST document uses code or code-block directives.

2014-12-16 Thread Marc Abramowitz

Changes by Marc Abramowitz msabr...@gmail.com:


Added file: http://bugs.python.org/file37472/issue23063.patch

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



[issue23063] `python setup.py check --restructuredtext --strict --metadata` fails with: `warning: check: Could not finish the parsing.` if the RST document uses code or code-block directives.

2014-12-16 Thread Éric Araujo

Éric Araujo added the comment:

The Mercurial integration lets you update the patch with one click.  
Decentralized VCSes are nice :‑)

Patch looks good to me.  Thank you.

--

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



[issue23060] Assert fails in multiprocessing.heap.Arena.__setstate__ on Windows

2014-12-16 Thread Steve Dower

Steve Dower added the comment:

That was actually my first hack and it also works. The fundamental problem here 
is that GetLastError() is not actually meant to indicate *whether* an error has 
occurred, but when one has occurred it describes what it was.

Indeed, in this case no error has occurred - CreateFileMapping was called and 
there is a file mapping available. OpenFileMapping is provided if an error is 
required when the mapping does not already exist.

The best option is definitely a separate method (or parameter) on mmap to 
open/raise rather than open/create. I may just comment out the assertion with a 
reference to this bug in the meantime, so that the buildbots aren't getting 
stuck every time.

--

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



[issue23063] `python setup.py check --restructuredtext --strict --metadata` fails with: `warning: check: Could not finish the parsing.` if the RST document uses code or code-block directives.

2014-12-16 Thread Marc Abramowitz

Marc Abramowitz added the comment:

What's the next step?

--

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



[issue23067] Export readline forced_update_display

2014-12-16 Thread Chris Hand

New submission from Chris Hand:

The current implementation of readline implements the redisplay function, but 
not the forced version. This patch maintains the current behavior as the 
default, but also allows a bool to be passed which, if True, calls 
rl_forced_update_display instead.

--
components: Extension Modules
files: readline_redisplay_force.patch
keywords: patch
messages: 232757
nosy: dexteradeus
priority: normal
severity: normal
status: open
title: Export readline forced_update_display
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file37473/readline_redisplay_force.patch

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



[issue23054] ConnectionError: ('Connection aborted.', BadStatusLine(''''))

2014-12-16 Thread Joe Cabrera

Joe Cabrera added the comment:

This is an error wrapping coming from requests.

https://github.com/kennethreitz/requests/issues/2364

The Requests team has concluded they can do nothing about this error, I believe 
the next step up is the python httplib library.

--

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



[issue22980] C extension naming doesn't take bitness into account

2014-12-16 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 16.12.2014 14:38, Steve Dower wrote:
 
 Steve Dower added the comment:
 
 I justified leaving out the ABI tag in an earlier post as well as in an email 
 to distutils-sig, where two of the PEPs you mention were developed, and 
 nobody had any comment. Cache tags don't include platform information and are 
 worthless here.

I was referring to ABI flags 
(https://www.python.org/dev/peps/pep-0425/#abi-tag),
eg. the m when using pymalloc. If we do stick with a PEP 425 format,
we should at least stay compatible to it - even if we don't necessarily
need this on Windows.

On Linux, the extensions use the PEP 3149 tags, e.g.

readline.cpython-34m.so

Wouldn't it make sense to change those to the same PEP 425 style
format ?

Exmaple:

   readline.cp35m-linux-x86_64.so

The _d suffix on Windows would then turn into the d ABI flag.

Note that this only works nicely for Linux. For other platforms,
get_platform() returns a mess... e.g. on FreeBSD:

   freebsd-8.3-RELEASE-p3-i386   (32-bit)
   freebsd-8.3-RELEASE-p3-amd64  (64-bit)

instead of the more useful

   freebsd-i386
   freebsd-amd64

The situation is similar on other less main stream platforms,
so it may make sense to define mappings other than get_platform()
on those.

 distutils uses the first extension from _imp.extension_suffixes() and so will 
 automatically tag binaries. I also tested with setuptools and Cython.

Ah, clever. So no additional patches are needed :-)

--

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



[issue22980] C extension naming doesn't take bitness into account

2014-12-16 Thread Antoine Pitrou

Antoine Pitrou added the comment:

get_platform() will be difficult to reuse, for bootstrapping reasons (you need 
to know the allowed extensions as soon as the interpreter starts up, or at 
least as soon as the first extension module may be loaded).

--

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



[issue23054] ConnectionError: ('Connection aborted.', BadStatusLine(''''))

2014-12-16 Thread R. David Murray

R. David Murray added the comment:

I wonder the actual error reported in that issue has any relationship to issue 
15082?

In any case, the error being presented to requests is *accurate*: httplib tried 
to read the status line and got nothing (the actual text in the linked issue is 
BadStatusLine('')).  (Note that issue 7427 was where we fixed the repr, if 
you are curious).

I see that requests would like a better error message.  Is there a concrete 
suggestion for what that better error message would look like?

--

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



[issue23049] Fix functools.reduce code equivalent.

2014-12-16 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I agree with Raymond. Examples in the code are not meant to be a reference but, 
well, examples. That is, the educational value should come first and strict 
adherence to the language spec only second.

Roughly equivalent is already used in the functools doc, it can probably be 
reused :-)

--
nosy: +pitrou

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



[issue23054] ConnectionError: ('Connection aborted.', BadStatusLine(''''))

2014-12-16 Thread Martin Panter

Martin Panter added the comment:

Not exactly sure what do you want the Python library to do, but perhaps this is 
a duplicate of Issue 8450, about making the error less misleading when the 
connection is closed before _any_ status line is sent. See also Issue 7427.

--
nosy: +vadmium

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



[issue22980] C extension naming doesn't take bitness into account

2014-12-16 Thread Steve Dower

Steve Dower added the comment:

 get_platform() will be difficult to reuse, for bootstrapping reasons

ISTM that if you can't determine the value at compile time, then it doesn't 
matter to compilation enough to need to appear in the tag.

As far as matching PEP 425 for the sake of matching it goes, I'd rather keep 
using search path tricks than have .cp35-cp35m-win_amd64.pyd appear on every 
single one of my extension modules. Removing the _d suffix is very likely 
more disruptive than it's worth, especially since untagged pyds are still 
supported but the debug tag is still necessary. 'm' is always the case in 
Windows and is benign for a correct extension anyway, and AFAICT 'u' is totally 
unused.

--

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



Re: [issue22980] C extension naming doesn't take bitness into account

2014-12-16 Thread M.-A. Lemburg
On 16.12.2014 21:28, Steve Dower wrote:
 
 Steve Dower added the comment:
 
 get_platform() will be difficult to reuse, for bootstrapping reasons
 
 ISTM that if you can't determine the value at compile time, then it doesn't 
 matter to compilation enough to need to appear in the tag.

Antoine has a point there. Together with the problems I mentioned
with non-mainstream platforms, it would be better to use a compile
time definition of the platform tag as you've chosen for Windows.

PEP 425 unfortunately ignores the mentioned problems of get_platform().

 As far as matching PEP 425 for the sake of matching it goes, I'd rather keep 
 using search path tricks than have .cp35-cp35m-win_amd64.pyd appear on 
 every single one of my extension modules. Removing the _d suffix is very 
 likely more disruptive than it's worth, especially since untagged pyds are 
 still supported but the debug tag is still necessary. 'm' is always the case 
 in Windows and is benign for a correct extension anyway, and AFAICT 'u' is 
 totally unused.

You may have misread my comment. There's no need to add the Python
tag to the extension tag, only the ABI tag (with flags) and the
platform tag to determine bitness:

spam.cp35m-win_amd64.pyd

Could you explain what replacing the _d suffix with a d ABI flag
would break ?

To be clear, this would mean:

spam.cp35dm-win_amd64.pyd

instead of

spam_d.cp35m-win_amd64.pyd

-- 
Marc-Andre Lemburg
eGenix.com

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



[issue23054] ConnectionError: ('Connection aborted.', BadStatusLine(''''))

2014-12-16 Thread R. David Murray

R. David Murray added the comment:

Ouch.  I assumed the change was made to the repr, not the contents of line (I 
wasn't involved in that fix).  Not that that would actually affect this issue, 
I think, since Requests doesn't want to introspect exception objects.

--

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



[issue16349] Document whether it's safe to use bytes for struct format string

2014-12-16 Thread Martin Panter

Martin Panter added the comment:

Actually the “struct” module doc string seems to already hint that format 
strings can be byte strings:

“Python bytes objects are used to hold the data representing the C struct and 
also as format strings . . .”

--

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



[issue21071] struct.Struct.format is bytes, but should be str

2014-12-16 Thread Martin Panter

Martin Panter added the comment:

It seems to me that the simplest fix is to document:

1. Struct.format attribute is a byte string
2. The input format strings for struct.pack(), Struct class, etc, are also 
allowed to be byte strings, for consistency (Issue 16349)

Here is a patch that does that, and adds some simple test cases.

--
keywords: +patch
Added file: http://bugs.python.org/file37474/format-bytes.patch

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



[issue17876] Doc issue with threading.Event

2014-12-16 Thread Martijn Pieters

Martijn Pieters added the comment:

I notice that the same issue still exists in the 3.5 documentation. Surely this 
can at least be fixed in the development copy?

--
nosy: +mjpieters

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



[issue23057] asyncio loop on Windows should stop on keyboard interrupt

2014-12-16 Thread STINNER Victor

STINNER Victor added the comment:

Hi, I started to work on this topic a few months ago:
https://code.google.com/p/tulip/issues/detail?id=191

I should update my patches.

--

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



[issue23046] asyncio.BaseEventLoop is documented, but only exported via asyncio.base_events

2014-12-16 Thread STINNER Victor

STINNER Victor added the comment:

I'm in favor of exposing BaseEventLoop in the asyncio namespace directly 
(asyncio.BaseEventLoop) because I'm using it in various asyncio projects, and I 
don't like having to use submodules. I consider asyncio.base_events as the 
private API.

--

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



[issue23057] asyncio loop on Windows should stop on keyboard interrupt

2014-12-16 Thread STINNER Victor

STINNER Victor added the comment:

This issue is specific to Windows. On all others platforms, signal handling is 
nicely supported.

--
components: +Windows
nosy: +steve.dower, tim.golden, zach.ware

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



[issue17876] Doc issue with threading.Event

2014-12-16 Thread R. David Murray

R. David Murray added the comment:

If there really is an issue in the 3.4/3.5 docs, you should open an new issue 
explaining what the problem is.  In 3.4/3.5, Event is a class, not a function, 
and is documented accordingly.

--

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



[issue22926] asyncio: raise an exception when called from the wrong thread

2014-12-16 Thread STINNER Victor

STINNER Victor added the comment:

Guido wrote:
 I'm okay with this approach now.

I'm not sure that I understood your opinion. Are you ok to raise an exception 
in debug mode if call_soon() is called from a thread which has no event loop 
attached?

(Currently, an exception is already raised in debug mode, but only if the 
thread has an attached event loop, but not the good one.)

--

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



[issue17876] Doc issue with threading.Event

2014-12-16 Thread Martijn Pieters

Martijn Pieters added the comment:

Ah! Mea Culpa, you are correct. The issue is then with Python 2.7 only for 
which no doubt exists a separate ticket.

--

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



[issue23046] asyncio.BaseEventLoop is documented, but only exported via asyncio.base_events

2014-12-16 Thread Guido van Rossum

Guido van Rossum added the comment:

OK, fine to expose the BaseEventLoop class.

On Tue, Dec 16, 2014 at 3:45 PM, STINNER Victor rep...@bugs.python.org
wrote:


 STINNER Victor added the comment:

 I'm in favor of exposing BaseEventLoop in the asyncio namespace directly
 (asyncio.BaseEventLoop) because I'm using it in various asyncio projects,
 and I don't like having to use submodules. I consider asyncio.base_events
 as the private API.

 --

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


--

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



[issue22926] asyncio: raise an exception when called from the wrong thread

2014-12-16 Thread Guido van Rossum

Guido van Rossum added the comment:

Well, the PEP clearly states that get_event_loop() should never return None
and raise an exception if the context has no environment. (Where context ~~
thread.)

On Tue, Dec 16, 2014 at 3:48 PM, STINNER Victor rep...@bugs.python.org
wrote:


 STINNER Victor added the comment:

 Guido wrote:
  I'm okay with this approach now.

 I'm not sure that I understood your opinion. Are you ok to raise an
 exception in debug mode if call_soon() is called from a thread which has no
 event loop attached?

 (Currently, an exception is already raised in debug mode, but only if the
 thread has an attached event loop, but not the good one.)

 --

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


--

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



[issue22922] asyncio: call_soon() should raise an exception if the event loop is closed

2014-12-16 Thread STINNER Victor

STINNER Victor added the comment:

 Windows buildbots are not happy:

test_asyncio pass again on Windows buildbots, I close the issue.

--
resolution:  - fixed
status: open - closed

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



[issue23009] selectors.EpollSelector.select raises exception when nothing to select.

2014-12-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1e985daa7be6 by Victor Stinner in branch 'default':
Issue #23009: Skip test_selectors.test_empty_select() on Windows
https://hg.python.org/cpython/rev/1e985daa7be6

--

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



[issue14134] xmlrpc.client.ServerProxy needs timeout parameter

2014-12-16 Thread Demian Brecht

Demian Brecht added the comment:

I think we've started to venture into system-level territory that the standard 
library itself shouldn't have to account for. If TCP on systems are configured 
by default to allow for infinite timeouts, then it should likely be an issue 
for those distros. I don't think accounting for such things should be the 
responsibility of the standard library. The socket module behaves appropriately 
in handing off timeouts to be managed by the system level if left undefined. I 
think that any further discussion around timeouts should be taken up on distro 
mailing lists, or even perhaps python-list as it's not directly relevant to 
this issue.

As for this specific issue, unless someone beats me to it, I'll get a patch 
together introducing the session_factory as soon as I can.

--

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



[issue23046] asyncio.BaseEventLoop is documented, but only exported via asyncio.base_events

2014-12-16 Thread STINNER Victor

STINNER Victor added the comment:

Here is a patch to expose BaseEventLoop. It removes Server from 
base_events.__all__, which means that from asyncio.base_events import * will 
no import Server anymore. Can it break real applications?

--
keywords: +patch
Added file: http://bugs.python.org/file37475/base_event_loop.patch

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



[issue23046] asyncio.BaseEventLoop is documented, but only exported via asyncio.base_events

2014-12-16 Thread Guido van Rossum

Guido van Rossum added the comment:

Sounds unlikely. If they write from asyncio.base_events import Server it
will still work. Only if they wrote from asyncio.base_events import *
will they be broken, and that sounds not worth worrying about. So LGTM on
the patch. (But why was Server there at all? Tests?

On Tue, Dec 16, 2014 at 4:17 PM, STINNER Victor rep...@bugs.python.org
wrote:


 STINNER Victor added the comment:

 Here is a patch to expose BaseEventLoop. It removes Server from
 base_events.__all__, which means that from asyncio.base_events import *
 will no import Server anymore. Can it break real applications?

 --
 keywords: +patch
 Added file: http://bugs.python.org/file37475/base_event_loop.patch

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


--

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



[issue22926] asyncio: raise an exception when called from the wrong thread

2014-12-16 Thread STINNER Victor

STINNER Victor added the comment:

2014-12-17 0:53 GMT+01:00 Guido van Rossum rep...@bugs.python.org:
 Well, the PEP clearly states that get_event_loop() should never return None
 and raise an exception if the context has no environment. (Where context ~~
 thread.)

You don't reply to my question, or I misunderstood your anwer.
call_soon() is a method an event loop, there is no need to call
get_event_loop(). get_event_loop() is only called in debug mode to
help the developer to detect obvious bugs. I don't think that the
behaviour of the debug mode must be written in the PEP, it's more
implementation specific.

--

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



[issue14134] xmlrpc.client.ServerProxy needs timeout parameter

2014-12-16 Thread Demian Brecht

Demian Brecht added the comment:

On another note, running a simple test with against a non-routable IP yields 
that OSX's default timeout is 75 seconds and not 7500 seconds as the developer 
docs lead me to believe.

--

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



[issue23046] asyncio.BaseEventLoop is documented, but only exported via asyncio.base_events

2014-12-16 Thread STINNER Victor

STINNER Victor added the comment:

 why was Server there at all? Tests?

If you cannot answer, who can answer? :-)
https://code.google.com/p/tulip/source/detail?r=f136c04d82c0 (You
added Server to __all__.)

I don't see any use case which needs to create explicitly a Server
class. There are the create_server() method and start_server()
function for that.

By the way, the Server class *is* documented as asyncio.Server, which
is the same mistake than asyncio.BaseEventLoop:
https://docs.python.org/dev/library/asyncio-eventloop.html#asyncio.Server

I propose to update the doc for Server, replace asyncio.Server with
asyncio.base_events.Server.

--

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



[issue22926] asyncio: raise an exception when called from the wrong thread

2014-12-16 Thread Guido van Rossum

Guido van Rossum added the comment:

Oh sorry. I'm in too much of a hurry. :-(

The problem is that the thread may not have a loop, but the loop still has
a tread. E.g. the tests intentionally call set_event_loop(None) to make
sure that no code depends on the implict event loop. An app should be
allowed to do the same, even in debug mode.

IIUC this is already broken in debug mode? (Or perhaps only in non-main
threads?)

So in order to do correct diagnostics here we would have to add an owning
thread pointer to every event loop; then call_later() and friends can
check that the owning thread is the same as the current thread. But I'm not
sure that this is worth the work. (And I could see issues with the owning
thread concept as well.)

On Tue, Dec 16, 2014 at 4:21 PM, STINNER Victor rep...@bugs.python.org
wrote:


 STINNER Victor added the comment:

 2014-12-17 0:53 GMT+01:00 Guido van Rossum rep...@bugs.python.org:
  Well, the PEP clearly states that get_event_loop() should never return
 None
  and raise an exception if the context has no environment. (Where context
 ~~
  thread.)

 You don't reply to my question, or I misunderstood your anwer.
 call_soon() is a method an event loop, there is no need to call
 get_event_loop(). get_event_loop() is only called in debug mode to
 help the developer to detect obvious bugs. I don't think that the
 behaviour of the debug mode must be written in the PEP, it's more
 implementation specific.

 --

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


--

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



[issue23046] asyncio.BaseEventLoop is documented, but only exported via asyncio.base_events

2014-12-16 Thread Guido van Rossum

Guido van Rossum added the comment:

Heh. Well I don't remember why I did that any more, and it doesn't seem to
matter now.

However the doc issue seems different than for BaseEventLoop -- Server is
the *concrete* class (it actually gets instantiated, not a subclass). We
could instead document the AbstractServer class, but it doesn't have the
'sockets' instance variable. Maybe we should document both --
AbstractServer as the minimal interface that create_server() returns,
Server as the actual class that the default event loops (Unix and Windows)
create. With a warning that 'sockets' attribute may not be available if the
event loop has been configured differently.

On Tue, Dec 16, 2014 at 4:27 PM, STINNER Victor rep...@bugs.python.org
wrote:


 STINNER Victor added the comment:

  why was Server there at all? Tests?

 If you cannot answer, who can answer? :-)
 https://code.google.com/p/tulip/source/detail?r=f136c04d82c0 (You
 added Server to __all__.)

 I don't see any use case which needs to create explicitly a Server
 class. There are the create_server() method and start_server()
 function for that.

 By the way, the Server class *is* documented as asyncio.Server, which
 is the same mistake than asyncio.BaseEventLoop:
 https://docs.python.org/dev/library/asyncio-eventloop.html#asyncio.Server

 I propose to update the doc for Server, replace asyncio.Server with
 asyncio.base_events.Server.

 --

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


--

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



[issue16776] Document PyCFunction_New and PyCFunction_NewEx functions

2014-12-16 Thread Martin Panter

Martin Panter added the comment:

I’m far from an expert on the C API, but I was looking for a way to inspect a 
“builtin_function_or_method” a.k.a. PyCFunction_Type a.k.a. 
types.BuiltinMethodType, and ended up looking at the “Instance Method Objects” 
section. So maybe your functions should go near there, or perhaps the nearby 
“Function Objects” section.

--
nosy: +vadmium

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



[issue23014] Don't have importlib.abc.Loader.create_module() be optional

2014-12-16 Thread Eric Snow

Eric Snow added the comment:

@Nick

As long as those esoteric cases can be handled without much work via 
create_module and exec_module, we should have a goal in mind for yanking legacy 
load_module support.  If there are valid use cases that can't be handled via 
PEP 451 then I'd say we should consider finding a better way.  If 
Loader.load_module is that better way then we need to consider a better way to 
handle it.

What cases do you have in mind that only load_module handles (at least easily)? 
 I can vaguely imagine the circumstances, but nothing concrete comes to mind.  
It doesn't seem like the sort of situation that has come up more that a handful 
of times nor one the currently couldn't be addressed in another way.  I'm 
probably missing something here and I wouldn't be surprised if we discussed 
this point during the PEP 451 discussions. :)

--

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



[issue23014] Don't have importlib.abc.Loader.create_module() be optional

2014-12-16 Thread Eric Snow

Eric Snow added the comment:

@Brett

Discussing this at PyCon sounds good.  I'm in favor of dropping load_module as 
soon as possible (if possible), as you might have guessed by the way I 
implemented the module spec code. :)  I agree that we should make a decision 
about load_module one way or the other, as either way we can consequently clean 
up that code.

--

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



[issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser

2014-12-16 Thread Martin Panter

Martin Panter added the comment:

Since the doctype() method doesn’t appear to be removed from the “default” 
(3.5?) branch either, here is a patch that avoids the deprecation warning when 
inheriting method + a test.

Hopefully this will be useful when you get some time to look at it. I’m not 
sure if the PyCFunction_ calls are a good idea; they don’t seem to be 
documented, but I couldn’t think of a better way to check if the method was 
overridden.

--
keywords: +patch
versions: +Python 3.5
Added file: http://bugs.python.org/file37476/inherit-doctype.patch

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



[issue23068] Add a way to determine if the current thread has the import lock

2014-12-16 Thread Guido van Rossum

New submission from Guido van Rossum:

imp.lock_held() returns True if *any* thread is currently importing something. 
I'd like to have an API that can tell whether the *current* thread has the 
import lock.  The implementation keeps track of this, but doesn't make the info 
available.

Use case: print a warning/error if a network call is made during import.

--
components: Library (Lib)
messages: 232792
nosy: gvanrossum
priority: normal
severity: normal
stage: needs patch
status: open
title: Add a way to determine if the current thread has the import lock
type: enhancement
versions: Python 3.5

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



[issue634412] RFC 2387 (multipart/related) in email package

2014-12-16 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
title: RFC 2387 in email package - RFC 2387 (multipart/related) in email 
package

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



[issue23049] Fix functools.reduce code equivalent.

2014-12-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0b3d69f15950 by Raymond Hettinger in branch '3.4':
Issue #23049:  Pure python equivalent shouldn't imply more exactitude than is 
really there.
https://hg.python.org/cpython/rev/0b3d69f15950

--
nosy: +python-dev

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



[issue23049] Fix functools.reduce code equivalent.

2014-12-16 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


--
resolution:  - fixed
status: open - closed

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



[issue23069] IDLE's F5 Run Module doesn't transfer effects of future import

2014-12-16 Thread Raymond Hettinger

New submission from Raymond Hettinger:

Future imports in a module aren't transferring to the interactive shell when 
executing Run Module.

Given the file tmp_future.py

$ cat tmp_future.py
from __future__ import division, print_function

print(32 / 5)

Run Python interactively

$ python2.7 -i tmp_future.py 
6.4
 32 / 5  # this works fine!
6.4

But open the file in IDLE and press F5:
---
Python 2.7.9 (v2.7.9:648dcafa7e5f, Dec 10 2014, 10:10:46) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type copyright, credits or license() for more information.
  RESTART 
 
6.4
 print(32 / 5)   # this is broken!
6

Note, the problem may also apply to IDLE Python 3.4 and 3.5 but it won't affect 
this example because the future imports have not effect.

--
components: IDLE
files: tmp_future.py
messages: 232794
nosy: rhettinger
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE's F5 Run Module doesn't transfer effects of future import
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file37477/tmp_future.py

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



[issue23070] Error in Tutorial comment

2014-12-16 Thread Ross Burnett

New submission from Ross Burnett:

In section 3.1.2. Strings of the Tutorial (version 3.4 plus others?), a 
comment on a slicing error has an error:

word[42]  # the word only has 7 characters

It should say word[42]  # the word has 6 characters

--
assignee: docs@python
components: Documentation
messages: 232795
nosy: docs@python, rossburnett
priority: normal
severity: normal
status: open
title: Error in Tutorial comment
versions: Python 3.4

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



[issue19737] Documentation of globals() and locals() should be improved

2014-12-16 Thread Martin Panter

Martin Panter added the comment:

Here is a patch with my suggestion. It also now refers to _the_ dictionary 
rather than just _a_ dictionary, and drops the word “current”, so that it does 
not sound like saving a snapshot.

--
keywords: +patch
Added file: http://bugs.python.org/file37478/globals-copy.patch

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



[issue19737] Documentation of globals() and locals() should be improved

2014-12-16 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


Removed file: http://bugs.python.org/file37478/globals-copy.patch

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



[issue19737] Documentation of globals() and locals() should be improved

2014-12-16 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


Added file: http://bugs.python.org/file37479/globals-copy.patch

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



[issue20059] Inconsistent urlparse/urllib.parse handling of invalid port values?

2014-12-16 Thread Martin Panter

Martin Panter added the comment:

I would go for raising ValueError for port numbers out of range. The value of 
None was already defined to mean that no port is included in the URL.

Also, the ValueError exception should be documented. It is surprising that 
urlsplit() does not raise any exception, but then simply getting the “port” 
attribute does raise the exception.

BTW your third example is wrong:

 urlparse(http://www.example.com:;).port is None
True

It’s probably safest to keep this one as it is, but maybe it also needs 
documenting :)

--

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



[issue16893] Generate Idle help from Doc/library/idle.rst

2014-12-16 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The goal of this issue is that Idle - Help - IDLE Help display a 
good-looking, accurate help page based on Doc/library/idle.rst.  The current 
Lib/idlelib/help.txt is neither good-looking nor accurate and must somehow be 
replaced, even if by temporary means, before another release (2.7.9 was missed, 
3.4.3 is coming in January).

Ned's gave some comments on the alternatives in msg185726.  I am extending 
those (and in some places implicitly referring back to them) based on further 
thinking and investigation.  A summary of what I currently think might be best:

if Windows:
  open .chm to Idle page
else:
  try:
open offline docs to Idle page
  except failure:
open generated .txt without `s.

The easiest alternative would be to display the online python.org page in a 
browser.  It looks nice, has a sidebar index, and access to the rest of the 
docs.  An obvious problem is that this requires a browser and online access, 
either of which might be lacking in a classroom or when one is away from home 
base.  More subtle is that Idle features can be changed or added at any time.  
The online docs, generated daily from the repository, should reflect the 
repository version of Idle.  Released versions need a doc frozen at the time of 
release.

Still easy, perhaps, would be building Doc/build/html/library/idle.html and 
copying it to idlelib/help.html as part of the release process*, and changing 
the code to display that instead 

However as Zack hinted (clean up the output a bit), this file is not a 
standalone file.  It has many links to files in '..', such as Index and 
Copyright; these would have to be removed completely as the text is useless 
without the link.  For cross-reference link, such as 'Tkinter' or 'sys.path', 
the text should be left but the linkage removed.  In both cases, clicking the 
link gives a File not Found page. The broken links to javascript formatting 
files in '../.source' appears to be ignored and the formatting simply not done. 
 So the page index is at the bottom of the page instead of the sidebar.

* The beginners who most need the help doc are running installed Python, not 
respository builds, so the latter concerns me less.

But why make an off-line page when there already is one in off-line docs?  I 
presume that the linux and osx doc urls just need 'index.html' replaced with 
'/library/idle.html'.  The 'standard location' for linux is x.y.z specific.  
The python2 rpm location does not seem to be.  The osx location I will not 
guess about.

For Windows, startfile('x.chm') does the same as double-clicking x.chm in 
Explorer, which is to open the file with the Help Control, with a nice sidebar 
for contents, index, search, and favorites. Adding ::/library/idle.html does 
not work because it makes the path invalid.  But with an special prefix

 os.startfile(mk:@MSITStore:c:/programs/Python34/Doc/python342.chm::/library/idle.html)

opens the page in InternetExplorer.  However, there is no sidebar and the page 
has to be clicked on the taskbar to make it visible.  In 1 of 4 tries, the 
above failed.

An answer to this StackOverflow question

https://stackoverflow.com/questions/11076952/open-chm-file-at-specific-page-topic-using-command-line-arguments?rq=1

prompted me to try

 subprocess.Popen(hh 
 ms-its:c:/programs/Python34/Doc/python342.chm::/library/idle.html)

This opens the chm doc with the help control (and sidebar) to the Idle page, 
just as I wanted.  Since Doc/pythonxyz.chm is part of the installation, I think 
this is the solution for Windows.  The one glitch is that testing that the 
exact code in the repository works needs to be done with a pre-final install.  
That is already true of testing that Help - Python docs F1 opens the .chm to 
the index page.  These both should be part of a new installed idle test file.

After generating html.txt from idle.rst, the backticks could be filtered out.  
It would be close to what we have now.  Is there any need to keep it as a 
backup for non-Windows systems?  If not, I would be inclined to delete it.

For repository builds, users could go to the online Idle page.  I might even 
look for ../../Misc and if present, open it directly.  That page would be at 
most a day out of date.

--
assignee:  - terry.reedy

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



[issue18828] urljoin behaves differently with custom and standard schemas

2014-12-16 Thread Martin Panter

Martin Panter added the comment:

I think a global registry seems like overkill. Here is a patch to make 
urljoin() treat schemes more equally and work with arbitrary schemes 
automatically. I haven’t heard any arguments against this option yet, and it 
didn’t break any tests.

Another option, still simpler than a registry, would be an extra parameter, say 
urljoin(a, b, any_scheme=True).

--
keywords: +patch
Added file: http://bugs.python.org/file37480/urljoin-scheme.patch

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



[issue23071] codecs.__all__ incomplete

2014-12-16 Thread Martin Panter

New submission from Martin Panter:

First ones I noticed were codecs.encode() and codecs.decode(). Here is a list 
of other candidates, although they are not all documented, so maybe should not 
all be in __all__.

 import codecs
 public = (a for a in dir(codecs) if not a.startswith(_))
 sorted(set(public).difference(codecs.__all__))
['BufferedIncrementalDecoder', 'BufferedIncrementalEncoder', 'Codec', 
'CodecInfo', 'IncrementalDecoder', 'IncrementalEncoder', 'StreamReader', 
'StreamReaderWriter', 'StreamRecoder', 'StreamWriter', 'ascii_decode', 
'ascii_encode', 'backslashreplace_errors', 'builtins', 'charmap_build', 
'charmap_decode', 'charmap_encode', 'decode', 'encode', 'escape_decode', 
'escape_encode', 'getdecoder', 'getencoder', 'getincrementaldecoder', 
'getincrementalencoder', 'getreader', 'getwriter', 'iterdecode', 'iterencode', 
'latin_1_decode', 'latin_1_encode', 'make_encoding_map', 'make_identity_dict', 
'raw_unicode_escape_decode', 'raw_unicode_escape_encode', 'readbuffer_encode', 
'sys', 'unicode_escape_decode', 'unicode_escape_encode', 
'unicode_internal_decode', 'unicode_internal_encode', 'utf_16_be_decode', 
'utf_16_be_encode', 'utf_16_decode', 'utf_16_encode', 'utf_16_ex_decode', 
'utf_16_le_decode', 'utf_16_le_encode', 'utf_32_be_decode', 'utf_32_be_encode', 
'utf_32_decode', 'utf_32_encode', 'utf_32_ex_de
 code', 'utf_32_le_decode', 'utf_32_le_encode', 'utf_7_decode', 'utf_7_encode', 
'utf_8_decode', 'utf_8_encode']

--
components: Library (Lib)
messages: 232800
nosy: vadmium
priority: normal
severity: normal
status: open
title: codecs.__all__ incomplete
type: behavior
versions: Python 3.4

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



[issue23071] codecs.__all__ incomplete

2014-12-16 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
nosy: +berker.peksag

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



[issue23072] 2.7.9 multiprocessing compile conflict

2014-12-16 Thread aab

New submission from aab:

python-2.7.9/Modules/_multiprocessing/multiprocessing.c
python-2.7.9/Modules/_multiprocessing/semaphore.c

The compile lines for the above two files have -DHAVE_SEM_OPEN=1 
-DHAVE_FD_TRANSFER=1 -DHAVE_SEM_TIMEDWAIT=0 in them.  The cpp code in those 
files uses #ifdef and #ifndef with those symbols commensurate with the 
#define/#undef commands used in 'pyconfig.h'. In my case, the biggest problem 
is the -DHAVE_SEM_TIMEDWAIT=0 which DEFINES that symbol so that the #ifndef 
HAVE_SEM_TIMEDWAIT in semaphore.c fails to do what the coder wanted.  Being 
very lazy, I just hacked the files to use #if SYMBOL and #if ! SYMBOL.  
Worked fine.

Solaris 2.8
Studio 11 Compiler Suite

--  Thanks,
--aab

--
components: Build
messages: 232801
nosy: a...@purdue.edu
priority: normal
severity: normal
status: open
title: 2.7.9 multiprocessing compile conflict
versions: Python 2.7

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



[issue23068] Add a way to determine if the current thread has the import lock

2014-12-16 Thread Eric Snow

Eric Snow added the comment:

Keep in mind that the global import lock is only held long enough to create a 
module-level lock.  The cache of module locks is found at line 166 of 
Lib/importlib/_bootstrap.py and the code related to module-level locking 
follows.  So unfortunately it won't be as simple as just getting the thread 
info from the global import lock.

Regardless, would it be useful to expose a function in importlib.util that 
indicates whether or not the current thread is importing a module (actually the 
names of the modules it is importing)?  Something like that would probably 
check both the global import lock and the module level locks, but make it 
unnecessary to expose the locks directly.  Given the situation with 
module-level locks I image such a helper is going to be desirable.

--
nosy: +brett.cannon, eric.snow, ncoghlan

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



[issue23049] Fix functools.reduce code equivalent.

2014-12-16 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
stage: needs patch - resolved

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



[issue16991] Add OrderedDict written in C

2014-12-16 Thread Eric Snow

Eric Snow added the comment:

I'm open to suggestions on how to help make the patch more reviewable.  
Currently at roughly +2500 lines of code it's a lot to ask someone to review.  
While probably not the only way to help reviewers, I expect the best thing I 
could do is to split the patch up into several smaller parts.

However, I could use some insight into the best way to approach that.  I keep 
considering factoring out the iterator/view boilerplate into helpers (macros?) 
in a separate patch.  That would go a long way to making the actual 
cOrderedDict implementation more reasonably sized.  I'm just not convinced yet 
it's the *right* approach.

--

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



[issue14134] xmlrpc.client.ServerProxy needs timeout parameter

2014-12-16 Thread Demian Brecht

Demian Brecht added the comment:

I've attached a test-less patch with my suggested approach. If there's no 
opposition to this change, I'll put some work into getting tests done for it as 
well.

--
Added file: http://bugs.python.org/file37481/issue14134.patch

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



  1   2   >