[issue24964] Add tunnel CONNECT response headers to httplib / http.client

2015-09-07 Thread Martin Panter

Martin Panter added the comment:

1) The real problem is when _tunnel() internally calls getresponse(), it 
notices the connection cannot be reused for another request, and closes the 
socket object. Perhaps I should rethink my logic; maybe move sock and detach() 
to HTTPResponse.

2) With some rough experimentation, passing tunnel through the HTTPConnection 
(plain text HTTP) constructor seems to work for me. However if you meant 
HTTPSConnection (over TLS) instead, you will probably need to manually do the 
wrap_socket() step. Maybe that’s why your connection is being dropped.

--

___
Python tracker 

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



[issue24272] PEP 484 docs

2015-09-07 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Guido, are you going to commit our patches before 3.5.final? Is there a merge 
conflict now? Should I rebase my diff?

If necessary I could make a clean patch combining two patches (my and Daniel's) 
on top of what Zachary did.

--

___
Python tracker 

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



[issue24951] Idle test_configdialog fails on Fedora 23, 3.6

2015-09-07 Thread Petr Viktorin

Petr Viktorin added the comment:

Sorry for the delay; I lost the mail notification.

I don't have a config-main.cfg file.

The last output from the test, with the print added:

test_dialog (idlelib.idle_test.test_configdialog.ConfigDialogTest) ... 
('.139655680391704', 'configure', '-borderwidth', 5)
('.139655680391704.139655680370912.139655680371640.139655680370184.139655676916736.139655676917048.139655676917672',
 'configure', '-command', '139655677350312yview')
('.139655680391704.139655680370912.139655680371640.139655680370184.139655676916736.139655676917048.139655676917360',
 'configure', '-yscrollcommand', '139655677341608set')
('.139655680391704.139655680370912.139655680371640.139655680370184.139655676916736.139655676917152.139655676918296',
 'configure', '-menu', )
('.139655680391704.139655680370912.139655680371640.139655680370184.139655676916736.139655676917152.139655676918296',
 'configure')
('.139655680391704.139655680370912.139655680371640.139655680345608.139655676932496.139655676932704',
 'configure', '-state', 'disabled')
('.139655680391704.139655680370912.139655680371640.139655680345608.139655676932496.139655677333032.139655677332408',
 'configure', '-menu', )
('.139655680391704.139655680370912.139655680371640.139655680345608.139655676932496.139655677333032.139655677332408',
 'configure', '-highlightthickness', 0)
('.139655680391704.139655680370912.139655680371640.139655680345608.139655676932600.139655676935200',
 'configure', '-menu', )
('.139655680391704.139655680370912.139655680371640.139655680345608.139655676932600.139655676935200',
 'configure')
('.139655680391704.139655680370912.139655680371640.139655680345608.139655676932600.139655676935616',
 'configure', '-menu', )
('.139655680391704.139655680370912.139655680371640.139655680345608.139655676932600.139655676935616',
 'configure')
('.139655680391704.139655680370912.139655680371640.139655680789328.139655676961480.139655676961688.139655676961896',
 'configure', '-command', '139655676968648yview')
('.139655680391704.139655680370912.139655680371640.139655680789328.139655676961480.139655676961688.139655676962000',
 'configure', '-command', '139655676973368xview')
('.139655680391704.139655680370912.139655680371640.139655680789328.139655676961480.139655676961688.139655676962104',
 'configure', '-yscrollcommand', '139655676973928set')
('.139655680391704.139655680370912.139655680371640.139655680789328.139655676961480.139655676961688.139655676962104',
 'configure', '-xscrollcommand', '139655676974600set')
('.139655680391704.139655680370912.139655680371640.139655680789328.139655676961584.139655676963352.139655676963976',
 'configure', '-menu', )
('.139655680391704.139655680370912.139655680371640.139655680789328.139655676961584.139655676963352.139655676963976',
 'configure')
('.139655680391704.139655680370912.139655680371640.139655680789328.139655676961584.139655676963352.139655676964392',
 'configure', '-menu', )
('.139655680391704.139655680370912.139655680371640.139655680789328.139655676961584.139655676963352.139655676964392',
 'configure')
('.139655680391704.139655680370912.139655680371640.139655677346192.139655676990984.139655676992648.139655676992856',
 'configure', '-command', '139655676998504yview')
('.139655680391704.139655680370912.139655680371640.139655677346192.139655676990984.139655676992648.139655676992960',
 'configure', '-yscrollcommand', '139655677003496set')
('.139655680391704.139655680370912.139655680371640.139655680370184.139655676916736.139655676918920.139655676919024',
 'configure', '-font', '{dejavu sans mono} {} normal')
ERROR

==
ERROR: test_dialog (idlelib.idle_test.test_configdialog.ConfigDialogTest)
--
Traceback (most recent call last):
  File "/home/pviktori/dev/cpython/Lib/idlelib/idle_test/test_configdialog.py", 
line 27, in test_dialog
d=ConfigDialog(self.root, 'Test', _utest=True)
  File "/home/pviktori/dev/cpython/Lib/idlelib/configDialog.py", line 71, in 
__init__
self.LoadConfigs()
  File "/home/pviktori/dev/cpython/Lib/idlelib/configDialog.py", line 1078, in 
LoadConfigs
self.LoadFontCfg()
  File "/home/pviktori/dev/cpython/Lib/idlelib/configDialog.py", line 980, in 
LoadFontCfg
self.SetFontSample()
  File "/home/pviktori/dev/cpython/Lib/idlelib/configDialog.py", line 858, in 
SetFontSample
self.labelFontSample.config(font=newFont)
  File "/home/pviktori/dev/cpython/Lib/tkinter/__init__.py", line 1331, in 
configure
return self._configure('configure', cnf, kw)
  File "/home/pviktori/dev/cpython/Lib/tkinter/__init__.py", line 1322, in 
_configure
self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
_tkinter.TclError: expected integer but got ""

--

--

___
Python tracker 

__

[issue25017] htmllib deprecated: Which library to use? Missing sane default in docs

2015-09-07 Thread Thomas Guettler

New submission from Thomas Guettler:

At the top of the htmllib module:


> Deprecated since version 2.6: The htmllib module has been removed in
> Python 3.


Source: https://docs.python.org/2/library/htmllib.html#module-htmllib


Newcomers need more advice: Which library should be used?

I know there are many html parsing libraries.

But there should be a sane default for newcomers.

Is there already an agreement of a sane default html parsing library?

--
assignee: docs@python
components: Documentation
messages: 250088
nosy: docs@python, guettli
priority: normal
severity: normal
status: open
title: htmllib deprecated: Which library to use? Missing sane default in docs

___
Python tracker 

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



[issue25018] test_shutil.test_make_archive() fails on Windows

2015-09-07 Thread STINNER Victor

New submission from STINNER Victor:

It looks like test_shutil fails since the changeset 
4383ff47ffface248c8eabedf0f4c3bdab11f535:
http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Non-Debug%203.x/builds/315/

==
FAIL: test_make_tarball (test.test_shutil.TestShutil)
--
Traceback (most recent call last):
  File "B:\buildarea\3.x.ware-win81-release\build\lib\test\test_shutil.py", 
line 987, in test_make_tarball
self.assertTrue(os.path.isfile(tarball))
AssertionError: False is not true

--
components: Tests
messages: 250089
nosy: haypo, serhiy.storchaka
priority: normal
severity: normal
status: open
title: test_shutil.test_make_archive() fails on Windows
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue25018] test_shutil.test_make_archive() fails on Windows 8.1

