[issue23175] logging.exception doesn't accept custom exc_info

2015-01-06 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue23174] shelve.open fails with error "anydbm.error: db type could not be determined"

2015-01-06 Thread R. David Murray

R. David Murray added the comment:

The problem is that this is not the only situation in which that error can be 
generated.  If someone passed in an "old" (and possibly non-empty) file with no 
extension, the same code path would get executed.

The shelve/anydbm API is database agnostic, so there is no way to know a-priori 
what the valid extensions are.  The whichdbm module (which anydbm uses) could 
provide this information in theory, but it doesn't currently, and if it did 
that would be a new API.

Your problem is that the shelve API is designed so that you either pass it the 
base name of an existing database, *or* you pass it the base name of a *non* 
existent database, which it then creates all the right files for (there may be 
more than one file).  The fact that you are passing it a new existing file is 
the problem, and I'm not sure the error message can be effectively improved to 
handle that particular mistaken use of the API without breaking the message for 
the places it is more meaningful.

The best I can think of is to add the filename to the error message and list 
all the extensions and (if there are any) the 'magic' type guesses that 
whichdbm tried, but as I said that would be a new feature and thus could only 
go into 3.5.

--

___
Python tracker 

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



[issue23171] csv.writer.writerow() does not accept generator (must be coerced to list)

2015-01-06 Thread R. David Murray

R. David Murray added the comment:

Hmm.  That could be an issue.  If someone passes a generator they will 
generally expect it to be consumed as a generator, not turned into a list 
implicitly.  So it may be better to turn this into a doc bug and require the 
explicit "list" call :(.

--

___
Python tracker 

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



[issue23171] csv.writer.writerow() does not accept generator (must be coerced to list)

2015-01-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The docs mention that "row" should be a sequence, so there is no a bug.

Here is a patch which makes writerow() accept an iterable without converting it 
to a list. It also adds tests for few corner cases and fixes the docs.

--
nosy: +serhiy.storchaka
stage: needs patch -> patch review
Added file: http://bugs.python.org/file37612/csv_writerow_iterable.patch

___
Python tracker 

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



[issue23132] Faster total_ordering

2015-01-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

May be implement your idea about local NotImplemented? And it would be good to 
add explaining comments in _le_from_lt() and _ge_from_gt() as in your original 
suggestion.

--

___
Python tracker 

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



[issue23174] shelve.open fails with error "anydbm.error: db type could not be determined"

2015-01-06 Thread Karl Richter

Karl Richter added the comment:

That's nice, thanks. Considering your last comment, some points

  * If the issue can't go into the error message, than the essence of the 
discussion here should go into the docs (in 0.5 to 1.5 sentences).
  * It'd be nice if it was clear from the error message that shelve or 
underlying modules check the extension in filename, i.e. do `anydbm.error: db 
type could not be determined by file extension '%s' in filename '%s'` rather 
than `anydbm.error: db type could not be determined`.

--

___
Python tracker 

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



[issue21741] Convert most of the test suite to using unittest.main()

2015-01-06 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag

___
Python tracker 

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



[issue23140] InvalidStateError on asyncio subprocess task cancelled

2015-01-06 Thread Xavier de Gaye

Xavier de Gaye added the comment:

> Thanks Xavier for the bug report, it should now be fixed.

Works fine with me. Thanks for the patch.

--

___
Python tracker 

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



[issue19776] Provide expanduser() on Path objects

2015-01-06 Thread STINNER Victor

STINNER Victor added the comment:

The test fails on the buildbot "PPC64 AIX 3.x". It looks like the home 
directory of the buildbot slave user is /home/shager/.

http://buildbot.python.org/all/builders/PPC64%20AIX%203.x/builds/2994/steps/test/logs/stdio

==
FAIL: test_expanduser (test.test_pathlib.PosixPathTest)
--
Traceback (most recent call last):
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_pathlib.py",
 line 2002, in test_expanduser
self.assertEqual(p3.expanduser(), P(otherhome) / 'Documents')
AssertionError: PosixPath('/Documents') != PosixPath('Documents')

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

___
Python tracker 

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



[issue23177] test_ssl: failures on OpenBSD with LibreSSL

2015-01-06 Thread STINNER Victor

New submission from STINNER Victor:

(See also the issue #21356.)

http://buildbot.python.org/all/builders/x86%20OpenBSD%205.5%203.x/builds/1242/steps/test/logs/stdio

==
FAIL: test_options (test.test_ssl.ContextTests)
--
Traceback (most recent call last):
  File "/home/python-builds/3.x.borja-openbsd-x86/build/Lib/test/test_ssl.py", 
line 764, in test_options
ctx.options)
AssertionError: -2130705409 != -2097150977

==
FAIL: test_openssl_version (test.test_ssl.BasicSocketTests)
--
Traceback (most recent call last):
  File "/home/python-builds/3.x.borja-openbsd-x86/build/Lib/test/test_ssl.py", 
line 315, in test_openssl_version
(s, t))
AssertionError: False is not true : ('LibreSSL 2.1', (2, 0, 0, 0, 0))

