[issue23879] asyncio: SelectorEventLoop.sock_connect() must not retry connect() on InterruptedError

2015-04-07 Thread STINNER Victor

New submission from STINNER Victor:

According to the issue #23618, when connect() fails with EINTR, retrying 
connect() may only work on some platforms. To have a reliable behaviour on all 
platforms, we should wait until the socket becomes writable because the 
connection runs asynchronously in background. When the socket becomes writable, 
we have to gets its error code (getsockopt(SO_ERROR)) to check if the 
connection succeeded or failed.

Attached patch fixes SelectorEventLoop.sock_connect().

--
components: asyncio
files: connect_eintr.patch
keywords: patch
messages: 240195
nosy: gvanrossum, haypo, yselivanov
priority: normal
severity: normal
status: open
title: asyncio: SelectorEventLoop.sock_connect() must not retry connect() on 
InterruptedError
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file38854/connect_eintr.patch

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



[issue23880] Tkinter: getint and getdouble should support Tcl_Obj

2015-04-07 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

getint, getdouble and getboolean were thin wrappers around Tcl functions that 
converted string result of Tcl call to specified Python type. Since 2.3 
_tkinter can return not only string, but int, float, etc and Tcl_Obj (if 
wantobject is True). getXXX methods was updated to work with respective 
automatically converted types (getint with int, etc), but they don't work with 
general Tcl_Obj, so can't be applied to the result of _tkinter call in general 
case. As a workaround you should use int(str(value)) or like.

Support of Tcl_Obj in getbool was added in issue15133. Proposed patch adds 
support of Tcl_Obj in getint and getdouble and int in getdouble. It also 
restores the use of getint and getdouble in Tkinter.

--
components: Extension Modules, Tkinter
files: tkinter_getxxx_tclobj.patch
keywords: patch
messages: 240196
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Tkinter: getint and getdouble should support Tcl_Obj
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file38855/tkinter_getxxx_tclobj.patch

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



[issue23880] Tkinter: getint and getdouble should support Tcl_Obj

2015-04-07 Thread Serhiy Storchaka

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


--
nosy: +terry.reedy

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



[issue15227] Fatal Python error: PyEval_RestoreThread: NULL tstate on example script..

2015-04-07 Thread Serhiy Storchaka

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


--
resolution:  - out of date
stage:  - resolved
status: open - closed

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