2015-09-07 Thread STINNER Victor

STINNER Victor added the comment:

The test pass on Windows 7 and Windows 10 buildbots.

--
title: test_shutil.test_make_archive() fails on Windows -> 
test_shutil.test_make_archive() fails on Windows 8.1

___
Python tracker 

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



[issue25018] test_shutil.test_make_archive() fails on Windows 8.1

2015-09-07 Thread STINNER Victor

STINNER Victor added the comment:

Strange, the bug is only on one buildbot. It pass on the Windows 8 buildbot:
http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x/builds/1249

--

___
Python tracker 

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



[issue25017] htmllib deprecated: Which library to use? Missing sane default in docs

2015-09-07 Thread Martin Panter

Martin Panter added the comment:

PEP 3108 says “Superseded by HTMLParser”. I presume this means Python 3’s 
“html.parser” module (called “HTMLParser” in Python 2). I guess a lot of work 
would be involved in changing existing code over, but it shouldn’t be much of a 
problem for someone writing new code.

--
nosy: +martin.panter
versions: +Python 2.7

___
Python tracker 

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-09-07 Thread Alecsandru Patrascu

Alecsandru Patrascu added the comment:

I've updated the patches with redirect to /dev/null, as is it is more clearer 
to the user what is our intent, without having him to necessarily read the 
regrtest documentation. I've also added a warning message regarding the output 
and ported all these lines to 3.6 and to the README files also.

--

___
Python tracker 

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-09-07 Thread Alecsandru Patrascu

Changes by Alecsandru Patrascu :


Added file: http://bugs.python.org/file40387/python2.7-pgo-v07.patch

___
Python tracker 

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-09-07 Thread Alecsandru Patrascu

Changes by Alecsandru Patrascu :


Added file: http://bugs.python.org/file40388/python3.6-pgo-v07.patch

___
Python tracker 

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-09-07 Thread Alecsandru Patrascu

Changes by Alecsandru Patrascu :


Added file: http://bugs.python.org/file40389/README2.7-pgo-v02.patch

___
Python tracker 

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-09-07 Thread Alecsandru Patrascu

Changes by Alecsandru Patrascu :


Added file: http://bugs.python.org/file40390/README3.6-pgo-v02.patch

___
Python tracker 

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



[issue24862] subprocess.Popen behaves incorrect when moved in process tree

2015-09-07 Thread Andre Merzky

Andre Merzky added the comment:

Hi again, 

can I do anything to help moving this forward?

Thanks, Andre.

--

___
Python tracker 

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-09-07 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Please don't call it "PROFILE_TASK_X86" - the architecture should have nothing 
to do with it. Actually, there shouldn't be any architecture-specific check at 
all.

--

___
Python tracker 

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-09-07 Thread Antoine Pitrou

Antoine Pitrou added the comment:

As for the dual 2.7/3.6 aspect: I don't really understand it. If this is 
committed to 2.7 it should also be committed to 3.5. It doesn't threaten the 
stability of the interpreter in any way, given it does not affect the default 
build path. There's no reason why packagers of Python 3.5 should have to 
separately maintain a patch to have access to this improvement.

--
nosy: +larry
versions: +Python 3.5

___
Python tracker 

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



[issue25018] test_shutil.test_make_archive() fails on Windows 8.1

2015-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7bd6b8076c48 by Serhiy Storchaka in branch '3.4':
Explicitly test archive name in shutil.make_archive() tests to expose failure
https://hg.python.org/cpython/rev/7bd6b8076c48

New changeset beda04bf5991 by Serhiy Storchaka in branch '2.7':
Explicitly test archive name in shutil.make_archive() tests to expose failure
https://hg.python.org/cpython/rev/beda04bf5991

New changeset f842c2b710ed by Serhiy Storchaka in branch '3.5':
Explicitly test archive name in shutil.make_archive() tests to expose failure
https://hg.python.org/cpython/rev/f842c2b710ed

New changeset 738e227d0891 by Serhiy Storchaka in branch 'default':
Explicitly test archive name in shutil.make_archive() tests to expose failure
https://hg.python.org/cpython/rev/738e227d0891

--
nosy: +python-dev

___
Python tracker 

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



[issue25018] test_shutil.test_make_archive() fails on Windows 8.1

2015-09-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is a consequence of 9774088c8ff7. I don't know why the test fails.

Added explicit checks for archive name.

--

___
Python tracker 

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-09-07 Thread Alecsandru Patrascu

Alecsandru Patrascu added the comment:

I named this task PROFILE_TASK_X86 because it is rigorously tested and we have 
proven that regrtest performs better on this architecture. Until any other 
clear evidence and solid measurements that regrtest is performing better on 
other architectures exists, I'd keep it this way.

Even though this does not threaten the stability of the interpreter in any way, 
the dual aspect you mentioned appears because CPython 2 and 3 have slightly 
different makefile rule format. To create a common patch working cross-versions 
will create a very tangled Makefile. If you all agree that having an unified 
patch for both versions is acceptable, I will work on that.

--

___
Python tracker 

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-09-07 Thread Stefan Krah

Stefan Krah added the comment:

I don't think we should provide any performance guarantees in the
Makefile.  +1 for not special-casing x86 (does it include amd64?).


As I understood, Antoine was not talking about a unified patch
but about applying the 3.6 patch to 3.5 right away.

--

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-07 Thread Larry Hastings

Larry Hastings added the comment:

Well, for now I assume it really truly genuinely isn't going in 3.5.0.  I 
suppose we can debate about 3.4.x and 3.5.1 later, once we have a fix everybody 
is happy with.

--

___
Python tracker 

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-09-07 Thread Alecsandru Patrascu

Changes by Alecsandru Patrascu :


Added file: http://bugs.python.org/file40391/python2.7-pgo-v07.patch