--
components: Tests
messages: 233514
nosy: haypo, rpointel
priority: normal
severity: normal
status: open
title: test_ssl: failures on OpenBSD with LibreSSL
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



[issue23151] _loggerClass is initialized twice

2015-01-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8bfe230db0bc by Vinay Sajip in branch 'default':
Closes #23151: Removed unnecessary initialization.
https://hg.python.org/cpython/rev/8bfe230db0bc

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



[issue19776] Provide expanduser() on Path objects

2015-01-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I don't really know how to investigate that failure. Perhaps David wants to 
look into it?

--
nosy: +David.Edelsohn

___
Python tracker 

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



[issue23175] logging.exception doesn't accept custom exc_info

2015-01-06 Thread Vinay Sajip

Vinay Sajip added the comment:

2.7 documentation has now been updated. The behaviour has already been changed 
for Python 3.5 to forward any exc_info passed in (see Issue #20537).

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

___
Python tracker 

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



[issue19776] Provide expanduser() on Path objects

2015-01-06 Thread STINNER Victor

STINNER Victor added the comment:

> I don't really know how to investigate that failure.

I don't think that it's specific to AIX, it just depends on the list of users 
on your system. On my Fedora 21, I have many users which have an empty home 
directory:

- nobody
- dbus
- polkitd
- usbmuxd
- nm-openconnect
- tcpdump
- qemu
- radvd
- systemd-journal-gateway
- systemd-timesync
- systemd-network
- systemd-resolve
- systemd-bus-proxy

If the test pick one of this user instead of a user with a non-empty home 
directory, the test fails with the same error. I propose a simple patch: 
test_pathlib_empty_homedir.patch

--
Added file: http://bugs.python.org/file37613/test_pathlib_empty_homedir.patch

___
Python tracker 

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



[issue23177] test_ssl: failures on OpenBSD with LibreSSL

2015-01-06 Thread STINNER Victor

STINNER Victor added the comment:

changeset:   94041:87976d72fd5c
user:Victor Stinner 
date:Tue Jan 06 11:51:06 2015 +0100
files:   Lib/test/test_ssl.py
description:
test_ssl: add more debug to investigate test_openssl_version() failure on
OpenBSD with LibreSSL.

--

___
Python tracker 

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



[issue21980] Implement `logging.LogRecord.__repr__`

2015-01-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 390ffd39631b by Vinay Sajip in branch 'default':
Closes #21980: Added a __repr__ for LogRecord.
https://hg.python.org/cpython/rev/390ffd39631b

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



[issue22935] Disabling SSLv3 support

2015-01-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a8c4925e2359 by Victor Stinner in branch '3.4':
Issue #20896, #22935: The ssl.get_server_certificate() function now uses the
https://hg.python.org/cpython/rev/a8c4925e2359

--

___
Python tracker 

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



[issue20896] test_ssl.test_get_server_certificate() should use PROTOCOL_SSLv23, not PROTOCOL_SSLv3

2015-01-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a8c4925e2359 by Victor Stinner in branch '3.4':
Issue #20896, #22935: The ssl.get_server_certificate() function now uses the
https://hg.python.org/cpython/rev/a8c4925e2359

--

___
Python tracker 

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



[issue22935] Disabling SSLv3 support

2015-01-06 Thread STINNER Victor

STINNER Victor added the comment:

Ok, I commited my change to Python 3.4. I'm now waiting for the following 
buildbot before closing the issue:
http://buildbot.python.org/all/builders/x86%20Tiger%203.4

--

___
Python tracker 

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



[issue20284] patch to implement PEP 461 (%-interpolation for bytes)

2015-01-06 Thread Nick Coghlan

Nick Coghlan added the comment:

With the first alpha next month, unless we hear otherwise from Ethan in the 
next day or two, I'd suggest going ahead with the implementation. We can always 
tweak it during the alpha cycle if there are specific details he'd like to see 
changed.

--

___
Python tracker 

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



[issue23168] test_file2k.py depends on sys.stdin being unseekable

2015-01-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7f30206d402f by Victor Stinner in branch '2.7':
Issue #23168: skip sys.stdin.seek() test if stdin is not a TTY
https://hg.python.org/cpython/rev/7f30206d402f

--
nosy: +python-dev

___
Python tracker 

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



[issue23168] test_file2k.py depends on sys.stdin being unseekable

2015-01-06 Thread STINNER Victor

STINNER Victor added the comment:

Instead of removing the test, I modified it to be skipped if stdin is not a TTY.

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

___
Python tracker 

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



[issue14853] test_file.py depends on sys.stdin being unseekable

2015-01-06 Thread STINNER Victor

STINNER Victor added the comment:

The same issue was reported for test_file2k: issue #23168.

I modified test_file2k to skip sys.stdin.seek() test if stdin is not a TTY. I 
prefer to skip a test in a specific case, instead of removing it completly.

I propose to add again the test in test_file, with the skip. See 
test_file.patch for Python 2.7 (I will addapt it to Python 3 if the patch is 
accepted for Python 2).

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

___
Python tracker 

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



[issue14853] test_file.py depends on sys.stdin being unseekable

2015-01-06 Thread STINNER Victor

Changes by STINNER Victor :


Added file: http://bugs.python.org/file37614/test_file.patch

___
Python tracker 

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



[issue19777] Provide a home() classmethod on Path objects

2015-01-06 Thread STINNER Victor

STINNER Victor added the comment:

I agree that Path.home() is more user friendly than Path.expanduser('~').

--
nosy: +haypo

___
Python tracker 

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



[issue1687125] cannot catch KeyboardInterrupt when using curses getkey()

2015-01-06 Thread STINNER Victor

STINNER Victor added the comment:

I cannot reproduce it on Python 2.7.9+. I get the following output which is the 
expected output:
---
-1
CTRL-C
---

Since this bug is 8 years old. I guess that the bug was already fixed, or maybe 
it can only be reproduced on a specific platform. But the platform or the 
specific conditions to reproduce the issue were not described. I close this 
issue.

--
nosy: +haypo
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue3180] Interrupts are lost during readline PyOS_InputHook processing