[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-07 Thread Robert Kuska

Robert Kuska added the comment:

Le 06/04/2015 13:29, Nick Coghlan a écrit :
 
 So while this isn't a feature upstream itself needs, it's one
potentially needed by multiple *downstreams*, so in my view it makes
sense for us to work with upstream to come up with the one obvious way
for redistributors to handle the problem (now that we know that my
initial attempt at providing such a way doesn't work in practice).

So would it be possible for the actual implementation to be done outside
of CPython? (in a dedicated fork, for example)

Yes it would and most likely will be, but as Nick pointed out, it is important 
to come up with the one obvious way.


I understand why my patch is not acceptable for the upstream, it was my first 
shot (yet suitable for us) to start a discussion about cert verification. 

From the proposed solutions mentioned I favour the ENV variable which would 
address also Donald concerns, using ENV variable per application to 
enable/disable cert verification instead of global enable/disable, (yet it 
could be also `export`ed for global settings), are there any real 
disadvantages of using this method?

--

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



[issue23881] test_urllib2net: issues with ftp://gatekeeper.research.compaq.com/, ftp://ftp.mirror.nl/ and ftp://ftp.kernel.org/

2015-04-07 Thread STINNER Victor

STINNER Victor added the comment:

 (2) ftp://ftp.mirror.nl/pub/gnu/

DNS resolution:

$ host ftp.mirror.nl
ftp.mirror.nl is an alias for download.xs4all.nl.
download.xs4all.nl is an alias for dl.xs4all.nl.
dl.xs4all.nl has address 194.109.21.66
dl.xs4all.nl has IPv6 address 2001:888:0:25:194:109:21:66

http://dl.xs4all.nl/ works well, but this site has no /pub/ directory. Is it 
related?

See also Dead mirror: ftp.demon.nl
https://lists.gnupg.org/pipermail/gnupg-devel/2014-November/029113.html
(but it doesn't look to be related)

xs4all hosted python.org, I don't know if it still host the new CDN of 
python.org.
https://en.wikipedia.org/wiki/XS4ALL#Corporate_culture
XS4ALL also sponsors and hosts the sites of many free software projects, like 
Python, Squirrelmail and Debian.

--

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



[issue2292] Missing *-unpacking generalizations

2015-04-07 Thread Neil Girdhar

Changes by Neil Girdhar mistersh...@gmail.com:


Added file: http://bugs.python.org/file38856/starunpack40.diff

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



[issue23881] test_urllib2net: issues with ftp://gatekeeper.research.compaq.com/ and ftp://ftp.mirror.nl/

2015-04-07 Thread STINNER Victor

New submission from STINNER Victor:

test_urllib2net uses multiple public FTP servers. Since yesterday, there are 
issues with 2 FTP servers:

(1) 
ftp://gatekeeper.research.compaq.com/pub/DEC/SRC/research-reports/00README-Legal-Rules-Regs
= DNS server error

$ host gatekeeper.research.compaq.com 8.8.8.8
Host gatekeeper.research.compaq.com not found: 2(SERVFAIL)
$ host gatekeeper.research.compaq.com 212.27.40.240
Host gatekeeper.research.compaq.com not found: 2(SERVFAIL)

(2) ftp://ftp.mirror.nl/pub/gnu/

* The FTP connection succeeded
* Changing the directory to /pub/gnu succeeded
* but listing the content of /pub/gnu/ takes forever...

In Firefox, I get the error 425 Failed to establish connection.

--
messages: 240198
nosy: haypo
priority: normal
severity: normal
status: open
title: test_urllib2net: issues with ftp://gatekeeper.research.compaq.com/ and 
ftp://ftp.mirror.nl/

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



[issue23881] test_urllib2net: issues with ftp://gatekeeper.research.compaq.com/ and ftp://ftp.mirror.nl/

2015-04-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 69d4e199b88e by Victor Stinner in branch '2.7':
Issue #23881: urllib.ftpwrapper constructor now closes the socket if the FTP
https://hg.python.org/cpython/rev/69d4e199b88e

New changeset 7b168db16e67 by Victor Stinner in branch '3.4':
Issue #23881: urllib.request.ftpwrapper constructor now closes the socket if
https://hg.python.org/cpython/rev/7b168db16e67

New changeset 1a72c0a1a50f by Victor Stinner in branch 'default':
(Merge 3.4) Issue #23881: urllib.request.ftpwrapper constructor now closes the
https://hg.python.org/cpython/rev/1a72c0a1a50f

--
nosy: +python-dev

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



[issue23881] test_urllib2net: issues with ftp://gatekeeper.research.compaq.com/ and ftp://ftp.mirror.nl/

2015-04-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 40ddcd785f7b by Victor Stinner in branch '3.4':
Issue #23881: ftp://gatekeeper.research.compaq.com/ and ftp://ftp.debian.org/
https://hg.python.org/cpython/rev/40ddcd785f7b

New changeset 225be6be3893 by Victor Stinner in branch '2.7':
ssue #23881: ftp://gatekeeper.research.compaq.com/ and ftp://ftp.debian.org/
https://hg.python.org/cpython/rev/225be6be3893

--

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



[issue23881] test_urllib2net: issues with ftp://gatekeeper.research.compaq.com/, ftp://ftp.mirror.nl/ and ftp://ftp.kernel.org/

2015-04-07 Thread STINNER Victor

STINNER Victor added the comment:

Python 2.7 used ftp://ftp.kernel.org/pub/linux/kernel/README whereas Python 
3.4/3.6 uses ftp://ftp.debian.org/debian/README.

Right now, ftp://ftp.kernel.org/pub/linux/kernel/README doesn't respond. So I 
also modified Python 2.7 to uses ftp.debian.org as Python 3.4/3.5.

Is there a FTP vulnerability in the wild and some public FTP servers are down 
because of that? Or is it a network connectivity issue?

--
title: test_urllib2net: issues with ftp://gatekeeper.research.compaq.com/ and 
ftp://ftp.mirror.nl/ - test_urllib2net: issues with 
ftp://gatekeeper.research.compaq.com/, ftp://ftp.mirror.nl/ and 
ftp://ftp.kernel.org/

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



[issue23881] test_urllib2net: issues with ftp://gatekeeper.research.compaq.com/, ftp://ftp.mirror.nl/ and ftp://ftp.kernel.org/

2015-04-07 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
components: +Tests
versions: +Python 2.7, Python 3.4, Python 3.5

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



[issue23881] test_urllib2net: issues with ftp://gatekeeper.research.compaq.com/, ftp://ftp.mirror.nl/ and ftp://ftp.kernel.org/

2015-04-07 Thread STINNER Victor

STINNER Victor added the comment:

For ftp.kernel.org, it may be related to a FS data corruption bug:

2015-02-03: FTP limited on mirrors.kernel.org
https://www.kernel.org/ftp-limited-on-mirrorskernelorg.html
We've had to temporarily limit FTP access to mirrors.kernel.org due to high IO 
load.

--

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



[issue23881] test_urllib2net: issues with ftp://gatekeeper.research.compaq.com/, ftp://ftp.mirror.nl/ and ftp://ftp.kernel.org/

2015-04-07 Thread STINNER Victor

STINNER Victor added the comment:

 $ host gatekeeper.research.compaq.com 212.27.40.240
 Host gatekeeper.research.compaq.com not found: 2(SERVFAIL)

What happened to gatekeeper.dec.com?
http://gatekeeper.dec.com/what-happened-to-gatekeeper.html

Maybe we should use ftp://apotheca.hpl.hp.com/ instead?

--

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



[issue23882] unittest discovery and namespaced packages

2015-04-07 Thread Florian Apolloner

New submission from Florian Apolloner:

Unittest discovery does not seem to work if the tests package is  a namespace 
package. The attached file should have all details to reproduce, as soon as I 
readd an __init__.py everything works fine. 

Test was done using python3.4.2 and 3.4.3

--
files: console_log.txt
messages: 240205
nosy: Florian.Apolloner
priority: normal
severity: normal
status: open
title: unittest discovery and namespaced packages
versions: Python 3.4
Added file: http://bugs.python.org/file38857/console_log.txt

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



[issue23882] unittest discovery and namespaced packages

2015-04-07 Thread Ezio Melotti

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


--
nosy: +ezio.melotti, michael.foord, rbcollins
type:  - behavior

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



[issue10838] subprocess __all__ is incomplete

2015-04-07 Thread Martin Panter

Martin Panter added the comment:

IMO the two documented exceptions should definitely be added to __all__.

Not so sure, but list2cmdline() should probably be left out, with a comment 
explaining the decision. It is not mentioned in the main documentation that I 
can find, but it is mentioned in the doc string of the “subprocess” module. If 
it is only meant to be an internal detail, it shouldn’t be mentioned by name. 
If it is an external API (which I doubt), it should be documented better and 
added to __all__.

--
nosy: +vadmium

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



[issue23811] Python py_compile error message inconsistent and missing newline

2015-04-07 Thread Alex Shkop

Alex Shkop added the comment:

This patch adds new line symbol. For some reason py_compile module prints only 
SyntaxErrors with traceback. All other exceptions are printed with Sorry: and 
in one line.

--
keywords: +patch
nosy: +ashkop
Added file: http://bugs.python.org/file38858/issue23811.patch

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



[issue10838] subprocess __all__ is incomplete

2015-04-07 Thread R. David Murray

R. David Murray added the comment:

I believe it is and should remain internal.  I agree that the mention should be 
deleted from the docstring.  We removed it from the docs a while back but I 
guess we forgot the docstring.

(If there were an external API for doing what list2cmdline does, it would 
belong in the windows equivalent of the shlex module, something that has been 
discussed (and I think there is an issue in the tracker) but no one has stepped 
forward to write it :)

--
nosy: +r.david.murray

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



[issue23881] test_urllib2net: issues with ftp://gatekeeper.research.compaq.com/, ftp://ftp.mirror.nl/ and ftp://ftp.kernel.org/

2015-04-07 Thread STINNER Victor

STINNER Victor added the comment:

test_urllib2net looks to pass on enough buildbots, I close the issue.

--
resolution:  - fixed
status: open - closed

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



[issue23505] Urlparse insufficient validation leads to open redirect

2015-04-07 Thread Martin Panter

Martin Panter added the comment:

FYI I posted a patch at Issue 22852 to retain the empty netloc “//” when 
appropriate. But even if there is interest in that patch, I guess it can still 
only be applied to the next version of Python (3.5 or whatever), being a new 
feature.

Maybe you could suggest some wording or a patch to the documentation that could 
be applied to bugfix releases as well.

--

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



[issue23772] pymonotonic() gone backward on AMD64 Debian root 3.x buildbot

2015-04-07 Thread STINNER Victor

STINNER Victor added the comment:

I only saw the issue once, I close the bug.

--
resolution:  - out of date
status: open - closed

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



[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-07 Thread R. David Murray

R. David Murray added the comment:

I believe the original objection was that it made it too easy to globally (and 
in a not-obvious-to-the-end-user way) disable validation.  That argument seems 
to apply equally well to the proposed patch, so an environment var at least 
isn't worse; but it does make it less likely that it will be accepted as a 3.5 
feature.

--

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-04-07 Thread Cyd Haselton

Cyd Haselton added the comment:

Will do, re: removing the '+'.

Also, attempted to apply the updated patch and got the following:

/bld/python/cpython-master $ patch -p1  issue_20306\ \(1\).patch
patching file Modules/pwdmodule.c
Possibly reversed hunk 1 at 244
Hunk 1 FAILED 79/79.
 SETS(setIndex++, p-pw_passwd);
 PyStructSequence_SET_ITEM(v, setIndex++, _PyLong_FromUid(p-pw_uid));
 PyStructSequence_SET_ITEM(v, setIndex++, _PyLong_FromGid(p-pw_gid));
+#ifdef HAVE_PASSWD_GECOS_FIELD
 SETS(setIndex++, p-pw_gecos);
+#else
+SETS(setIndex++, Py_None);
+Py_INCREF(Py_None);
+#endif
 SETS(setIndex++, p-pw_dir);
 SETS(setIndex++, p-pw_shell);

patching file configure.ac
Hunk 56 FAILED 4944/4944.
 AC_MSG_RESULT($ENSUREPIP)
 AC_SUBST(ENSUREPIP)

+AC_CHECK_MEMBER([struct passwd.pw_gecos],
+  [AC_DEFINE(HAVE_PASSWD_GECOS_FIELD, 1, [Define if pwd.h defines 
field passwd.pw_gecos])],
+  [],
+  [[#include pwd.h]])
+
 # generate output files
 AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc 
Misc/python-config.sh)
 AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
/bld/python/cpython-master $

--

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



[issue23882] unittest discovery and namespaced packages

2015-04-07 Thread Eric Snow

Changes by Eric Snow ericsnowcurren...@gmail.com:


--
nosy: +eric.snow

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



[issue23873] Removal of dead code in smtpd

2015-04-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 81ce9d412a4c by Benjamin Peterson in branch '3.4':
remove smtpd dead code (closes #23873)
https://hg.python.org/cpython/rev/81ce9d412a4c

New changeset ea21b99d002e by Benjamin Peterson in branch 'default':
merge 3.4 (#23873)
https://hg.python.org/cpython/rev/ea21b99d002e

--
nosy: +python-dev
resolution:  - fixed
stage:  - resolved
status: open - closed

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



[issue23857] Make default HTTPS certificate verification setting configurable via global ini file

2015-04-07 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Environment variables are hidden state. It makes them rather dangerous from a 
security POV (even more so than a root-modifiable configuration file, since it 
is less well-defined who can set an environment variable that will be inherited 
by some process).

As long as the solution that is decided on isn't part of vanilla Python, I care 
a bit less, of course :-)

--

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



[issue23879] asyncio: SelectorEventLoop.sock_connect() must not retry connect() on InterruptedError

2015-04-07 Thread Guido van Rossum

Guido van Rossum added the comment:

LGTM.
On Apr 7, 2015 1:23 AM, STINNER Victor rep...@bugs.python.org wrote:


 New submission from STINNER Victor:

 According to the issue #23618, when connect() fails with EINTR, retrying
 connect() may only work on some platforms. To have a reliable behaviour on
 all platforms, we should wait until the socket becomes writable because the
 connection runs asynchronously in background. When the socket becomes
 writable, we have to gets its error code (getsockopt(SO_ERROR)) to check if
 the connection succeeded or failed.

 Attached patch fixes SelectorEventLoop.sock_connect().

 --
 components: asyncio
 files: connect_eintr.patch
 keywords: patch
 messages: 240195
 nosy: gvanrossum, haypo, yselivanov
 priority: normal
 severity: normal
 status: open
 title: asyncio: SelectorEventLoop.sock_connect() must not retry connect()
 on InterruptedError
 versions: Python 3.4, Python 3.5
 Added file: http://bugs.python.org/file38854/connect_eintr.patch

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


--

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



[issue23411] Update urllib.parse.__all__

2015-04-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a48e76252952 by Serhiy Storchaka in branch 'default':
Issue #23411: Added DefragResult, ParseResult, SplitResult, DefragResultBytes,
https://hg.python.org/cpython/rev/a48e76252952

--
nosy: +python-dev

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



[issue23883] __all__ lists are incomplete

2015-04-07 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Here is a (perhaps incomplete) list of documented names absent in __all__ lists 
of respective modules. Perhaps some of them (but not all) are worth to be added 
to __all__ lists.

calendar.Calendar
calendar.HTMLCalendar
calendar.TextCalendar
cgi.test
configparser.Error
csv.unix_dialect
doctest.DocFileCase
doctest.DocTestCase
enum.EnumMeta
fileinput.fileno
ftplib.Error
ftplib.error_perm
ftplib.error_reply
gettext.bind_textdomain_codeset
gettext.lgettext
gettext.lngettext
http.client.HTTPMessage
http.cookies.Morsel
http.server.test
logging.shutdown
mailbox.Error
mailbox.ExternalClashError
mailbox.NoSuchMailboxError
mailbox.NotEmptyError
mimetypes.MimeTypes
optparse.check_choice
pickletools.OpcodeInfo
plistlib.InvalidFileException
pydoc.doc
smtpd.SMTPChannel
subprocess.SubprocessError
subprocess.TimeoutExpired
tarfile.CompressionError
tarfile.HeaderError
tarfile.ReadError
tarfile.open
threading.BrokenBarrierError
tkinter.ttk.Widget
tokenize.open
traceback.FrameSummary
traceback.StackSummary
traceback.TracebackException
traceback.walk_stack
traceback.walk_tb
wave.Wave_read
wave.Wave_write
xml.etree.ElementTree.XMLPullParser

--
components: Library (Lib)
messages: 240217
nosy: r.david.murray, serhiy.storchaka, vadmium
priority: normal
severity: normal
status: open
title: __all__ lists are incomplete
type: enhancement
versions: Python 3.5

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



[issue23883] __all__ lists are incomplete

2015-04-07 Thread Serhiy Storchaka

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


--
dependencies: +subprocess __all__ is incomplete

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



[issue23411] Update urllib.parse.__all__

2015-04-07 Thread Serhiy Storchaka

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


--
resolution:  - fixed
stage: commit review - resolved
status: open - closed

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



[issue23411] Update urllib.parse.__all__

2015-04-07 Thread Serhiy Storchaka

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


--
assignee:  - serhiy.storchaka
versions:  -Python 3.4

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-04-07 Thread Cyd Haselton

Cyd Haselton added the comment:

Update: Removing the random '+' on line 87 of pwdmodule.c allowed the build to 
continue but it failed again with the following during or soon after linking:

Objects/unicodeobject.o: In function `PyUnicode_EncodeLocale':
/bld/python/cpython-master/Objects/unicodeobject.c:3236: undefined reference to 
`android_wcstombs'
/bld/python/cpython-master/Objects/unicodeobject.c:3248: undefined reference to 
`android_wcstombs'
Objects/unicodeobject.o: In function `wcstombs_errorpos':
/bld/python/cpython-master/Objects/unicodeobject.c:3154: undefined reference to 
`android_wcstombs'
Objects/unicodeobject.o: In function `PyUnicode_DecodeLocaleAndSize':
/bld/python/cpython-master/Objects/unicodeobject.c:3518: undefined reference to 
`android_mbstowcs'
/bld/python/cpython-master/Objects/unicodeobject.c:3518: undefined reference to 
`android_mbstowcs'
Objects/complexobject.o: In function `_Py_c_pow':
/bld/python/cpython-master/Objects/complexobject.c:129: undefined reference to 
`sincos'
Python/fileutils.o: In function `Py_DecodeLocale':
/bld/python/cpython-master/Python/fileutils.c:322: undefined reference to 
`android_mbstowcs'
Python/fileutils.o: In function `Py_EncodeLocale':
/bld/python/cpython-master/Python/fileutils.c:487: undefined reference to 
`android_wcstombs'
/bld/python/cpython-master/Python/fileutils.c:489: undefined reference to 
`android_wcstombs'
Python/fileutils.o: In function `_Py_wfopen':
/bld/python/cpython-master/Python/fileutils.c:1008: undefined reference to 
`android_wcstombs'
collect2: error: ld returned 1 exit status
make: *** [Programs/_freeze_importlib] Error 1

Maybe the androidfn.h wasn't added to the files above?

--

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



[issue23880] Tkinter: getint and getdouble should support Tcl_Obj

2015-04-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 0.  It seems that this pushes conversions from python code (app.py, 
 tkinter.py) to C (_tkinter.py).  Correct?  What is being gained from a user 
 viewpoint?

The benefit is that widget.tk.getint(widget.tk.call(...)) (and 
widget.getint(widget.call(...))) always works when it makes sense. Currently it 
works for integers and strings. If the result of Tcl call becomes some specific 
type in new Tcl version, this needs a workaround with converting to str, as you 
can see in IDLE code. User code with this patch will become more robust against 
future Tcl/Tk changes. And actually against changes that already happen in 
recent Tcl versions. Many user code that worked with 8.3 or 8.4 needed an 
update to work with 8.5 or 8.6. With this patch they perhaps need less changes.

 2. Does the change break existing code?

Usually not.

  In particular, is the idlelib change necessary or optional?

It is optional. It is is just a demonstration how the code can be made simpler 
and more robust.

 How does this match getint and getdouble being synonyms for builtins?
 -getint = int
 -getdouble = float
 Or were 'int' and 'float' overridden before this?

There are different functions on different levels. There are tkapp methods in 
_tkinter.c. There are Misc methods in tkinter.py (added in changesets 
73dd2a979857 and 273451892327). They originally was wrappers around tkapp 
methods. There are module-level functions in tkinter.py. They were converted to 
aliases of int and float in 34cca832a4af.

 3. Should there be a doc change, at least in docstrings?

Unfortunately all these functions are not documented.

--

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



[issue11205] Evaluation order of dictionary display is different from reference manual.

2015-04-07 Thread Steve Dougherty

Steve Dougherty added the comment:

Any word on either changing the documentation to match the behaviour or fixing 
this as a bug?

--
nosy: +sdougherty

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



[issue23884] New DateType for argparse (like FileType but for dates)

2015-04-07 Thread Peter Marsh

New submission from Peter Marsh:

Hello,

Reasonably frequently I find myself needing to pass a date as a command line 
argument to a Python script I've written. Currently, argparse does not have a 
built support for dates - this adds a new class to argparse (much like the 
existing FileType) that parses arguments to datetime.date instances.

Example:

   parser = argparse.ArgumentParser()
   parser.add_argument('--start', type=argparse.DateType('%d/%m/%Y))
   parser.add_argument('end', type=argparse.DateType())
   parser.parse_args(['--start', '01/02/2015', '2015-01-03'])
  Namespace(end=datetime.date(2015, 1, 3), start=datetime.date(2015, 1, 2))


I think this would be a useful addition to the standard library, a quick Google 
shows that many people roll their own version of this anyway.

Support for datetime.datetime and perhaps even datetime.timedeltas might be 
good too, but date/times get a bit more complicated (timezones in general and 
varying support for the '%z' format string which is required to default to an 
ISO8601 date time).

Cheers,

Pete

--
components: Library (Lib)
files: argparse_datetype.patch
keywords: patch
messages: 240220
nosy: petedmarsh
priority: normal
severity: normal
status: open
title: New DateType for argparse (like FileType but for dates)
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file38859/argparse_datetype.patch

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



[issue6650] sre_parse contains a confusing generic error message

2015-04-07 Thread Serhiy Storchaka

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


--
resolution:  - out of date
stage: patch review - resolved
status: open - closed

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



[issue23884] New DateType for argparse (like FileType but for dates)

2015-04-07 Thread SilentGhost

Changes by SilentGhost ghost@gmail.com:


--
nosy: +bethard

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



[issue23880] Tkinter: getint and getdouble should support Tcl_Obj

2015-04-07 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I don't quite understand this, but I think I should.  Here are preliminary 
questions.

0.  It seems that this pushes conversions from python code (app.py, tkinter.py) 
to C (_tkinter.py).  Correct?  What is being gained from a user viewpoint?

1. getint, getdouble and getboolean were thin wrappers around Tcl functions 
that converted string result of Tcl call to specified Python type.

How does this match getint and getdouble being synonyms for builtins?
-getint = int
-getdouble = float
Or were 'int' and 'float' overriden before this?

2. Does the change break existing code?  In particular, is the idlelib change 
necessary or optional?

3. Should there be a doc change, at least in docstrings?

--

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



[issue23879] asyncio: SelectorEventLoop.sock_connect() must not retry connect() on InterruptedError

2015-04-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset eca51493c770 by Victor Stinner in branch '3.4':
Issue #23879, asyncio: SelectorEventLoop.sock_connect() must not call connect()
https://hg.python.org/cpython/rev/eca51493c770

--
nosy: +python-dev

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



[issue23879] asyncio: SelectorEventLoop.sock_connect() must not retry connect() on InterruptedError

2015-04-07 Thread STINNER Victor

STINNER Victor added the comment:

 LGTM.

Thanks for the review.

--
resolution:  - fixed
status: open - closed

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



[issue23884] New DateType for argparse (like FileType but for dates)

2015-04-07 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
nosy: +paul.j3

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



[issue11205] Evaluation order of dictionary display is different from reference manual.

2015-04-07 Thread Guido van Rossum

Guido van Rossum added the comment:

This needs a code patch. But it can only be fixed for 3.5.
On Apr 7, 2015 11:21 AM, Steve Dougherty rep...@bugs.python.org wrote:


 Steve Dougherty added the comment:

 Any word on either changing the documentation to match the behaviour or
 fixing this as a bug?

 --
 nosy: +sdougherty

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


--

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



[issue23848] faulthandler: setup an exception handler on Windows

2015-04-07 Thread STINNER Victor

STINNER Victor added the comment:

More complete (and working) patch. Most unit tests pass, but two unit tests 
must be updated to match the new error message.

--
Added file: http://bugs.python.org/file38860/faulthandler_exc_handler-2.patch

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



[issue16840] Tkinter doesn't support large integers

2015-04-07 Thread STINNER Victor

STINNER Victor added the comment:

test_expr_bignum() should tolerate the long type:

http://buildbot.python.org/all/builders/x86%20Tiger%202.7/builds/3007/steps/test/logs/stdio

==
FAIL: test_expr_bignum (test.test_tcl.TclTest)
--
Traceback (most recent call last):
  File /Users/db3l/buildarea/2.7.bolen-tiger/build/Lib/test/test_tcl.py, line 
443, in test_expr_bignum
self.assertIsInstance(result, type(int(result)))
AssertionError: -2147483648L is not an instance of type 'int'

In fact, I don't understand the test self.assertIsInstance(result, 
type(int(result))). What do you expect from type(int(x)): int or long depending 
on the value of x? The problem is that an intermediate result may be a long and 
so tcl.call('expr', ..) returns a long even if it may fit into a small int.

I suggest to simply drop the test self.assertIsInstance(result, 
type(int(result))).

--
nosy: +haypo
resolution: fixed - 
status: closed - open

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



[issue16840] Tkinter doesn't support large integers

2015-04-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It is important that the result is an int at least for small ints. So I prefer 
to keep limited test.

-self.assertIsInstance(result, type(int(result)))
+if abs(result)  2**31:
+self.assertIsInstance(result, int)

--

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



[issue23885] urllib.quote horribly mishandles unicode as second parameter

2015-04-07 Thread Ezio Melotti

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


--
nosy: +ezio.melotti, orsenthil
type:  - behavior

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



[issue20611] socket.create_connection() doesn't handle EINTR properly

2015-04-07 Thread Gregory P. Smith

Gregory P. Smith added the comment:

i'm moving this to the more recent issue as i like the patch in that one better.

--
superseder:  - Fix EINTR Socket Module issues in 2.7

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



[issue23884] New DateType for argparse (like FileType but for dates)

2015-04-07 Thread paul j3

paul j3 added the comment:

It's a possible addition, but I don't have sense of the demand for it.

I wonder, what does the class offer that a function like this doesn't?

def adate(date_string):
return datetime.datetime.strptime(date_string,'%Y-%m-%d').date()

I'd be hesitant to add FileType if wasn't already present.  It hasn't aged very 
well.  We've had bug issues related to v3 binary files, and contexts.   The 
main feature that FileType (beyond verifying that the file actually does exist) 
adds is the recognition of '-' as stdin/out.  

By analogy I'm lukewarm about adding a DateType class.

--

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



[issue23883] __all__ lists are incomplete

2015-04-07 Thread Martin Panter

Martin Panter added the comment:

http.client.HTTPMessage: See Issue 23439. There was resistance to adding this 
(and the status code constants), though IMO they should be added, since they 
are documented public APIs.

http.server.test(): In Issue 23418, I consciously left this function out. It is 
only mentioned as a place to look for sample code, as far as I can tell.

--

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



[issue20611] socket.create_connection() doesn't handle EINTR properly

2015-04-07 Thread Gregory P. Smith

Changes by Gregory P. Smith g...@krypto.org:


--
resolution:  - duplicate
status: open - closed

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



[issue23885] urllib.quote horribly mishandles unicode as second parameter

2015-04-07 Thread Marcin Kościelnicki

New submission from Marcin Kościelnicki:

All hell breaks loose when unicode is passed as the second argument to 
urllib.quote in Python 2:

 import urllib
 urllib.quote('\xce\x91', u'')
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/lib/python2.7/urllib.py, line 1292, in quote
if not s.rstrip(safe):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 0: ordinal 
not in range(128)

This on its own wouldn't be that bad - just another Python 2 unicode wonkiness. 
 However, coupled with caching done by the quote function (quoters are cached 
based on the second parameter, and u'' == ''), it means that a random preceding 
call to quote from an entirely different place in the application can break 
your code:

$ python2
Python 2.7.9 (default, Dec 11 2014, 04:42:00)
[GCC 4.9.2] on linux2
Type help, copyright, credits or license for more information.
 import urllib
 urllib.quote('\xce\x91', '')
'%CE%91'



$ python2
Python 2.7.9 (default, Dec 11 2014, 04:42:00)
[GCC 4.9.2] on linux2
Type help, copyright, credits or license for more information.
 import urllib
 urllib.quote('a', u'')
'a'
 urllib.quote('\xce\x91', '')
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/lib/python2.7/urllib.py, line 1292, in quote
if not s.rstrip(safe):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 0: ordinal 
not in range(128)

Good luck debugging that.

So, one of two things needs to happen:

- a TypeError when unicode is passed as the second parameter, or
- a cast of the second parameter to str

--
components: Library (Lib)
messages: 240230
nosy: koriakin
priority: normal
severity: normal
status: open
title: urllib.quote horribly mishandles unicode as second parameter
versions: Python 2.7

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



[issue23863] Fix EINTR Socket Module issues in 2.7

2015-04-07 Thread Gregory P. Smith

Gregory P. Smith added the comment:

I like the socketmodule.c part of socket_eintr.1.patch, but it appears to still 
have the issue haypo describes in https://bugs.python.org/issue20611#msg240194 
where connect() cannot be called more than once.  The kernel carries on with 
the connect without our process waiting for it, we have to monitor it to know 
when it has succeeded or failed.

See 
https://hg.python.org/cpython/file/85a5265909cb/Modules/socketmodule.c#l2610 
and issue23618 from Python 3.5.

[code review done at 35,000ft, thanks chromebook gogo free wifi pass!]

--

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



[issue23884] New DateType for argparse (like FileType but for dates)

2015-04-07 Thread R. David Murray

R. David Murray added the comment:

Yes, I think this is a case where it is better for the application to define 
exactly what it needs rather than try to define a general solution that won't 
satisfy everyone :)

FileType's purpose is actually, I think, to give you an *open* file.  Which is 
also where a number of the problems came from :)

--
nosy: +r.david.murray

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



[issue10838] subprocess __all__ is incomplete

2015-04-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 10b0a8076be8 by Gregory P. Smith in branch 'default':
Addresses Issue #10838: The subprocess now module includes
https://hg.python.org/cpython/rev/10b0a8076be8

--
nosy: +python-dev

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



[issue23884] New DateType for argparse (like FileType but for dates)

2015-04-07 Thread paul j3

paul j3 added the comment:

Examples of datetime types from Stackoverflow:

http://stackoverflow.com/questions/21437258/defining-python-argparse-arguments
The suggested answer (but not accepted) is 'type=lambda s: 
datetime.datetime.strptime(s, '%Y-%m-%d')'

another
http://stackoverflow.com/questions/12462074/python-argparse-create-timedelta-object-from-argument

which references
https://gist.github.com/jnothman/4057689
'timedeltatype.py: An argparse type factory that produces datetime.timedelta 
objects'

and
http://stackoverflow.com/questions/25470844/specify-format-for-input-arguments-argparse-python
with a type function

--

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



[issue23505] Urlparse insufficient validation leads to open redirect

2015-04-07 Thread Paul McMillan

Paul McMillan added the comment:

As Martin said, backporting a change for this wouldn't be appropriate
for Python 2.7. The 2.7 docs could certainly be updated to make this
clearer, but we can't introduce a breaking change like that to the
stable release.

--

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



[issue23863] Fix EINTR Socket Module issues in 2.7

2015-04-07 Thread Gregory P. Smith

Changes by Gregory P. Smith g...@krypto.org:


--
assignee:  - gregory.p.smith
keywords: +needs review
stage:  - patch review
type:  - behavior

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



[issue10838] subprocess __all__ is incomplete

2015-04-07 Thread Gregory P. Smith

Gregory P. Smith added the comment:

the things left to to before closing this are to rename mswindows and MAXFD as 
those shouldn't be exported... and to wait for the windows buildbots to tell me 
if i missed adding anything to the intentionally_excluded list in the unittest.

--

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



[issue23885] urllib.quote horribly mishandles unicode as second parameter

2015-04-07 Thread R. David Murray

R. David Murray added the comment:

The typerror isn't going to happen for backward compatibility reasons.  A fix 
isn't likely to happen because python2 doesn't really support unicode in 
urllib, to my understanding (if I'm wrong about that the answser changes).  I'm 
not sure whether casting to string would have backward compatibility issues or 
not (I suspect it would; somneone would have to investigate that question as a 
first step).

--
nosy: +r.david.murray

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



[issue10838] subprocess __all__ is incomplete

2015-04-07 Thread Gregory P. Smith

Gregory P. Smith added the comment:

Done.  MAXFD was already gone in 3.5 (yay).

--
assignee:  - gregory.p.smith
resolution:  - fixed
stage: needs patch - commit review
status: open - closed
type:  - behavior
versions: +Python 3.2 -Python 3.5

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



[issue10838] subprocess __all__ is incomplete

2015-04-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4c14afc3f931 by Gregory P. Smith in branch 'default':
issue10838: Rename the subprocess.mswindows internal global to _mswindows.
https://hg.python.org/cpython/rev/4c14afc3f931

--

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



[issue23835] configparser does not convert defaults to strings

2015-04-07 Thread James Tocknell

James Tocknell added the comment:

Here's a patch for 2.7 (based of the head of the 2.7 branch), something similar 
could be done for 3.4 (I wasn't sure what branch I was supposed to base the 
patch off, since 3.4 is inactive). The string requirement was already noted in 
the docstring of the configparser module, but that's not mentioned in the main 
docs. Also, I wasn't sure where to put a test in because there was not 
test_configparser.py located in Lib/test.

--
keywords: +patch
Added file: http://bugs.python.org/file38861/py27-config-fix.patch

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



[issue15443] datetime module has no support for nanoseconds

2015-04-07 Thread R. David Murray

R. David Murray added the comment:

Unfortunately no, that would be a new feature and so can't go into 2.7.  Maybe 
someone could backport the work that has been done in this area so people could 
patch locally, but I don't think it is a small job and I'm pretty sure no one 
on the core team is interested.

--

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



[issue23865] Fix possible leaks in close methods

2015-04-07 Thread Martin Panter

Martin Panter added the comment:

The change to aifc shouldn’t be needed, unless the underlying file object’s 
close() is not idempotent. And if that is the case, you’re fixing the bug in 
the wrong place :)

Most of the other changes look good from a rough review, though I was only 
familiar enough with the gzip and HTTP modules to review them thoroughly. I 
left a few comments on Reitveld.

--
nosy: +vadmium

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



[issue12808] Coverage of codecs.py

2015-04-07 Thread Martin Panter

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


--
nosy: +vadmium

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



[issue23841] py34 OrderedDict is using weakref for root reference

2015-04-07 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Closing as not-a-bug.  It seems that the __del__ method in requests needs to 
make one of the adjustments suggested by Antoine.

--
priority: high - normal
resolution:  - not a bug
status: open - closed

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



[issue12053] Add prefetch() for Buffered IO (experiment)

2015-04-07 Thread Martin Panter

Martin Panter added the comment:

Sounds like this might be more appropriate for the BufferedReader and related 
classes, and less so for the writer and abstract base class.

The proposed API seems strange to me. Is there an illustration of how it might 
be used? I suspect it wouldn’t be all that useful, and could more or less be 
implemented with the existing methods:

def prefetch(buffered_reader, buffer, skip, minread):
buffered_reader.read(skip)
consumed = buffered_reader.readinto(buffer[:minread])
if consumed  minread:
return consumed
spare = len(buffer) - consumed
extra = buffered_reader.peek(spare)[:spare]
total = consumed + len(extra)
buffer[consumed:total] = extra
return total

Maybe it would be better to focus on clarifying or redefining the existing 
peek() method (Issue 5811), rather than making a brand new do-everything method 
which only seems to do what the other methods already do.

--

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



[issue15443] datetime module has no support for nanoseconds

2015-04-07 Thread Steve

Steve added the comment:

Hi,
This issue is causing my organization problems. We are using python 2.7.9 with 
pyodbc 3.0.7
The application DB is SQL Server and they have started using Datetime2 (see: 
https://msdn.microsoft.com/en-us/library/bb677335.aspx?f=255MSPPError=-2147217396)

They did this to ensure that transactions timestamps are more unique, specially 
when data is bulk uploaded into the DB.

Datetime2 supports to seven places. Our application is now getting timestamps 
that are truncated to 6 places, making them useless when comparing a timestamp 
= to others in the db.

This is a real world issue and we really need a fix. We are not able to migrate 
at the moment to python 3 due to other constraints.
Any chance someone can take Matthieu's patch and retro fit it to 2.7.9 (if that 
makes sense)?

--
nosy: +scoobydoo

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



[issue23548] TypeError in event loop finalizer, new in Python 3.4.3

2015-04-07 Thread William Woodall

William Woodall added the comment:

I was getting the same error as the OP in my application.

I did something like this to work around the problem:

import asyncio
import atexit

def close_asyncio_loop():
loop = None
try:
loop = asyncio.get_event_loop()
except AttributeError:
pass
if loop is not None:
loop.close()

atexit.register(close_asyncio_loop)

Is this an appropriate work around?

Why is it up to the application to close the loop explicitly?

Put another way, in what scenario would I want to close the loop outside of the 
application shutting down since it is irreversible?

Thanks in advance for your time.

--
nosy: +wjwwood

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



[issue10838] subprocess __all__ is incomplete

2015-04-07 Thread Berker Peksag

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


--
stage: commit review - resolved
versions: +Python 3.5 -Python 3.2

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