___
Python tracker 

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-09-07 Thread Alecsandru Patrascu

Changes by Alecsandru Patrascu :


Removed file: http://bugs.python.org/file40387/python2.7-pgo-v07.patch

___
Python tracker 

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-09-07 Thread Alecsandru Patrascu

Changes by Alecsandru Patrascu :


Added file: http://bugs.python.org/file40392/python3.6-pgo-v07.patch

___
Python tracker 

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-09-07 Thread Alecsandru Patrascu

Changes by Alecsandru Patrascu :


Removed file: http://bugs.python.org/file40388/python3.6-pgo-v07.patch

___
Python tracker 

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-09-07 Thread Alecsandru Patrascu

Alecsandru Patrascu added the comment:

If you are talking just about the 3.6 patch, it is called this way to emphasize 
the fact that it is intended for the development branch. It is perfectly 
compatible with 3.5, therefore it is not needed for packagers to maintain two 
distinct versions. I've tested with: hg update 3.5 ; hg import --no-commit 
python3.6-pgo-v07.patch ; ./configure ; make profile-opt

I also renamed the profile task makefile name.

--

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-07 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Larry> Well, for now I assume it really truly genuinely isn't going in 3.5.0.

This is an unfortunate outcome.

Larry> I suppose we can debate about 3.4.x and 3.5.1 later

It is even more unfortunate that the question of whether this regression is a 
bug or not is up for debate again.

Victor> The code will be new, I'm not condifent enough to push it immedialty 
into python 3.5.

I don't understand why any new code is needed to fix a regression.  All you 
need to do is to revert a few chunks of 1e9cc1a03365 where the regression was 
introduced.

--

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-07 Thread Larry Hastings

Larry Hastings added the comment:

If the guy doing the work says "don't merge it in 3.5.0", and we're at the 
final release candidate before 3.5.0 final ships, and we don't even have a 
patch that everyone likes yet... it does seem like it's not going to happen for 
3.5.0.  Unfortunate perhaps but that's the situation we're in.

--

___
Python tracker 

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



[issue24915] Profile Guided Optimization improvements (better training, llvm support, etc)

2015-09-07 Thread Stefan Krah

Stefan Krah added the comment:

Just (hopefully) for extra clarity:  As you mentioned, the 3.6 patch
is perfect for 3.5, too.  The reason why 3.5 was brought up is to ask
Larry, our release manager, to allow it already for 3.5.

Technically it's an enhancement/new feature, but practically it
is zero risk and for PR reassons we should probably not "make 2.7
faster" before 3.5.

--

___
Python tracker 

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