2015-01-06 Thread STINNER Victor

STINNER Victor added the comment:

I don't understand how to reproduce the issue, there is no unit test nor a 
description how to reproduce the issue.

I'm not aware of a bug where CTRL+c is simply ignored. CTRL+c is now well 
handled in Python 2.7, on Linux and Windows at least.

Since the bug is now 7 years old, I just close it as out of date, sorry.

--
nosy: +haypo
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue1103213] Adding the missing socket.recvall() method

2015-01-06 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue23010] "unclosed file" warning when defining unused logging FileHandler in dictConfig

2015-01-06 Thread Vinay Sajip

Vinay Sajip added the comment:

Data point: if you print out _handlerList immediately after the dictConfig() 
call, it *is* there, as I would have expected. The following script saved as 
logtest6.py:

from datetime import datetime
from time import sleep
import sys

if __name__ == '__main__':
LOGGING = {
'version': 1,
'handlers': {
'logfile': {
'level': 'DEBUG',
'class': 'logging.FileHandler',
'filename': '/tmp/debug.log',
},
},
}

print('%s: starting' % (datetime.now(),))
from logging.config import dictConfig
dictConfig(LOGGING)
from logging import _handlerList
   
print('%s: after dictconfig' % (datetime.now(),))
sys.stdout.flush()
print('_handlerList 1:', _handlerList)
# using importlib on a new file triggers the warnings
import importlib, shutil, os
print('_handlerList 2:', _handlerList)
shutil.copy(__file__, __file__ + '.new')
os.unlink(__file__)
os.rename(__file__ + '.new', __file__)
importlib.import_module('logtest6')
sys.stderr.flush()