[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-09-07 Thread Stefan Krah

Stefan Krah added the comment:

The buildbot segfaults all over the place, also in test_tokenize
and test_json:

http://buildbot.python.org/all/builders/x86-64%20Windows%20Server%202012R2%20ICC%203.x/builds/89/steps/test/logs/stdio


Running the tests under the VS debugger is probably the fastest way to find out 
why (I don't have the Intel compiler).

--
nosy: +skrah

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-07 Thread STINNER Victor

STINNER Victor added the comment:

> All you need to do is to revert a few chunks of 1e9cc1a03365 where the 
> regression was introduced.

Hum, please don't revert this change. I spent a lot of days to write 
pytime.c/.h.

My patches add more unit tests to datetime, to test the exact rounding mode.

> Well, for now I assume it really truly genuinely isn't going in 3.5.0.  I 
> suppose we can debate about 3.4.x and 3.5.1 later, once we have a fix 
> everybody is happy with.

The rounding mode of microseconds only impact a very few people. The rounding 
mode changed in 3.3, again in 3.4 and again in 3.5. This issue is the first bug 
report. So I think it's fine to modify 3.4.x and 3.5.x.

--

___
Python tracker 

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



[issue25018] test_shutil.test_make_archive() fails on Windows 8.1

2015-09-07 Thread Zachary Ware

Changes by Zachary Ware :


--
nosy: +zach.ware

___
Python tracker 

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



[issue25014] Add contextlib.itercm()

2015-09-07 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-07 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Victor> please don't revert this change.

I did not suggest reverting the entire commit.  The change that affects 
fromdatetime() is just

-us = round(frac * 1e6)
+us = int(frac * 1e6)

in datetime.py.  It is probably more involved in _datetimemodule.c, but cannot 
be that bad.  You can still keep pytime.c/.h.

--

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2015-09-07 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Sep 04, 2015, at 08:55 PM, STINNER Victor wrote:

>Maybe it can be fun to rewrite the module using asyncio, but I'm not
>convinced that a SMTP server in the Python stdlib is super useful.

As I mentioned in issue25008, removing smtpd would be a hardship for myself,
and I don't think I'm alone.  I would however love to have (and maybe even
work on ) an asyncio-based version.  I do think it is useful to have an
SMTP server in the stdlib - and actually, I'd also like to have an LMTP server
there too.  But I think we can take baby steps toward this by some folks
getting together and writing a third party asyncio-based module, releasing
this on PyPI and eventually leading to its inclusion in Python down the road.
I think there's no hurry to remove smtpd, but it can be deprecated-in-place
like optparse, as someone else mentioned.

--

___
Python tracker 

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



[issue25008] Deprecate smtpd

2015-09-07 Thread STINNER Victor

STINNER Victor added the comment:

Even if it may be possible to support asyncore/asynchat and asyncio at the same 
time, I would prefer to drop asyncore/asynchat support to simplify the code.

The problem is that the API will be very different.

asyncio has a different design. You don't instanciate a class to open a network 
connection, but you have to call "yield from loop.create_connection()" in a 
coroutine.

We might provide helper blocking functions starting the server for us and then 
running the event loop until CTRL+c is pressed (or another event to stop to 
stop the loop).

Rewriting smtpd with asyncio would allow to use it in an asyncio application. 
In 2015, I expect to see more and more applications using asyncio than 
asyncore/asynchat.

Can we modify the issue title to "Rewrite smtpd with asyncio"?

--
nosy: +haypo

___
Python tracker 

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



[issue25008] Deprecate smtpd

2015-09-07 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Sep 07, 2015, at 02:26 PM, STINNER Victor wrote:

>Can we modify the issue title to "Rewrite smtpd with asyncio"?

Sure, although I'm currently thinking it's best to go third party until the
API and implementation settle down.

--

___
Python tracker 

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



[issue25008] Deprecate smtpd

2015-09-07 Thread Eric V. Smith

Changes by Eric V. Smith :


--
nosy: +eric.smith

___
Python tracker 

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



[issue8232] webbrowser.open incomplete on Windows

2015-09-07 Thread Brandon Milam

Brandon Milam added the comment:

applying 25005_1.patch
patching file Lib/webbrowser.py
Hunk #1 FAILED at 498
Hunk #2 FAILED at 524
Hunk #3 FAILED at 532
Hunk #4 FAILED at 540
Hunk #5 FAILED at 548
I'm trying to apply your patch after applying webbrowserfix6.patch but I am 
encountering problems. I first tried "hg import --no-commit file.patch" for 
both patches but it wouldn't let me use the command two times in a row without 
committing the changes for the first one so I tried committing the 
webbrowserfix6.patch changes and then using the import command and I get this 
error message. I would like to try to make sure the code still does what it is 
supposed to but I can't check until I can get both patches in.

Hunk #6 FAILED at 556
6 out of 6 hunks FAILED -- saving rejects to file Lib/webbrowser.py.rej
patching file Modules/posixmodule.c
Hunk #1 FAILED at 10522
Hunk #2 FAILED at 10578
Hunk #3 FAILED at 10590
Hunk #4 FAILED at 10606
Hunk #5 FAILED at 10616
5 out of 5 hunks FAILED -- saving rejects to file Modules/posixmodule.c.rej
abort: patch failed to apply

--

___
Python tracker 

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



[issue23517] datetime.utcfromtimestamp rounds results incorrectly

2015-09-07 Thread Mark Dickinson

Mark Dickinson added the comment:

FWIW, count me as +1 on roundTiesToEven, mostly just for consistency.  It's 
easier to remember that pretty much everything in Python 3 does 
round-ties-to-even (round function, string formatting, float literal 
evaluations, int-to-float conversion, Fraction-to-float conversion, ...) than 
to have to remember that there's a handful of corner cases where we do 
roundTiesToAway instead.

--

___
Python tracker 

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



[issue8232] webbrowser.open incomplete on Windows

2015-09-07 Thread Steve Dower

Steve Dower added the comment:

Try doing:

hg up -r 4e329892817c1eed81aafd14e82b8ef23b45a6e6
hg import --no-commit http://bugs.python.org/file40384/25005_1.patch

That *should* apply it where I originally made it from. I'll do the same and 
rebase the patch against tip.

--

___
Python tracker 

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



[issue8232] webbrowser.open incomplete on Windows

2015-09-07 Thread Steve Dower

Steve Dower added the comment:

New patch against 3.6.

--
Added file: http://bugs.python.org/file40393/8232_1.patch

___
Python tracker 

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



[issue25019] xmlparse_setattro() Type Confusion

2015-09-07 Thread John Leitch

New submission from John Leitch:

Python 3.4 and 3.5 suffer from a vulnerability caused by the behavior of the 
xmlparse_setattro() function. When called, the function uses the provided name 
argument in several conditional statements which assume that the name argument 
is a string.

However, if a name argument is provided that is not a string, this logic will 
make several calls to PyUnicode_CompareWithASCIIString that expect a string, 
yet receive some other type of object, leading to a type confusion 
vulnerability:

static int
xmlparse_setattro(xmlparseobject *self, PyObject *name, PyObject *v)
{
/* Set attribute 'name' to value 'v'. v==NULL means delete */
if (v == NULL) {
PyErr_SetString(PyExc_RuntimeError, "Cannot delete attribute");
return -1;
}
assert(PyUnicode_Check(name));
if (PyUnicode_CompareWithASCIIString(name, "buffer_text") == 0) {
[...]
}


In some applications, it may be possible to exploit this behavior to achieve 
arbitrary code execution. The type confusion can be observed by running the 
following script:

from xml.parsers.expat import *
p = ParserCreate()
p.__setattr__(range(0xF), 0)

Which, depending on the arrangement of memory, may produce an exception such as 
this:

0:000> g
(d84.ce0): Access violation - code c005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=0086f904 ebx=0086f8fc ecx=0050005c edx=00b60138 esi=0050005e edi=00b60138
eip=61e9a967 esp=0086f8c8 ebp=0086f8e0 iopl=0 nv up ei ng nz na pe cy
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b efl=00010287
python35!find_maxchar_surrogates+0x37:
61e9a967 0fb701  movzx   eax,word ptr [ecx]   ds:002b:0050005c=
0:000> k3
ChildEBP RetAddr  
0086f8e0 61e9aa35 python35!find_maxchar_surrogates+0x37 
[c:\build\cpython\objects\unicodeobject.c @ 1417]
0086f908 61eabcf3 python35!_PyUnicode_Ready+0x35 
[c:\build\cpython\objects\unicodeobject.c @ 1466]
0086f918 61c547c3 python35!PyUnicode_CompareWithASCIIString+0x13 
[c:\build\cpython\objects\unicodeobject.c @ 10784]


To fix this issue, it is recommended that xmlparse_setattro() be updated to 
validate that the name argument is a string and return out of the function 
early if it is not. A proposed patch is attached.

Credit: John Leitch (johnlei...@outlook.com), Bryce Darling 
(darlingbr...@gmail.com)

--
components: XML
files: xmlparse_setattro_Type_Confusion.py
messages: 250116
nosy: JohnLeitch
priority: normal
severity: normal
status: open
title: xmlparse_setattro() Type Confusion
type: security
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file40394/xmlparse_setattro_Type_Confusion.py

___
Python tracker 

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



[issue25019] xmlparse_setattro() Type Confusion

2015-09-07 Thread John Leitch

Changes by John Leitch :


--
keywords: +patch
Added file: 
http://bugs.python.org/file40395/xmlparse_setattro_Type_Confusion.patch

___
Python tracker 

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



[issue25019] xmlparse_setattro() Type Confusion

2015-09-07 Thread John Leitch

Changes by John Leitch :


--
nosy: +brycedarling

___
Python tracker 

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



[issue25019] xmlparse_setattro() Type Confusion

2015-09-07 Thread John Leitch

Changes by John Leitch :


--
nosy: +christian.heimes

___
Python tracker 

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



[issue8232] webbrowser.open incomplete on Windows

2015-09-07 Thread Brandon Milam

Brandon Milam added the comment:

Ok I've been able to test the new patch now and I'm not sure that os.startfile 
is going to work. I've been able to get os.startfile() to open a specified 
browser (>>> os.startfile("chrome.exe", "open")), however, the function does 
not allow additional arguments(>>> os.startfile("chrome.exe", "open", 
"www.yahoo.com")
Traceback (most recent call last):
  File "", line 1, in 
TypeError: startfile() takes at most 2 arguments (3 given))) so not even a url 
will be allowed to be specified as the code is written in the patch let alone 
specifying new window or new tab. Is this an error on os.startfile's part? The 
documentation for it seems to indicate that it should take multiple inputs. I 
don't have much experience with C to be able to find out figure out what the 
rest of your patch accomplished.

--

___
Python tracker 

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



[issue24272] PEP 484 docs

2015-09-07 Thread Guido van Rossum

Guido van Rossum added the comment:

I apologize, I've been distracted. I will try to get to this before 3.5.0 final 
goes out! I don't know if the fixes will end up in the tar ball but they will 
certainly be on docs.python.org.

--

___
Python tracker 

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



[issue25018] test_shutil.test_make_archive() fails on Windows 8.1

2015-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 58937cd19a85 by Serhiy Storchaka in branch '3.4':
Issue #25018: Fixed testing shutil.make_archive() with relative base_name on
https://hg.python.org/cpython/rev/58937cd19a85

New changeset d9c4b35e3fdc by Serhiy Storchaka in branch '2.7':
Issue #25018: Fixed testing shutil.make_archive() with relative base_name on
https://hg.python.org/cpython/rev/d9c4b35e3fdc

New changeset 4312b6549590 by Serhiy Storchaka in branch '3.5':
Issue #25018: Fixed testing shutil.make_archive() with relative base_name on
https://hg.python.org/cpython/rev/4312b6549590

New changeset b076b62731b7 by Serhiy Storchaka in branch 'default':
Issue #25018: Fixed testing shutil.make_archive() with relative base_name on
https://hg.python.org/cpython/rev/b076b62731b7

--

___
Python tracker 

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



[issue25018] test_shutil.test_make_archive() fails on Windows 8.1

2015-09-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I hope that I preserved the intention of the test. It tested relative 
make_archive() with base_name. Original test first changed working directory 
and drive (to the same drive as the drive of output file) and then called 
private function _make_tarball(). After my refactoring the code became call 
make_archive() that resolve base_name before changing current directory. The 
peculiarity of the buildbot is that it crates temporary files on different 
drive that current drive, and relative base_name were resolved to wrong 
absolute name.

Now the code changes current directory before calling make_archive() with 
relative base_name argument and the test makes sense on non-Windows. Also added 
similar test for zip format.

--
assignee:  -> serhiy.storchaka
stage:  -> commit review

___
Python tracker 

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



[issue25019] xmlparse_setattro() Type Confusion

2015-09-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka
stage:  -> patch review

___
Python tracker 

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



[issue23551] IDLE to provide menu link to PIP gui.

2015-09-07 Thread Mark Roseman

Changes by Mark Roseman :


--
nosy: +markroseman

___
Python tracker 

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



[issue22179] Idle. Search dialog found text not highlited on Windows

2015-09-07 Thread Mark Roseman

Changes by Mark Roseman :


--
nosy: +markroseman

___
Python tracker 

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



[issue22460] idle editor: replace all in selection

2015-09-07 Thread Mark Roseman

Changes by Mark Roseman :


--
nosy: +markroseman

___
Python tracker 

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



[issue13586] IDLE: Replace selected not working/consistent with find

2015-09-07 Thread Mark Roseman

Changes by Mark Roseman :


--
nosy: +markroseman

___
Python tracker 

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



[issue18590] Found text not always highlighted by Replace dialog on Windows

2015-09-07 Thread Mark Roseman

Changes by Mark Roseman :


--
nosy: +markroseman

___
Python tracker 

___
___
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

2015-09-07 Thread Mark Roseman

Changes by Mark Roseman :


--
nosy: +markroseman

___
Python tracker 

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



[issue8232] webbrowser.open incomplete on Windows

2015-09-07 Thread Steve Dower

Steve Dower added the comment:

The C part of the patch adds an extra argument to startfile to accept the 
arguments. You'll need to rebuild Python to test the change completely - it's 
no longer just a pure Python change.

--

___
Python tracker 

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



[issue24972] IDLE: revisit text highlighting for inactive windows on win32

2015-09-07 Thread Mark Roseman

Mark Roseman added the comment:

See inactiveselection.patch. This addresses the original bug of the debugger 
not highlighting the correct line, and also various issues with the find 
windows not highlighting the selection they have found, e.g. #22179, #18590

--
keywords: +patch
Added file: http://bugs.python.org/file40396/inactiveselection.patch

___
Python tracker 

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



[issue25017] htmllib deprecated: Which library to use? Missing sane default in docs

2015-09-07 Thread Thomas Guettler

Thomas Guettler added the comment:

This issue is just about documentation. No code change is required for it.

How to update the docs, to point to html.parser?

--

___
Python tracker 

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



[issue25019] xmlparse_setattro() Type Confusion

2015-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ff2c4f281720 by Serhiy Storchaka in branch '3.4':
Issue #25019: Fixed a crash caused by setting non-string key of expat parser.
https://hg.python.org/cpython/rev/ff2c4f281720

New changeset 6006231dcaae by Serhiy Storchaka in branch '3.5':
Issue #25019: Fixed a crash caused by setting non-string key of expat parser.
https://hg.python.org/cpython/rev/6006231dcaae

New changeset edf25acae637 by Serhiy Storchaka in branch 'default':
Issue #25019: Fixed a crash caused by setting non-string key of expat parser.
https://hg.python.org/cpython/rev/edf25acae637

--
nosy: +python-dev

___
Python tracker 

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



[issue25017] htmllib deprecated: Which library to use? Missing sane default in docs

2015-09-07 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue25017] htmllib deprecated: Which library to use? Missing sane default in docs

2015-09-07 Thread Ezio Melotti

Ezio Melotti added the comment:

If you want to create a patch, you have to edit the file 
Doc/library/htmllib.rst in the 2.7 branch.  You can find information about 
cloning the CPython repository and switching branch in the devguide.
The warning should suggest :mod:`HTMLParser` for Python 2 and the equivalent 
:mod:`html.parser` for Python 3.

--

___
Python tracker 

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



[issue25019] xmlparse_setattro() Type Confusion

2015-09-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your contribution John.

The committed patch slightly differs from the proposed patch. Error message now 
is the same as in setattr() and general __setattr__(). Tests are moved to 
existing test class for testing of attribute setting. Improved tests for valid 
attributes.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type: security -> crash
versions: +Python 3.6

___
Python tracker 

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



[issue25018] test_shutil.test_make_archive() fails on Windows 8.1

2015-09-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The build bot is green.

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

___
Python tracker 

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



[issue24272] PEP 484 docs

2015-09-07 Thread Larry Hastings

Larry Hastings added the comment:

Doc fixes are always welcome.  Barring mishaps I should tag 3.5.0 final on 
Saturday; it'd be sweet if you could get me your diff no later than Friday 
night.

--

___
Python tracker 

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



[issue25012] pathlib should allow converting to absolute paths without resolving symlinks

2015-09-07 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Yes, this wasn't meant to be a public method really. I'm still on the fence as 
to whether we should expose something like this. What is your use case?

--
type: behavior -> enhancement
versions: +Python 3.6 -Python 3.4

___
Python tracker 

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



[issue24999] Segfault in test_re.test_sre_character_class_literals() when Python is compiled by ICC

2015-09-07 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I *think* shifting by an amount larger than the operand's width is undefined 
behaviour (at least LLVM clearly seems to think so, since it gives different 
results on x86 and ARM), so the compiler is probably allowed to do what it 
wants (even return 42).

--
nosy: +pitrou

___
Python tracker 

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



[issue25003] os.urandom() should call getrandom(2) not getentropy(2)

2015-09-07 Thread STINNER Victor

STINNER Victor added the comment:

Attached patch (for Python 3.4) removes code to use getentropy() in 
os.urandom().

--
keywords: +patch
Added file: http://bugs.python.org/file40397/remove_get_entropy.patch

___
Python tracker 

___
___
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

2015-09-07 Thread Mark Roseman

Mark Roseman added the comment:

If it's useful, I quickly threw together a routine that takes the HTML 
generated by Sphinx, and using html.parser, strips out the navigation stuff, 
and stuffs it into a Tk text widget, doing appropriate things with the subset 
of the formatting it uses (lists, headings, etc.).

If something like that seems appropriate to use, let me know and I can clean it 
up a bit and post it as a patch.

--

___
Python tracker 

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



[issue22241] strftime/strptime round trip fails even for UTC datetime object

2015-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ea1bfb64e898 by Victor Stinner in branch 'default':
Issue #22241: Fix a compiler waring
https://hg.python.org/cpython/rev/ea1bfb64e898

--

___
Python tracker 

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



[issue25011] Smarter rl complete: hide private and special names

2015-09-07 Thread R. David Murray

R. David Murray added the comment:

Sounds good to me, especially the __ part.

I don't actually use completions, though :)

--

___
Python tracker 

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



[issue8232] webbrowser.open incomplete on Windows

2015-09-07 Thread Brandon Milam

Brandon Milam added the comment:

Finally got it rebuilt after having trouble with visual studio for awhile. I've 
tested the new patch and it is still able to properly find both chrome and 
firefox and is able to differentiate between new window and new tab for those 
two browsers so it appears to still be working.

--

___
Python tracker 

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



[issue21505] cx_freeze multiprocessing bug

2015-09-07 Thread Davin Potts

Davin Potts added the comment:

Closing as there is no additional information forthcoming from the OP and per 
the prior comments, Torsten's suggestion seems as helpful as anything that can 
be offered without more info.

--
resolution:  -> out of date
status: pending -> closed

___
Python tracker 

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



[issue24475] The docs never define what a pool "task" is

2015-09-07 Thread Davin Potts

Changes by Davin Potts :


--
type:  -> enhancement

___
Python tracker 

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



[issue24484] multiprocessing cleanup occasionally throws exception

2015-09-07 Thread Davin Potts

Davin Potts added the comment:

The 'crash' type is reserved for core dump type situations; 'behavior' is more 
appropriate for the misbehavior your describe.

--
type: crash -> behavior

___
Python tracker 

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



[issue23992] multiprocessing: MapResult shouldn't fail fast upon exception

2015-09-07 Thread Davin Potts

Davin Potts added the comment:

@neologix: Budgeting time this week to have a proper look -- sorry I haven't 
gotten back to it sooner.

--

___
Python tracker 

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



[issue25012] pathlib should allow converting to absolute paths without resolving symlinks

2015-09-07 Thread David Barnett

David Barnett added the comment:

The idiom of
  pathlib.Path.cwd() / pathlib.Path('some/path')
isn't too bad of an approach if it could just be mentioned in the docs. I would 
intuitively expected something like
  pathlib.Path('some/path').resolve(follow_symlinks=False)

My use case was that I had an equality check like this failing:
  expected_path = pathlib.Path.cwd() / pathlib.Path('some/path')
  pathlib.Path('some/path') == expected_path
I suppose I should file that as a separate bug because semantically those paths 
are equal, but I was trying to work around it like
  pathlib.Path('some/path').resolve() == expected_path
which in my case still failed because some/path was a symlink.

Even if that's fixed, I would still expect to run into cases where I wanted to 
print specifically the relative or absolute path in informational messages and 
would not want to follow symlinks (e.g., in "Requested path X not found", the 
user would recognize the absolute path as the one they entered but not 
necessarily the symlink-resolved version).

--

___
Python tracker 

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



[issue25016] defaultdict's pop gives a KeyError

2015-09-07 Thread R. David Murray

R. David Murray added the comment:

It would not be sensible for pop to return the default value, since the point 
of pop is to *remove* a key from the dictionary (while returning the existing 
value), whereas the point defaultdict is to *add* key to the dictionary with 
the default value if you retrieve a non-existent key.  As Martin said, an 
important aspect of defaultdict is that *only* getattr has this default 
behavior; things like 'in' still work like a regular dictionary with a 
defaultdict.

--
nosy: +r.david.murray
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue24862] subprocess.Popen behaves incorrect when moved in process tree

2015-09-07 Thread R. David Murray

R. David Murray added the comment:

Not really.  Give GPS a couple more weeks to respond, and then maybe bring it 
up on python-dev.

--

___
Python tracker 

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



[issue25003] os.urandom() should call getrandom(2) not getentropy(2)

2015-09-07 Thread Guido van Rossum

Guido van Rossum added the comment:

I got several long private emails from Theo De Raadt about this issue. I think 
the gist of it all is that most likely (a) the app most likely shouldn't be 
calling os.urandom() that often, and (b) Solaris getentropy() is apparently 
stunningly slow. Theo also seems to imply that "entropy" as a concept is 
debunked, and OpenBSD getentropy() and getrandom() are essentially the same 
thing except that the former's interface is faster (because it doesn't use a 
FD). So it is also possible that using getentropy() instead of getrandom() was 
unnecessary; possibly the speed difference would be noticeable via Python. 
Perhaps the getentropy() check can explicitly rule out Solaris (either at the 
autoconf level or in the random.c source code) if you prefer to keep the 
getentropy() call on OpenBSD.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue25020] IDLE - centralize ui policies and small utilities

2015-09-07 Thread Mark Roseman

New submission from Mark Roseman:

Certain policy decisions should be in one place in the code (DRY). 

These could be based on preferences or environment (should we be using ttk?), 
which operating system we're using (what hand cursor looks best?) or even the 
version of the operating system we're running (do we need to include a 
sizegrip?), etc.