print('%s: after error' % (datetime.now(),))
sys.stdout.flush()

sleep(5)
print('%s: after sleep' % (datetime.now(),))

# Vinay Sajip wrote:
# > The handlers are AFAIK referenced - if you peek at
# logging._handlerList or logging._handlers you should see them in
# there.
from logging import _handlerList, _handlers
print('_handlerList 3:', _handlerList)
else:
print('imported once')

When run, yields

$ python3.4 logtest6.py 
2015-01-06 12:26:46.910634: starting
2015-01-06 12:26:47.290223: after dictconfig
_handlerList 1: []
/home/vinay/projects/python/3.4/Lib/collections/__init__.py:373: 
ResourceWarning: unclosed file <_io.FileIO name='/tmp/debug.log' mode='ab'>
  exec(class_definition, namespace)
_handlerList 2: []
imported once
2015-01-06 12:26:47.388877: after error
2015-01-06 12:26:52.394514: after sleep
_handlerList 3: []

--

___
Python tracker 

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



[issue22391] MSILIB truncates last character in summary information stream

2015-01-06 Thread Idoa

Idoa added the comment:

Encountered this issue also in python 2.7.7.

last character is replaced with \x00. reproduction is exactly as stated by 
Kevin.Phillips

--
nosy: +Idoa

___
Python tracker 

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



[issue22935] Disabling SSLv3 support

2015-01-06 Thread STINNER Victor

STINNER Victor added the comment:

> I'm now waiting for the following buildbot before closing the issue:
> http://buildbot.python.org/all/builders/x86%20Tiger%203.4

Before my change, test_ssl because with "NameError: name 'PROTOCOL_SSLv3' is 
not defined". With my change, test_ssl now pass. I close the issue.

Python 2.7, 3.4 and 3.5 all now have the same behaviour.

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

___
Python tracker 

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



[issue23177] test_ssl: failures on OpenBSD with LibreSSL

2015-01-06 Thread STINNER Victor

STINNER Victor added the comment:

It looks like OPENSSL_VERSION_NUMBER is consistent with OPENSSL_VERSION_INFO 
(version 2.1). But the OPENSSL_VERSION contains a different version (2.0). It 
looks like an issue in LibreSSL.

==
FAIL: test_openssl_version (test.test_ssl.BasicSocketTests)
--
Traceback (most recent call last):
  File "/home/python-builds/3.x.borja-openbsd-x86/build/Lib/test/test_ssl.py", 
line 315, in test_openssl_version
(s, t, hex(n)))
AssertionError: False is not true : ('LibreSSL 2.1', (2, 0, 0, 0, 0), 
'0x2000')

--

___
Python tracker 

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



[issue21356] Support LibreSSL (instead of OpenSSL): make RAND_egd optional

2015-01-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset eddcb6671a48 by Victor Stinner in branch '2.7':
Issue #21356: Make ssl.RAND_egd() optional to support LibreSSL. The
https://hg.python.org/cpython/rev/eddcb6671a48

New changeset 7f82f50fdad0 by Victor Stinner in branch '3.4':
Issue #21356: Make ssl.RAND_egd() optional to support LibreSSL. The
https://hg.python.org/cpython/rev/7f82f50fdad0

--

___
Python tracker 

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



[issue21356] Support LibreSSL (instead of OpenSSL): make RAND_egd optional

2015-01-06 Thread STINNER Victor

STINNER Victor added the comment:

Ok, Python 2.7, 3.4 and 3.5 can now be *compiled* with LibreSSL.

There are still issues with LibreSSL: see the new issue #23177.

--

___
Python tracker 

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




[issue23177] test_ssl: failures on OpenBSD with LibreSSL