Similarly, there are some small utilities that should be available in many 
places (e.g. what events to bind to for context menu clicks, setting a dialog 
to modal appearance) that don't necessarily fit elsewhere.

I've attached ui.py which will be a starting place for these sorts of things.

--
components: IDLE
files: ui.py
messages: 250143
nosy: kbk, markroseman, roger.serwy, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE - centralize ui policies and small utilities
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file40398/ui.py

___
Python tracker 

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



[issue25014] Add contextlib.itercm()

2015-09-07 Thread Yury Selivanov

Yury Selivanov added the comment:

TBH, I don't like the idea.  It would take me some time to digest the code 
every time I see this.

> lines = chain.from_iterable(itercm(open(f)) for f in fnames)

This looks like an extremely rare use case.

--
nosy: +yselivanov

___
Python tracker 

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



[issue25014] Add contextlib.itercm()

2015-09-07 Thread Nick Coghlan

Nick Coghlan added the comment:

Having spent a few days pondering this after Ezio first mentioned the concept 
to me on IRC, I'm rejecting this on the basis of "not every 3 line function 
needs to be in the standard library".

The vast majority of iterable CM use cases are going to fall into one of the 
following two categories:

* deterministic cleanup is needed regardless of success or failure
* non-deterministic cleanup is acceptable regardless of success or failure