2015-01-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 05d7550bd2d9 by Victor Stinner in branch 'default':
Issue #23177: Document that ssl.RAND_egd() is not available with LibreSSL
https://hg.python.org/cpython/rev/05d7550bd2d9

--
nosy: +python-dev

___
Python tracker 

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



[issue21356] Support LibreSSL (instead of OpenSSL): make RAND_egd optional

2015-01-06 Thread STINNER Victor

Changes by STINNER Victor :


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

___
Python tracker 

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



[issue22638] ssl module: the SSLv3 protocol is vulnerable ("POODLE" attack)

2015-01-06 Thread STINNER Victor

STINNER Victor added the comment:

Can we close this issue?

--

___
Python tracker 

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



[issue23145] regrtest: log test loader errors

2015-01-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1bb3df5bb83f by Victor Stinner in branch 'default':
Issue #23145: regrtest now shows errors and raises an exception if
https://hg.python.org/cpython/rev/1bb3df5bb83f

--
nosy: +python-dev

___
Python tracker 

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



[issue23145] regrtest: log test loader errors

2015-01-06 Thread STINNER Victor

STINNER Victor added the comment:

I chose to show errors and then raise an exception.

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

___
Python tracker 

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



[issue22619] Possible implementation of negative limit for traceback functions

2015-01-06 Thread Dmitry Kazakov

Dmitry Kazakov added the comment:

Some of the patches (including the latest one) were missing Mercurial header. 
I'm uploading the properly formatted patch (traceback_rev_fixed.diff)

--
Added file: http://bugs.python.org/file37615/traceback_rev_fixed.diff

___
Python tracker 

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



[issue22638] ssl module: the SSLv3 protocol is vulnerable ("POODLE" attack)

2015-01-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I think so, thank you.

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



[issue19548] 'codecs' module docs improvements

2015-01-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0646eee8296a by Nick Coghlan in branch '3.4':
Issue 19548: update codecs module documentation
https://hg.python.org/cpython/rev/0646eee8296a

New changeset 4d00d0109147 by Nick Coghlan in branch 'default':
Merge issue 19548 changes from 3.4
https://hg.python.org/cpython/rev/4d00d0109147

--
nosy: +python-dev

___
Python tracker 

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



[issue19548] 'codecs' module docs improvements

2015-01-06 Thread Nick Coghlan

Nick Coghlan added the comment:

Thanks for the work on this folks, both Jan for the feedback, Martin for the 
writing, and everyone else for their comments.

I don't believe we addressed all of Jan's comments, but I'd like to request 
that any further comments be filed as separate issues, now that the larger 
restructure of the content is out of the way.

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



[issue22935] Disabling SSLv3 support

2015-01-06 Thread Berker Peksag

Changes by Berker Peksag :


--
stage: needs patch -> resolved

___
Python tracker 

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



[issue22619] Possible implementation of negative limit for traceback functions

2015-01-06 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue20284] patch to implement PEP 461 (%-interpolation for bytes)

2015-01-06 Thread Ethan Furman

Ethan Furman added the comment:

Here is what I have so far:

  - complete tests for bytes and bytearry (bytearray currently commented out at 
line 71)
  - pep461 implemented for bytes

This is basically an adaptation of the 2.7 code for str, adjusted appropriately.

I was planning on having bytearray convert to bytes, then call the bytes code, 
then integrate the results back into the existing bytearray (for %=) or create 
and return a new bytearray (for %).

I can easily believe this is not the most efficient way to do it.  ;)

I should have the bytearray portion done, if not this weekend, then by the 
following weekend.

I have no objections if Victor wants to combine and optimize with the unicode 
implementation (and no need to wait for me to finish the bytearray portion).

--
Added file: http://bugs.python.org/file37616/issue20284.stoneleaf.01.patch

___
Python tracker 

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



[issue20284] patch to implement PEP 461 (%-interpolation for bytes)

2015-01-06 Thread STINNER Victor

STINNER Victor added the comment:

Ethan, do you have a public repository? If no, you can for example
fork CPython: click on "Server-side clone" at
https://hg.python.org/cpython/

--

___
Python tracker 

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



[issue23174] shelve.open fails with error "anydbm.error: db type could not be determined"