In the former case, you don't continue iteration after the with statement ends, 
in the latter, you don't need to use the context manager aspects at all.

Those cases which don't fall into that category would generally be better 
served by an appropriately named helper function that conveys the author's 
intent, rather than describing what the function does internally:

def chain_files(names):
for name in names:
with open(name) as f:
yield from f

def cat(fnames):
for line in chain_files(fnames):
print(line, end='')


The implementation of the helper function can then optionally be switched to a 
compositional approach without affecting the usage:

def itercm(cm):
with cm:
yield from cm

def iterfile(name):
return itercm(open(name))

def chain_files(names):
return chain.from_iterable(iterfile(name) for name in names)

For the more concrete use case of "iterate over several files in sequence", we 
have the fileinput module: https://docs.python.org/3/library/fileinput.html

That already opens and closes files as it goes, so chain_files() can actually 
be implemented as:

def chain_files(names):
with fileinput.input(names) as files:
return chain.from_iterable(files)

--
resolution:  -> rejected
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

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



[issue24982] shutil.make_archive doesn't archive empty directories

2015-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 705ec4145f06 by Serhiy Storchaka in branch '2.7':
Issue #24982: shutil.make_archive() with the "zip" format now adds entries
https://hg.python.org/cpython/rev/705ec4145f06

New changeset 19216f5f6ee0 by Serhiy Storchaka in branch '3.4':
Issue #24982: shutil.make_archive() with the "zip" format now adds entries
https://hg.python.org/cpython/rev/19216f5f6ee0

New changeset 142a5027ab3e by Serhiy Storchaka in branch '3.5':
Issue #24982: shutil.make_archive() with the "zip" format now adds entries
https://hg.python.org/cpython/rev/142a5027ab3e

New changeset 6907716e7ccb by Serhiy Storchaka in branch 'default':
Issue #24982: shutil.make_archive() with the "zip" format now adds entries
https://hg.python.org/cpython/rev/6907716e7ccb

--
nosy: +python-dev

___
Python tracker 

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



[issue24982] shutil.make_archive doesn't archive empty directories

2015-09-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
stage: patch review -> commit review

___
Python tracker 

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



[issue25011] Smarter rl complete: hide private and special names

2015-09-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is improved patch. The completion of empty prefix now returns the list of 
private names if there are no public names. The completion of empty prefix or 
prefix '_' now returns the list of dunder names if there are no non-dunder 
names. For example try "None.".

In addition attr_matches() no longer returns duplicated names.

--
Added file: http://bugs.python.org/file40399/rlcomplete_filter_private_2.patch

___
Python tracker 

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



[issue22460] idle editor: replace all in selection

2015-09-07 Thread Raymond Hettinger

Raymond Hettinger added the comment:

-0 on doing this.  The current Find/Replace works pretty well even for 
replacements within a block (though it takes a few clicks to apply them one at 
a time).   In general, IDLE aspires to be minimalist and favor rapid 
learnability over having more features and options

--
nosy: +rhettinger

___
Python tracker 

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



[issue25008] Deprecate smtpd

2015-09-07 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Unless there is a drop-in replacement, I don't think this should be deprecated 
or removed.  Our biggest problem in the Python world is getting organizations 
using Python 2 to switch to Python 3.  Deprecating modules that have been a 
part of the firmament for a long time works against that goal.  

Side note: a quick search shows that people are still writing SMTPD modules in 
other languages (i.e. Go now has one)

--

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2015-09-07 Thread Raymond Hettinger

Raymond Hettinger added the comment:

> Now that we've got asyncio in two releases (3.4 and 3.5) 
> we should start deprecating asyncore and asynchat.

If we care about making it easier for organizations to move from Python 2 to 
Python 3, we should develop a strong aversion to deprecating modules that have 
been around for a long time and aren't broken.

In addition, we should give weight and support to the numerous projects that 
are trying to have a code base the runs in both Python 2 and Python 3 (hence 
the astonishing success of the six module). 

Already my tooling for testing Python 3.6 is broken because some core dev 
aggressively removed functions from the inspect module that were deprecated in 
favor of using Signature objects.  That broke the popular Hypothesis testing 
tool which was carefully written to work for both Python 2 and Python 3.  In 
order to work again that tool will have to be modified to copy in the old code 
that was just taken out.

don't-leave-your-users-behind-ly yours ...

--
nosy: +rhettinger

___
Python tracker 

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



[issue25002] Deprecate asyncore/asynchat

2015-09-07 Thread Guido van Rossum

Guido van Rossum added the comment:

Then can we at least close any feature requests for asyncore/asynchat as 
wontfix? (And porting smtpd.py to asyncio is still a good idea.)

--

___
Python tracker 

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



[issue25021] product_setstate() Out-of-bounds Read

2015-09-07 Thread John Leitch

New submission from John Leitch:

Python 3.3, 3.4, and 3.5 suffer from a vulnerability caused by the behavior of 
the product_setstate() function. When called, the function loops over the state 
tuple provided and clamps each given index to a value within a range from 0 up 
to the max number of pools. Then, it loops over the pools and gets an item from 
the pool using the previously clamped index value.

However, for the upper bound, the clamping logic is using the number of pools 
and not the size of the individual pool, which can result in a call to 
PyTuple_GET_ITEM that uses an index outside of the bounds of the pool:

for (i=0; i n-1)
index = n-1;
lz->indices[i] = index;
}

result = PyTuple_New(n);
if (!result)
return NULL;
for (i=0; ipools, i);
PyObject *element = PyTuple_GET_ITEM(pool, lz->indices[i]);
Py_INCREF(element);
PyTuple_SET_ITEM(result, i, element);
}

The invalid result of the PyTyple_GET_ITEM() expression is then passed to 
Py_INCREF(), which performs a write operation that corrupts memory.

In some applications, it may be possible to exploit this behavior to corrupt 
sensitive information, crash, or achieve code execution. The out-of-bounds 
write can be observed by running the following script:

import itertools

p = itertools.product((0,),(0,))
p.__setstate__((0, 1))

Which, depending on the arrangement of memory, may produce an exception such as 
this:

0:000> g
(ea4.11a4): Access violation - code c005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=c962 ebx=059e8f80 ecx= edx= esi=004af564 edi=05392f78
eip=613211eb esp=004af4d0 ebp=004af4f8 iopl=0 nv up ei pl nz na po nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b efl=00010202
python35_d!product_setstate+0x13b:
613211eb 8b5108  mov edx,dword ptr [ecx+8] ds:002b:0008=
0:000> k1
ChildEBP RetAddr  
004af4f8 61553a22 python35_d!product_setstate+0x13b 
[c:\source\python-3.5.0b3\modules\itertoolsmodule.c @ 2266]

In some cases, EIP corruption may occur:

0:000> r
eax= ebx=03e0f790 ecx=6d2ad658 edx=0002 esi=03e0f790 edi=6d0dbb20
eip= esp=004cf6a0 ebp=004cf6ac iopl=0 nv up ei pl nz na po nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b efl=00010202
 ??  ???
0:000> k4
ChildEBP RetAddr
WARNING: Frame IP not in any known module. Following frames may be wrong.
004cf69c 6d08a390 0x0
004cf6ac 6d02b688 python35!PyIter_Next+0x10
004cf6c0 6d0dbb6e python35!chain_next+0x58
004cf6d0 6d0a021d python35!wrap_next+0x4e

To fix this issue, it is recommended that product_setstate() be updated to 
clamp indices within a range from 0 up to the size of the pool in the body of 
the result tuple building loop. A proposed patch is attached.

Credit: John Leitch (johnlei...@outlook.com), Bryce Darling 
(darlingbr...@gmail.com)

--
files: product_setstate_Type_Confusion.patch
keywords: patch
messages: 250152
nosy: JohnLeitch, brycedarling, rhettinger
priority: normal
severity: normal
status: open
title: product_setstate() Out-of-bounds Read
type: security
versions: Python 3.3, Python 3.4, Python 3.5
Added file: 
http://bugs.python.org/file40400/product_setstate_Type_Confusion.patch

___
Python tracker 

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



[issue25021] product_setstate() Out-of-bounds Read

2015-09-07 Thread John Leitch

Changes by John Leitch :


Added file: http://bugs.python.org/file40401/product_setstate_Type_Confusion.py

___
Python tracker 

___
___
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

2015-09-07 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Trying to produce .txt from .rst or .html was the original idea but the result 
in the upload help.txt is not terribly good. We decided that it is reasonable 
these days to depend on a browser being present and use the webbrowser module 
to display the html in a browser. Some effort has been put into getting decent 
looking html from rst. On windows, the .chm installed with Python can be used 
as a backup should the browser not work.  

The reason for not simply starting a browser on the online Idle page is that 
the online docs reflect the repository version of Idle, which may have features 
not in the released version.  So a 'frozen' doc is needed.  (Note that the .chm 
is already frozen.) 

The steps and issues I see.

1. Should there be a separate idlehelp target, as in Zach's v4 patch, or should 
copying the one file be part of building the html files.  The issue here is 
making sure that the idlelib/help.html is rebuilt at the time of release.  
Re-generating the html files is, I presume, part of the release process, 
whereas a separate step would have to somehow be added.

2. We already use webbrowser to start the online docs, I believe on all 
systems.  The code can be reused with a different target.

3. Is an exact copy ok, or should some nagivation be removed?  We need to try 
the file as is and see.

4. The html file should be added to .hgignore and not checked into the 
repository.

--

___
Python tracker 

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



[issue25010] minor typo in PCBuild readme.txt

2015-09-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7f4102a9818b by Zachary Ware in branch '3.4':
Issue #25010: Fix path for .pyd example project.
https://hg.python.org/cpython/rev/7f4102a9818b

New changeset 309c0331726b by Zachary Ware in branch '3.5':
Issue #25010: Merge with 3.4
https://hg.python.org/cpython/rev/309c0331726b

New changeset 3829f567d269 by Zachary Ware in branch 'default':
Closes #25010: Merge with 3.5
https://hg.python.org/cpython/rev/3829f567d269

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

___
Python tracker 

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



[issue25010] minor typo in PCBuild readme.txt

2015-09-07 Thread Zachary Ware

Zachary Ware added the comment:

Thanks for the report and patch!

Unfortunately, that example is so completely out of date we'd probably be 
better off to remove it, but we can at least point to the right path :)

--
nosy: +zach.ware
versions: +Python 3.4, Python 3.6

___
Python tracker 

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



[issue25022] Remove PC/example_nt/

2015-09-07 Thread Zachary Ware

New submission from Zachary Ware:

The instructions and examples in PC/example_nt/ are hopelessly outdated (the 
readme says "It has been tested with VC++ 7.1 on Python 2.4" on default!).  Is 
there any reason to keep and update the example, or can we just drop it?

--
assignee: docs@python
components: Documentation, Windows
messages: 250156
nosy: docs@python, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Remove PC/example_nt/
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue25021] product_setstate() Out-of-bounds Read

2015-09-07 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger

___
Python tracker 

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



[issue25021] product_setstate() Out-of-bounds Read

2015-09-07 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
nosy: +kristjan.jonsson

___
Python tracker 

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



[issue25023] time.strftime('%a'), ValueError: embedded null byte, in ko locale

2015-09-07 Thread grizlupo

New submission from grizlupo:

>>> locale.setlocale(locale.LC_ALL, 'en')
'en'
>>> time.strftime('%a')
'Tue'
>>> locale.setlocale(locale.LC_ALL, 'ko')
'ko'
>>> time.strftime('%a')
Traceback (most recent call last):
  File "", line 1, in 
ValueError: embedded null byte
>>>

--
components: Unicode
messages: 250157
nosy: ezio.melotti, haypo, sy LEE
priority: normal
severity: normal
status: open
title: time.strftime('%a'), ValueError: embedded null byte, in ko locale
type: crash
versions: Python 3.5

___
Python tracker 

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



  1   2   >