2015-01-06 Thread R. David Murray

R. David Murray added the comment:

What is it you want the docs to say?

For your second point, yes, that is what I was saying would be an enhancement 
(the extension is a list of possible extensions that varies per-platform and 
per how python is built/installed).

--

___
Python tracker 

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



[issue20284] patch to implement PEP 461 (%-interpolation for bytes)

2015-01-06 Thread Ethan Furman

Ethan Furman added the comment:

Sorry, no.  And time is scarce at the moment so figuring out server-side clones 
will have to wait as well.

I uploaded the patch of what I have so far -- hopefully that will be helpful.

Also attaching patch with just the tests.

--
Added file: 
http://bugs.python.org/file37617/issue20284.stoneleaf.tests_only.01.patch

___
Python tracker 

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



[issue23178] csv.reader does not handle BOM

2015-01-06 Thread Jon Dufresne

New submission from Jon Dufresne:

The following test script demonstrates that Python's csv library does not 
handle a BOM. I would expect the returned row to be equal to expected and to 
print 'True' to stdout.

In the wild, it is typical for other CSV writers to add a BOM. MS Excel is 
especially picky about the BOM when reading a utf-8 encoded file. So many 
writers add a BOM for interopability with MS Excel.

If a python program accepts a CSV file as input (often the case in web apps), 
these files will not be handled correctly without preprocessing. In my opinion, 
this should "just work" when reading the file.

---
import codecs
import csv

f = open('foo.csv', 'wb')
f.write(codecs.BOM_UTF8 + b'a,b,c')
f.close()

expected = ['a', 'b', 'c']
f = open('foo.csv')
r = csv.reader(f)
row = next(r)

print(row)
print(row == expected)
---

Output
---
$ ./python ~/test.py
['\ufeffa', 'b', 'c']
False
---

--
components: Library (Lib)
messages: 233549
nosy: jdufresne
priority: normal
severity: normal
status: open
title: csv.reader does not handle BOM
type: behavior
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



[issue23178] csv.reader does not handle BOM

2015-01-06 Thread R. David Murray

R. David Murray added the comment:

This is not a problem with the csv module in particular.  See issue 7651.

--
nosy: +r.david.murray
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Python3: guess text file charset using the BOM

___
Python tracker 

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



[issue22619] Possible implementation of negative limit for traceback functions

2015-01-06 Thread Terry J. Reedy

Terry J. Reedy added the comment:

For future reference, a better initial post would have been more self-contained 
and explanatory, something like the following.  (If I got the proposal wrong, 
all the more reason to explain it clearly).
---
Several functions in the traceback module take a *limit* argument to limit 
output to the first n 'stack trace entries'.  This issue proposes that negative 
limits should instead limit output to the last n entries. This idea was 
discussed on python ideas and approved by Guido there.
https://mail.python.org/pipermail/python-ideas/2014-October/029826.html.
---

Do the new tests pass with n=0?  If not, do the functions have a sensible 
behavior (print header and no entries, rather than raising) that could be 
tested?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue19548] 'codecs' module docs improvements

2015-01-06 Thread Martin Panter

Martin Panter added the comment:

Thanks Nick. Here is a small followup patch for the default (3.5) branch to 
keep things consistent.

--
Added file: http://bugs.python.org/file37618/default-branch-followup.patch

___
Python tracker 

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



[issue14099] ZipFile.open() should not reopen the underlying file

2015-01-06 Thread Matt Mackall

Matt Mackall added the comment:

The committed fix breaks Mercurial.

http://bz.selenic.com/show_bug.cgi?id=4492

The "underlying file-like object" in our case is a wsgirequest but anything 
else trying to serve a dynamically-generated zip file on the web will probably 
die. We wrapped wsgirequest to support tell() many years ago probably copying 
someone else's hack, and it's worked fine across Python 2.4-2.7, but we 
fundamentally can't support all the new seek()s that were added here.

--
nosy: +Matt.Mackall

___
Python tracker 

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



[issue17776] IDLE Internationalization

2015-01-06 Thread Al Sweigart

Changes by Al Sweigart :


--
nosy: +Al.Sweigart

___
Python tracker 

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



[issue17760] No i18n of IDLE's interface in french

2015-01-06 Thread Al Sweigart

Changes by Al Sweigart :


--
nosy: +Al.Sweigart

___
Python tracker 

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



[issue23179] New function proposal: string.from_iterable(iterable [, map_function])

2015-01-06 Thread Alessio Bogon

New submission from Alessio Bogon:

I would like to suggest a new string function/constructor: 
string.from_iterable(iterable [,map_function])

I think that the behaviour is intuitive: given an iterable, it construct a 
string using its element by apply a `map_function`, if provided, to each one of 
them. After that the str() constructor will be applied to each element in any 
way, to ensure that effectively an iterable of strings is used.

Of course I do not expect that you will accept this patch, but I think this 
really is a missing piece of the python library.

You can argue that I could just use
"".join(iterable)
but in my opinion there are two problems:
1) if any of the elements of `iterable` is not a `str` instance, it will fail 
miserably;
2) this is not very pythonic.

This issue is meant to be an idea for the python maintainers, so I did not 
write the corresponding `Doc/libary/string.rst` documentation, but if you are 
interested I could do it.

Thank you people for your amazing work.

--
components: Library (Lib)
files: string.from_iterable.patch
keywords: patch
messages: 233554
nosy: youtux
priority: normal
severity: normal
status: open
title: New function proposal: string.from_iterable(iterable [,map_function])
type: enhancement
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file37619/string.from_iterable.patch

___
Python tracker 

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



[issue23179] New function proposal: string.from_iterable(iterable [, map_function])

2015-01-06 Thread Ezio Melotti

Ezio Melotti added the comment:

You should propose this to the python-ideas mailing list.
FWIW, if this is accepted, I would use str as default map_function.

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue14099] ZipFile.open() should not reopen the underlying file

2015-01-06 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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

___
Python tracker 

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



[issue23179] New function proposal: string.from_iterable(iterable [, map_function])

2015-01-06 Thread R. David Murray

R. David Murray added the comment:

Thanks for wanting to contribute.  However, I don't see why this function would 
be beneficial.  As indicated by the patch, it is simply

  ''.join(str(map_function(x)) for x in iterable)

but without the inherent flexibility of the above formulation.  Which looks 
pretty Pythonic to my eyes :).

We often say "not every one line expression deserves to be a function."

But yes, python-ideas would be the appropriate forum to discuss such a thing.  
This issue can be reopened if you get consensus that it is a valuable addition.

--
nosy: +r.david.murray
resolution:  -> later
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



[issue23179] New function proposal: string.from_iterable(iterable [, map_function])

2015-01-06 Thread Josh Rosenberg

Josh Rosenberg added the comment:

I'll note: "".join(map(str, iterable)) will solve problem #1. It's fast, uses 
existing built-ins, and is relatively intuitive. I know map is sometimes 
considered Pythonic, but "".join(str(x) for x in iterable) is an equally 
effective, if somewhat slower, alternative that can't be called un-Pythonic.

I have no idea why you think "".join(iterable) is not Pythonic, it's *the* way 
to join strings into a single string. Fast, direct, simple. 
string.from_iterable seems like a silly way to do what 
"".join(map(INSERTFAVORITEFUNCTIONHERE, iterable)) does already, for no gain.

--
nosy: +josh.r

___
Python tracker 

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



[issue23160] Respect the environment variable SVNROOT in external-common.bat

2015-01-06 Thread Steve Dower

Steve Dower added the comment:

Don't have time to apply them right now, but the patches look fine. I guess 
it'll null-merge into default, since 3.5 is unaffected?

--

___
Python tracker 

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



[issue23179] New function proposal: string.from_iterable(iterable [, map_function])

2015-01-06 Thread Josh Rosenberg

Josh Rosenberg added the comment:

Correction:  I know map is sometimes considered *un-Pythonic

--

___
Python tracker 

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



[issue19548] 'codecs' module docs improvements

2015-01-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 20a5a56ce090 by Nick Coghlan in branch 'default':
Issue #19548: clean up merge issues in codecs docs
https://hg.python.org/cpython/rev/20a5a56ce090

--

___
Python tracker 

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



[issue22865] Allow pty.spawn to ignore data to copy

2015-01-06 Thread Geoff Shannon

Geoff Shannon added the comment:

I tweaked the patch a bit to not include the parentheses since that seems to be 
the style here.

--
Added file: http://bugs.python.org/file37620/pty.patch

___
Python tracker 

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



[issue19548] 'codecs' module docs improvements

2015-01-06 Thread Nick Coghlan

Nick Coghlan added the comment:

Thanks for the follow-up patch Martin - I missed those when I did the merge 
forward from 3.4.

--

___
Python tracker 

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



[issue13128] httplib debuglevel on CONNECT doesn't print response headers

2015-01-06 Thread Demian Brecht

Demian Brecht added the comment:

Just happened to come across this now. Updated patch with test.

--
Added file: http://bugs.python.org/file37621/issue13128_2.patch

___
Python tracker 

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



[issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface

2015-01-06 Thread Al Sweigart

Changes by Al Sweigart :


--
nosy: +Al.Sweigart

___
Python tracker 

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



[issue23086] Add start and stop parameters to the Sequence.index() ABC mixin method

2015-01-06 Thread Raymond Hettinger

Raymond Hettinger added the comment:

This test looks like it may have been a typo:

   self.assertEqual(seq.index('a'), 0, 1)

Also, it would be nice to investigate the differences with list.index() and 
str.index() for the corner cases.  Something along these lines:

# Compare Sequence.index() behavior to list.index() behavior

listseq = list('abracadabra')
seqseq = SequenceSubclass(listseq)
for start in range(-3, len(listseq) + 3):
for stop in range(-3, len(listseq) + 3):
for letter in set(listseq + ['z']):
try:
expected = listseq.index(letter, start, stop)
except ValueError:
with self.assertRaises(ValueError):
seqseq.index(letter, start, stop)
else:
actual = seqseq.index(letter, start, stop)
self.assertEqual(actual, expected, (letter, start, stop))

# Compare Sequence.index() behavior to str.index() behavior 

strseq = 'abracadabra'
seqseq = SequenceSubclass(strseq)
for start in range(-3, len(strseq) + 3):
for stop in range(-3, len(strseq) + 3):
for letter in set(strseq + 'z'):
try:
expected = strseq.index(letter, start, stop)
except ValueError:
with self.assertRaises(ValueError):
seqseq.index(letter, start, stop)
else:
actual = seqseq.index(letter, start, stop)
self.assertEqual(actual, expected, (letter, start, stop)

--

___
Python tracker 

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



[issue23156] Update tix install information in tkinter tix chapter of doc

2015-01-06 Thread Mike Basca

Mike Basca added the comment:

Hi,  

I'm the original poster in the stack-exchange link.  Based on your responses,  
It seems Ttk is the way to go if you're on Mac OSX 64-bit.

Thanks for your time and input.

Really appreciate it!

--
nosy: +abaskm

___
Python tracker 

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



[issue23180] Rename IDLE's "Windows" menu item to "Window"

2015-01-06 Thread Al Sweigart

New submission from Al Sweigart:

Currently IDLE's top-level menu item is "Windows" on Windows & Linux but is 
specifically changed to "Window" on OS X to match mac's look and feel. See 
https://hg.python.org/cpython/rev/1b3b6b1982aa

The singular "Window" is the standard menu name on all platforms, and "Windows" 
should never be used. Note: Photoshop, Blender, Visual Studio, IntelliJ, 
WinMerge, HxD, and Notepad++ on Windows use the "Window" name in their menus. I 
can't find any that use "Windows".

--
components: IDLE
files: patch.diff
keywords: patch
messages: 233566
nosy: Al.Sweigart
priority: normal
severity: normal
status: open
title: Rename IDLE's "Windows" menu item to "Window"
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file37622/patch.diff

___
Python tracker 

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



[issue23179] New function proposal: string.from_iterable(iterable [, map_function])

2015-01-06 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I concur with Josh and David.  We already have a way to do it and there doesn't 
seem to be anything here that would warrant further growth of the already large 
number of string methods.

--
nosy: +rhettinger
resolution: later -> rejected

___
Python tracker 

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