[issue11380] Improve reporting of broken stdout pipe during interpreter shutdown

2014-04-18 Thread Florent Xicluna

Changes by Florent Xicluna florent.xicl...@gmail.com:


--
nosy: +flox

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



[issue21295] Python 3.4 gives wrong col_offset for Call nodes returned from ast.parse

2014-04-18 Thread Aivar Annamaa

New submission from Aivar Annamaa:

Following program gives correct result in Python versions older than 3.4, but 
incorrect result in 3.4:

--
import ast
tree = ast.parse(sin(0.5))
first_stmt = tree.body[0]
call = first_stmt.value
print(col_offset of call expression:, call.col_offset)
print(col_offset of func of the call:, call.func.col_offset)
---

it should print:
col_offset of call expression: 0
col_offset of func of the call: 0

but in 3.4 it prints:
col_offset of call expression: 3
col_offset of func of the call: 0

--
components: Interpreter Core
files: py34_ast_call_bug.py
messages: 216777
nosy: Aivar.Annamaa
priority: normal
severity: normal
status: open
title: Python 3.4 gives wrong col_offset for Call nodes returned from ast.parse
versions: Python 3.4
Added file: http://bugs.python.org/file34962/py34_ast_call_bug.py

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



[issue21295] Python 3.4 gives wrong col_offset for Call nodes returned from ast.parse

2014-04-18 Thread Aivar Annamaa

Aivar Annamaa added the comment:

... also, lineno is wrong for both Call and call's func, when func and 
arguments are on different lines:

import ast
tree = ast.parse((sin\n(0.5)))
first_stmt = tree.body[0]
call = first_stmt.value
print(col_offset of call expression:, call.col_offset)
print(col_offset of func of the call:, call.func.col_offset)
print(lineno of call expression:, call.lineno)
print(lineno of func of the call:, call.lineno)

# lineno-s should be 1 for both call and func

--

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



[issue16806] col_offset is -1 and lineno is wrong for multiline string expressions

2014-04-18 Thread Aivar Annamaa

Changes by Aivar Annamaa aivar.anna...@gmail.com:


--
nosy: +Aivar.Annamaa

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



[issue21296] smtplib Sends Commands in Lower-Case

2014-04-18 Thread Luiji Maryo

New submission from Luiji Maryo:

It has occurred to me while testing an SMTP server with smtplib that it sends 
commands in lower-case. This is problematic because, although most SMTP servers 
seem to be case-insensitive, RFC 5321 (SMTP) doesn't seem to explicitly require 
this and there may be systems out there which require upper-case commands. 
Additionally, the output just looks unclean because the parameters are given 
capitalized (e.g. we get mail FROM:g...@example.com instead of MAIL 
FROM:g...@example.com or mail from:g...@example.com.

I would propose that putcmd() use cmd.upper(). Alternatively, all instances of 
putcmd() and docmd() could be updated to have the commands in capitalized form 
so that, should the user desire, they could send lower-case commands, though I 
don't quite see what would be useful about that.

--
messages: 216779
nosy: luiji
priority: normal
severity: normal
status: open
title: smtplib Sends Commands in Lower-Case
type: behavior
versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5

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



[issue21297] skipinitialspace in the csv module only skips spaces, not whitespace in general

2014-04-18 Thread Daniel Andersson

New submission from Daniel Andersson:

Regarding the `skipinitialspace` parameter to the different CSV reader dialects 
in the `csv` module, the official documentation asserts:

When True, whitespace immediately following the delimiter is ignored.

and the `help(csv)` style module documentation says:

* skipinitialspace - specifies how to interpret whitespace which
  immediately follows a delimiter.  It defaults to False, which
  means that whitespace immediately following a delimiter is part
  of the following field.

Whitespace is a bit too general in both cases (at least a red herring in the 
second case), since it only skips spaces and not e.g. tabs [1].

In `Modules/_csv.c`, it more correctly describes the parameter. At line 81:

int skipinitialspace;   /* ignore spaces following delimiter? */

and the actual implementation at line 638:

else if (c == ' '  dialect-skipinitialspace)
/* ignore space at start of field */
;

No-one will probably assume that the whole UTF-8 spectrum of whitespace is 
skipped, but at least I initially assumed that the tab character was included.

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

--
assignee: docs@python
components: Documentation, Library (Lib)
messages: 216780
nosy: Daniel.Andersson, docs@python
priority: normal
severity: normal
status: open
title: skipinitialspace in the csv module only skips spaces, not whitespace 
in general
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

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



[issue21298] Cheese shop registration stopped working for me recently

2014-04-18 Thread Thomas Levine

New submission from Thomas Levine:

This command used to work just fine for me. ::

python setup.py register

Now it doesn't. For example, ::

$ python3 setup.py register
/usr/lib/python3.3/distutils/dist.py:257: UserWarning: Unknown distribution 
option: 'install_requires'
  warnings.warn(msg)
/usr/lib/python3.3/distutils/dist.py:257: UserWarning: Unknown distribution 
option: 'tests_require'
  warnings.warn(msg)
running register
running check
Registering sheetmusic to http://pypi.python.org/pypi
Server response (401): Unauthorized

But I can submit just fine with the form at
https://pypi.python.org/pypi?%3Aaction=submit_form,
and the following works once I do that. ::

python setup.py sdist upload

The attached setup.py file is from this package
https://pypi.python.org/pypi/sheetmusic

--
components: Distutils
files: setup.py
messages: 216781
nosy: dstufft, eric.araujo, tlevine
priority: normal
severity: normal
status: open
title: Cheese shop registration stopped working for me recently
type: behavior
versions: Python 2.7, Python 3.4
Added file: http://bugs.python.org/file34963/setup.py

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



[issue21299] Einladung in mein Netzwerk bei LinkedIn

2014-04-18 Thread Bernie Keimel

New submission from Bernie Keimel:

LinkedIn


Ich möchte Sie zu meinem beruflichen Netzwerk auf LinkedIn hinzufügen.

- Bernard Keimel

Bernard Keimel
Business bei privat
Berlin und Umgebung, Deutschland

Bestätigen, dass Sie Bernard Keimel kennen:
https://www.linkedin.com/e/-3qcne3-hu5hbkmh-1s/isd/16078050493/NNc4mKPz/?hs=falsetok=0SvHBVq3J6v6c1

--
Sie erhalten Einladungen zum Netwerkbeitritt per E-Mail. Klicken Sie hier, wenn 
Sie kein Interesse daran haben:
http://www.linkedin.com/e/-3qcne3-hu5hbkmh-1s/z2oU7dKDzpt2G7xQz2FC2SclHmnUGzmsk0c/goo/report%40bugs%2Epython%2Eorg/20061/I6913898468_1/?hs=falsetok=35uA1JgJ56v6c1

(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct., Mountain View, CA 94043, USA

--
messages: 216782
nosy: Bernie.Keimel
priority: normal
severity: normal
status: open
title: Einladung in mein Netzwerk bei LinkedIn

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



[issue21299] Spam

2014-04-18 Thread Berker Peksag

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


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

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



[issue21299] Spam

2014-04-18 Thread Berker Peksag

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


--
nosy:  -Bernie.Keimel
resolution:  - not a bug
stage:  - committed/rejected
status: open - closed
title: Einladung in mein Netzwerk bei LinkedIn - Spam

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



[issue21300] Docs (incorrectly) suggest email.policy.default is the default policy

2014-04-18 Thread Merlijn van Deen

New submission from Merlijn van Deen:

Which would make sense, but email.policy.Compat32 is *actually* the default 
policy. This patch adapts the documentation to reflect this.

--
assignee: docs@python
components: Documentation
files: defaultpolicy.diff
keywords: patch
messages: 216783
nosy: docs@python, r.david.murray, valhallasw
priority: normal
severity: normal
status: open
title: Docs (incorrectly) suggest email.policy.default is the default policy
versions: Python 3.3, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file34964/defaultpolicy.diff

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



[issue21290] imaplib.error when importing email package

2014-04-18 Thread Aaron Briel

Aaron Briel added the comment:

I had a rouge compiled python file named email.pyc.  My apologies.

--

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



[issue21292] C API in debug fails

2014-04-18 Thread Steve

Steve added the comment:

It is under windows

--

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



[issue21292] C API in debug fails

2014-04-18 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +loewis

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



[issue21292] C API in debug fails

2014-04-18 Thread Steve

Steve added the comment:

A bit more info:
- When building in debug you need the Pythonxx_d.lib.
- This lib does not come with the normal install (or any other install).  That 
part is fine and normal (you don't include debug libs with install).
- To get that lib you have to build Python in debug to get it.  This is too 
much, I should not have to rebuild a library just because I want to build MY 
application in debug.
- Copying the Pythonxx.lib file to Pythonxx_d.lib works for many basic 
functions, but for others, it is missing necessary defiitions (i.e. linking 
fails).

--

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



[issue21277] don't try to link _ctypes with a ffi_convenience library

2014-04-18 Thread Thomas Wouters

Thomas Wouters added the comment:

I don't understand the story with ffi_convenience here. Perhaps someone else on 
python-dev remembers what it was for and whether we need it for any platforms, 
still?

--

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



[issue21289] make.bat not building documentation

2014-04-18 Thread Zachary Ware

Zachary Ware added the comment:

Your more recent patch looks like it's missing the changes to Doc/make.bat, 
which I assume was unintentional :).  Also, thinking about it again, it would 
be good to use a %SPHINXBUILD% variable rather than hard-coding sphinx-build 
into the script, the same way %PYTHON% is used currently.

--

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



[issue13475] Add '-p'/'--path0' command line option to override sys.path[0] initialisation

2014-04-18 Thread Matthew Woodcraft

Matthew Woodcraft added the comment:

For the record: the '-I' option (#16499) in Python 3.4 disables sys.path[0] 
initialisation (among other things).

--

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



[issue21068] Make ssl.PROTOCOL_* an enum

2014-04-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f776771ab0ee by Antoine Pitrou in branch 'default':
Issue #21068: The ssl.PROTOCOL* constants are now enum members.
http://hg.python.org/cpython/rev/f776771ab0ee

--
nosy: +python-dev

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



[issue21068] Make ssl.PROTOCOL_* an enum

2014-04-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ok, since this is a low-risk change I've made it anyway.

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

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



[issue20421] expose SSL socket protocol version

2014-04-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ok, it came to me that converting to one of the PROTOCOL* constants can fail in 
the following case: Python is linked with an OpenSSL that supports a more 
recent protocol version than the ssl module is aware of. SSL_get_version() can 
then return a protocol (e.g. TLSv1.3) that we don't know about, and have no 
way of converting to an existing constant.

So perhaps we should really simply return the same string as OpenSSL?

--

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



[issue20421] expose SSL socket protocol version

2014-04-18 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

Debatable. Maybe I'm +0.1 for returning the plain string. IMO when it comes to 
stdlib modules, enums are only really useful for converting integer constants.

--

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



[issue21207] urandom persistent fd - not re-openned after fd close

2014-04-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Here is a proposed patch (with tests).

--
keywords: +patch
stage:  - patch review
Added file: http://bugs.python.org/file34965/urandom_fd_reopen.patch

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



[issue21207] urandom persistent fd - not re-openned after fd close

2014-04-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Hmm, the patch doesn't release the GIL around the fstat() calls, I wonder if 
that's necessary.

--

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



[issue21301] pathlib missing Path.expandvars(env=os.environ)

2014-04-18 Thread Alain Mellan

New submission from Alain Mellan:

A lot of times paths are manipulated with environment variables that may even 
be expanded multiple times in a loop. For example, I have a path defined as 
$RUNDIR/logfile.txt and expanding the path for a bunch of different RUNDIRs 
in a loop.

By default, it should take os.environ and optionally a different dictionary.

Just like os.path.expandvars(), it should expand $VAR, ${VAR} and %VAR%

--
components: Library (Lib)
messages: 216796
nosy: Alain.Mellan
priority: normal
severity: normal
status: open
title: pathlib missing Path.expandvars(env=os.environ)
type: enhancement

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



[issue21301] pathlib missing Path.expandvars(env=os.environ)

2014-04-18 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +pitrou
versions: +Python 3.5

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



[issue21204] multiprocessing example does not work on Windows

2014-04-18 Thread Terry J. Reedy

Terry J. Reedy added the comment:

When quoting from the docs, it is helpful to give a link.
https://docs.python.org/2/library/multiprocessing.html#examples
That also identifies the version.

I verified that the example fails on my 2.7.6 Windows 7 with
PicklingError: Can't pickle type 'thread.lock': it's not found as thread.lock 

Since the example has been removed for 3.x, a possible minimal fix would be to 
say that it does not work on Windows and remove the statement that implies that 
it does.
  if sys.platform == 'win32': import multiprocessing.reduction
  # make sockets pickable/inheritable

--
nosy: +terry.reedy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21204
___
___
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

2014-04-18 Thread Fletcher Tomalty

Fletcher Tomalty added the comment:

+1

It's very annoying to have to import expand user from os.path, when pathlib 
should be a full replacement for that module. Thanks to those working on this!

--
nosy: +fletom

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



[issue21302] time.sleep (floatsleep()) should use clock_nanosleep() on Linux

2014-04-18 Thread Shankar Unni

New submission from Shankar Unni:

I know that an earlier request to use nanosleep() has been rejected as 
wontfix, but I'm filing this one for a different reason.

Today, timemodule.c:floatsleep() calls select() on platforms that support it. 
On Linux, select() with a timeout has an unfortunate property that it is very 
sensitive to clock jumps, because it computes a sleep end time based on the 
current kernel timestamp.

If the system clock is yanked back (by ntpd, or other processes), then the 
process can end up sleeping for a very long time. (E.g. if the clock is yanked 
back by half an hour while we are in the middle of, say, a sleep(10), then the 
process will sleep until original_kernel_clock+10, which will turn into a 
half-hour sleep.

Yes, systems shouldn't jerk their clocks around, but we can't often control 
this sort of thing on end-user environments.

Using clock_nanosleep(CLOCK_MONOTONIC, 0, timespec, NULL) makes the sleep a 
much more reliable thing, and mostly insensitive to such jumps. (It'll still be 
affected by any adjtime(), but that's OK in this case).

--
components: Library (Lib)
messages: 216799
nosy: shankarunni
priority: normal
severity: normal
status: open
title: time.sleep (floatsleep()) should use clock_nanosleep() on Linux
type: behavior

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



[issue21295] Python 3.4 gives wrong col_offset for Call nodes returned from ast.parse

2014-04-18 Thread Florent Xicluna

Changes by Florent Xicluna florent.xicl...@gmail.com:


--
keywords: +3.4regression
nosy: +flox
type:  - behavior

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



[issue21303] Python 2.7 Spinbox Format Behaves Differently On Windows Versus Linux

2014-04-18 Thread Michael Boldischar

New submission from Michael Boldischar:

Here is my code:

   self._image_set_number = Spinbox(self._ramp_group, from_=0, to=999, 
command=self.reset_rep, format=%03.0f)
   self._repetition_change = Spinbox(self._ramp_group, from_=00, to=99, 
format=%02.0f)

On Linux, the spinners behave as expected. There are always three digits in 
_image_set_number and two digits in _repetition_change. The values are 
padded on the left by zeros. When I use the small arrows to increase the value, 
it works as expected.

But, on Windows 7 64-bit, the small arrows do not behave as expected. They go 
up to 008 and then go back to 000 on the next click. Am I missing something 
or is this a bug in the the Windows version of Tkinter?

--
messages: 216800
nosy: mboldisc
priority: normal
severity: normal
status: open
title: Python 2.7 Spinbox Format Behaves Differently On Windows Versus Linux

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



[issue21303] Python 2.7 Spinbox Format Behaves Differently On Windows Versus Linux

2014-04-18 Thread Michael Boldischar

Changes by Michael Boldischar bold0...@umn.edu:


--
components: +Tkinter
versions: +Python 2.7

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



[issue21303] Python 2.7 Spinbox Format Behaves Differently On Windows Versus Linux

2014-04-18 Thread Michael Boldischar

Changes by Michael Boldischar bold0...@umn.edu:


--
type:  - behavior

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



[issue21303] Python 2.7 Spinbox Format Behaves Differently On Windows Versus Linux

2014-04-18 Thread Zachary Ware

Zachary Ware added the comment:

Can you tell us some version numbers, please?  Specifically, which micro 
version of Python 2.7 (e.g. 2.7.6) on both platforms, and what version of Tcl 
on Linux?  Tcl on Windows should be version 8.5.2; if it's different, please 
tell us that too.  Here's the easiest way to get the Tcl version:

 import Tkinter
 root = Tkinter.Tcl()
 root.tk.eval('info patchlevel')
'8.5.2'

--
nosy: +gpolo, serhiy.storchaka, zach.ware

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



[issue21289] make.bat not building documentation

2014-04-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 02fec733f760 by Zachary Ware in branch '3.4':
Issue #21289: Fix documentation building on Windows using Doc/make.bat.
http://hg.python.org/cpython/rev/02fec733f760

--
nosy: +python-dev

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



[issue21289] make.bat not building documentation

2014-04-18 Thread Zachary Ware

Zachary Ware added the comment:

Fixed, thanks for the patch!  I went ahead and implemented my comments and 
committed it.

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

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



[issue21232] Use of '1' instead of 'True' as 'splitlines' argument in difflib documentation

2014-04-18 Thread Terry J. Reedy

Terry J. Reedy added the comment:

In 2.x, 1 is guaranteed to be true, in that sense that
  if 1: print 'true'
is guaranteed to print 'true', while True is not necessarily true.
 True = 0
 if True: print 'yes'


So 2.x docs should not be changed.

--
nosy: +terry.reedy
versions:  -Python 2.7, Python 3.1, Python 3.2, Python 3.3

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



[issue21232] Use of '1' instead of 'True' as 'splitlines' argument in difflib documentation

2014-04-18 Thread Terry J. Reedy

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


--
assignee: docs@python - terry.reedy

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



[issue21232] Use of '1' instead of 'True' as 'splitlines' argument in difflib documentation

2014-04-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 604b74f9a07d by Terry Jan Reedy in branch '3.4':
Issue #21232: Replace .splitlines arg '1' with 'keepends=True'.
http://hg.python.org/cpython/rev/604b74f9a07d

New changeset c82dcad83438 by Terry Jan Reedy in branch 'default':
Merge with 3.4. Closes #21232.
http://hg.python.org/cpython/rev/c82dcad83438

--
nosy: +python-dev
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue21251] Standard library trace module crashes with exception

2014-04-18 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Third party compiled C crashers are nasty. Two suggestions:
1. Reduce the failing example to the minimum needed to fail. If you bypass all 
the python code in maps.py and device.py and just 'import dmraid', do you still 
get a crash at that point.
2. What happens if you run a minimal crasher with 3.4 or .5? I don't know if 
all the 3.x work on trace was backported.

--
nosy: +belopolsky, ncoghlan, terry.reedy
stage:  - needs patch

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



[issue21289] make.bat not building documentation

2014-04-18 Thread Dave Sawyer

Dave Sawyer added the comment:

Thanks Zach, I'm used to Git and this was my first foray with Hg and trying
to rebase (I knew I shoulda branched before starting on another patch). BTW,
the devs at PyCon Montreal said Zach's a good guy. One of maybe 4 Windows
devs.

-Dave

--

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



[issue21232] Use of '1' instead of 'True' as 'splitlines' argument in difflib documentation

2014-04-18 Thread Ned Batchelder

Ned Batchelder added the comment:

Although the OP was incorrect about 1 being guaranteed to be True, it is still 
better documentation to use True rather than 1 for a boolean argument.

--
nosy: +nedbat

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



[issue21253] Difflib.compare() crashes on mostly different sequences

2014-04-18 Thread Terry J. Reedy

Terry J. Reedy added the comment:

An obvious fix for the recursion limit error is to convert the .compare 
recursion to iteration with a stack (which I could try to do), but I don't know 
if the deep recursion is expected in this case, or is a bug. Tim?

--
nosy: +terry.reedy, tim.peters
title: Difflib.compare() crashes when sequences contain little or no common 
elements - Difflib.compare() crashes on mostly different sequences

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



[issue16261] Fix bare excepts in various places in std lib

2014-04-18 Thread Terry J. Reedy

Terry J. Reedy added the comment:

See more discussion on duplicate #21259.

--

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



[issue21259] replace except: pass by except Exception: pass

2014-04-18 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This is definitely a duplicate of #16261 and should be closed at such.

On that issue, in msg202448, I explained that #15313 is about except: in 
idlelib and idlelib must be patched separately for the reason Raymond repeated 
(point 2). The other reason (point 1) is to keep different versions the same as 
much as possible.

I agree that bare excepts should eventually be replaced -- but on a case by 
case basis to the right specific exception. A bare except is easy to grep for. 
Once converted to something else, it is no longer visible as needing attention.

--
nosy: +terry.reedy

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



[issue11874] argparse assertion failure with brackets in metavars

2014-04-18 Thread paul j3

paul j3 added the comment:

Another example of code hitting this AssertionError.  Here the problem was a 
space in the option argument, '--out '.

http://stackoverflow.com/questions/23159845/python-argparse-assertionerror

'parser.add_argument('-o', '--out ', help='b', required = True)'

That space would have cause problems later when trying access the 'args' 
attributes.  But producing the error during the help formatting didn't help.

--

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



[issue21261] Teach IDLE to Autocomplete dictionary keys

2014-04-18 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Looks sensible.

--
nosy: +terry.reedy

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



[issue21302] time.sleep (floatsleep()) should use clock_nanosleep() on Linux

2014-04-18 Thread Yury Selivanov

Changes by Yury Selivanov yselivanov...@gmail.com:


--
nosy: +haypo, yselivanov

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



[issue21279] str.translate documentation incomplete

2014-04-18 Thread Kinga Farkas

Kinga Farkas added the comment:

I have created a patch based on Martin Panter's suggestions.  Please let me 
know if it is off or there should be additional changes included.

--
keywords: +patch
nosy: +lilbludot
Added file: http://bugs.python.org/file34966/issue21279.patch

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



[issue21302] time.sleep (floatsleep()) should use clock_nanosleep() on Linux

2014-04-18 Thread Shankar Unni

Shankar Unni added the comment:

I'm working on a patch, but I noticed a similar issue in Condition.wait(), 
which also keeps re-evaluating the remaining sleep time based on the current 
kernel clock, with similar effects.

I'll try to address both issues, or we could open a separate bug for the 
latter..

--

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



[issue21253] Difflib.compare() crashes on mostly different sequences

2014-04-18 Thread Gregory P. Smith

Gregory P. Smith added the comment:

It appears to devolve into linear recursion in this case, one per each item in 
one of the sequences being searched for a match, so even using a stack seems 
wrong as it'd still be linear (though it would prevent the recursion depth 
problem).

The mutual _fancy_replace + _fancy_helper linear recursion comes from 
http://hg.python.org/cpython/file/604b74f9a07d/Lib/difflib.py#l1021

--

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



[issue19771] runpy should check ImportError.name before wrapping it

2014-04-18 Thread Eric Snow

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


--
nosy: +eric.snow

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



[issue21279] str.translate documentation incomplete

2014-04-18 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The docstring is more accurate.
 str.translate.__doc__
'S.translate(table) - str\n\nReturn a copy of the string S, where all 
characters have been mapped\nthrough the given translation table, which must be 
a mapping of\nUnicode ordinals to Unicode ordinals, strings, or None.\nUnmapped 
characters are left untouched. Characters mapped to None\nare deleted.'

To me, even this is a bit unclear on exceptions and 'unmapped'. Based on 
experiments and then reading the C source, I determined that LookupErrors mean 
'unmapped' while other exceptions are passed on and terminate the translation.

Return a copy of the string S, where all characters have been mapped through 
the given translation table. When subscripted by a Unicode ordinal (integer in 
range(1048576)), the table must return a Unicode ordinal, string, or None, or 
else raise a LookupError. A LookupError, which includes instances of subclasses 
IndexError and KeyError, indicates that the character is unmapped and should be 
left untouched. Characters mapped to None are deleted.

class Table:
def __getitem__(self, key):
if key == 99:   raise LookupError() #'c'
elif key == 100: return None  # 'd'
elif key == 101: return 'xyz'  # 'e'
else: return key+1

print('abcdef'.translate(Table()))
# bccxyzg

The current doc ends with Note
An even more flexible approach is to create a custom character mapping codec 
using the codecs module (see encodings.cp1251 for an example).

I don't see how this is supposed to help. Encodings.cp1251 uses a string of 256 
chars as a lookup table.

--
nosy: +terry.reedy

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



[issue21279] str.translate documentation incomplete

2014-04-18 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I see that we mostly added the same info.

--

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



[issue21284] IDLE reformat tests fail in presence of non-default FormatParagraph setting

2014-04-18 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I noticed the same while working on #21139 and posted there a patch, 
21139-34-fpe.diff, that adds a limit parameter to .format_paragraph_event. Test 
could then specify a width for each test without touching the user 
configuration. Different tests could use different widths. An explicit width is 
already used for testing the implementaton functions called by this method.

--
assignee:  - terry.reedy
nosy: +terry.reedy
stage: needs patch - patch review

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



[issue21295] Python 3.4 gives wrong col_offset for Call nodes returned from ast.parse

2014-04-18 Thread Terry J. Reedy

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


--
nosy: +benjamin.peterson, brett.cannon, georg.brandl, ncoghlan

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



[issue21297] csv.skipinitialspace only skips spaces, not whitespace in general

2014-04-18 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Do I understand correctly that only one space is ignored?

--
nosy: +terry.reedy
stage:  - needs patch
title: skipinitialspace in the csv module only skips spaces, not whitespace 
in general - csv.skipinitialspace only skips spaces, not whitespace in 
general
versions:  -Python 3.1, Python 3.2, Python 3.3

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



[issue21295] Python 3.4 gives wrong col_offset for Call nodes returned from ast.parse

2014-04-18 Thread Benjamin Peterson

Benjamin Peterson added the comment:

I suspect this was an intentional result of #16795.

--

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



[issue6305] islice doesn't accept large stop values

2014-04-18 Thread Alok Singhal

Alok Singhal added the comment:

Here's a proposed patch.  I need more tests for large values, but all the tests 
I could think of take a long time to get to a long value.  I added some tests 
that don't take much time but work correctly for long values.  If anyone has 
any ideas for some other tests, please let me know.

--
keywords: +patch
Added file: http://bugs.python.org/file34967/islice_large_values.patch

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



[issue19829] _pyio.BufferedReader and _pyio.TextIOWrapper destructor don't emit ResourceWarning if the file is not closed

2014-04-18 Thread Martin Panter

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


--
nosy: +vadmium

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



[issue21304] Backport hashlib.pbkdf2_hmac to Python 2.7

2014-04-18 Thread Alex Gaynor

New submission from Alex Gaynor:

Pursuant to PEP466, this is a backport of Python 3.4's hashlib.pbkdf2_hmac.

Of note in this patch:

* None of the utilities for testing both a python and a C implementation 
simultaneously were present, so this only tests whichever implementation is 
available.
* Due to a variety of API changes and missing APIs, the code is not an exact 
copy-paste, tough luck :-)
* I haven't done docs yet.
* It currently accepts unicode values because the ``y*`` format from Python3 
doesn't have any parallel in Python2. I'm not sure whether consistency with the 
rest of the 2-verse is more important than consistency with a sane way to treat 
data / the 3-verse.

--
components: Extension Modules, Library (Lib)
files: pbkdf2.diff
keywords: patch, security_issue
messages: 216823
nosy: alex
priority: normal
severity: normal
status: open
title: Backport hashlib.pbkdf2_hmac to Python 2.7
versions: Python 2.7
Added file: http://bugs.python.org/file34968/pbkdf2.diff

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



[issue21304] Backport hashlib.pbkdf2_hmac to Python 2.7

2014-04-18 Thread Alex Gaynor

Changes by Alex Gaynor alex.gay...@gmail.com:


--
nosy: +christian.heimes, dstufft, ncoghlan

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



[issue21305] PEP 466: update os.urandom

2014-04-18 Thread Nick Coghlan

New submission from Nick Coghlan:

Tracker issue for the os.urandom persistent file descriptor backport to 2.7 
described in PEP 466.

--
messages: 216824
nosy: alex, benjamin.peterson, christian.heimes, dstufft, giampaolo.rodola, 
janssen, ncoghlan, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: PEP 466: update os.urandom
type: enhancement
versions: Python 2.7

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



[issue21232] Use of '1' instead of 'True' as 'splitlines' argument in difflib documentation

2014-04-18 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I believe that there have been discussions on this point and my memory is to 
leave 1 alone in 2.x docs. I could be mistaken though.

--

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



[issue21306] PEP 466: backport hmac.compare_digest

2014-04-18 Thread Nick Coghlan

New submission from Nick Coghlan:

Tracker issue for the hmac.compare_digest backport to 2.7 described in PEP 466.

--
messages: 216826
nosy: alex, benjamin.peterson, christian.heimes, dstufft, giampaolo.rodola, 
janssen, ncoghlan, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: PEP 466: backport hmac.compare_digest
type: enhancement
versions: Python 2.7

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



[issue21307] PEP 466: backport hashlib changes

2014-04-18 Thread Nick Coghlan

New submission from Nick Coghlan:

Tracker issue for the hashlib PBKDF2 and algorithm availability details 
backport to 2.7 described in PEP 466.

--
messages: 216827
nosy: alex, benjamin.peterson, christian.heimes, dstufft, giampaolo.rodola, 
janssen, ncoghlan, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: PEP 466: backport hashlib changes
type: enhancement
versions: Python 2.7

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



[issue21307] PEP 466: backport hashlib changes

2014-04-18 Thread Alex Gaynor

Alex Gaynor added the comment:

issue21304 has the implementation of the PBKDF2 work.

--

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



[issue21308] PEP 466: backport ssl changes

2014-04-18 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
nosy: alex, benjamin.peterson, christian.heimes, dstufft, giampaolo.rodola, 
janssen, ncoghlan, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: PEP 466: backport ssl changes
type: enhancement
versions: Python 2.7

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



[issue21304] Backport hashlib.pbkdf2_hmac to Python 2.7

2014-04-18 Thread Alex Gaynor

Changes by Alex Gaynor alex.gay...@gmail.com:


--
nosy: +benjamin.peterson, pitrou

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



[issue21307] PEP 466: backport hashlib changes

2014-04-18 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Let's dup this then.

--
resolution:  - duplicate
status: open - closed
superseder:  - Backport hashlib.pbkdf2_hmac to Python 2.7

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



[issue21253] Difflib.compare() crashes on mostly different sequences

2014-04-18 Thread Tim Peters

Tim Peters added the comment:

Comparison can certainly trigger a recursion error if the sequences contain no 
(or few) matching non-junk elements, but contain many almost matching 
elements.  If the sequences have lengths M and N, recursion can go as deep as 
2*min(M, N) then.

Now in the test case, we have two lists of integers.  Difflib has no idea what 
almost match might mean for integers.  But difflib isn't passed two lists of 
integers.  Instead unittest appears to be converting the input lists to giant 
strings, then splitting the giant strings on whitespace (or just linefeeds?), 
and then feeding the resulting lists of substrings to difflib.  That doesn't 
make much sense to me, but so it goes.

There are no matches in the two lists of strings, so difflib starts looking for 
close matches, and there are a lot of these.

At first it decides [1, and [100, aren't close enough, but  10, and  
101, are close enough.  That's used as a synch point, and then there's 
recursion to match the sublists before and after the synch point.  Then  12, 
and  102, are close enough, so that pair is used as the next synch point, and 
another layer of 2-sided recursion.  Etc.

Whether someone wants to rip the recursion out of _fancy_replace and 
_fancy_helper is up to them.  I wouldn't bother, if this unittest-created 
problem is the only reported instance.  Comparing strings seems a poor idea 
from the start (there's no guarantee in general, e.g., that A != B implies 
str(A) != str(B) or repr(A) != repr(B)), and difflib isn't good in any case at 
comparing sequences with few matching elements (e.g., remove the recursion and 
it will still take time at best cubic in the common length of the sequences - 
would it really help to change a failing unittest bombs with RecursionError 
to a failing unittest seems to take forever?).

I'd suggest instead that unittest, say, locate the first pair of non-equal 
elements itself, and display that along with a few elements of context on 
either side.  Or something ;-)  Something worst-case linear-time, and using != 
directly on sequence elements (not on strings derived from the sequence 
elements).

--

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



[issue21307] PEP 466: backport hashlib changes

2014-04-18 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Rather #21304 should be a dep...

--
dependencies: +Backport hashlib.pbkdf2_hmac to Python 2.7
resolution: duplicate - 
status: closed - open
superseder: Backport hashlib.pbkdf2_hmac to Python 2.7 - 

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



[issue20351] Add doc examples for DictReader and DictWriter

2014-04-18 Thread Charles-Axel Dein

Charles-Axel Dein added the comment:

New version of the patch.

--
Added file: http://bugs.python.org/file34969/add_csvdict_examples.patch

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



[issue21253] unittest assertSequenceEqual can lead to Difflib.compare() crashing on mostly different sequences

2014-04-18 Thread Gregory P. Smith

Gregory P. Smith added the comment:

that seems reasonable.  unittest's assertSequenceEqual is using this to attempt 
to display a useful error message as to what the delta was; it should try 
harder to avoid difflib corner cases.

At the very least, unittest should recover from a difflib failure and report a 
test failure without the possibly nicer message.

--
title: Difflib.compare() crashes on mostly different sequences - unittest 
assertSequenceEqual can lead to Difflib.compare() crashing on mostly different 
sequences

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



[issue21309] Confusing see also for generic C-level __init__ methods in help output

2014-04-18 Thread R. David Murray

New submission from R. David Murray:

 help(ImportError.__init__)
Help on wrapper_descriptor:

__init__(self, /, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.

The above also appears (without the wrapper_descriptor bit) in the help output 
for help(ImportError).  In neither case does 'help(type(self))' tell the naive 
user anything useful, since 'self' doesn't exist in the scope in which they are 
executing help.  I don't know where this text is coming from (Argument 
Clinic?), but it could use improvement.  I believe it is trying to say that one 
should see the help information for the class object.  I'm not sure how you'd 
spell that usefully.  Maybe See the object's main help for a more accurate 
signature?

And maybe I shouldn't have said naive user: I'm an experienced python 
developer, and I tried 'help(type(ImportError))', since I saw the above when 
I'd typed 'help(ImportError)', and it was only when I got the help for 'type' 
that I realized what it was trying to tell me.  Now, I tried this because the 
ImportError help does not in fact give the more accurate signature, which is 
a different issue, but you get the point.  

We also have:

 x = ImportError()
 help(x.__init__)
Help on method-wrapper object:

__init__ = class method-wrapper(object)
 |  Methods defined here:
 |  
 |  __call__(self, /, *args, **kwargs)
 |  Call self as a function.

Maybe that's another bug?  Maybe not.

NB: in 3.3 the text is:

  |  __init__(...)
  |  x.__init__(...) initializes x; see help(type(x)) for signature

So that was worse, since the only time you would see in isolation would be when 
you are calling help on the class (help(ImportError.__init__)...in which case 
'x' is ImportError, and type(x) is...type.  So 3.4 is *better*, but I don't 
think it is as good as we can do.

--
components: Interpreter Core
messages: 216836
nosy: larry, r.david.murray
priority: normal
severity: normal
status: open
title: Confusing see also for generic C-level __init__ methods in help output
type: enhancement
versions: Python 3.5

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



[issue21308] PEP 466: backport ssl changes

2014-04-18 Thread Josh Rosenberg

Changes by Josh Rosenberg shadowranger+pyt...@gmail.com:


--
nosy: +josh.rosenberg

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



[issue21305] PEP 466: update os.urandom

2014-04-18 Thread Josh Rosenberg

Changes by Josh Rosenberg shadowranger+pyt...@gmail.com:


--
nosy: +josh.rosenberg

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



[issue21230] imghdr does not accept adobe photoshop mime type

2014-04-18 Thread R. David Murray

R. David Murray added the comment:

Well, it's 'expected' behavior in the sense that we don't know about 'adobe' 
format.  Is there some better way to detect jpeg format than to look for 
particular format identifiers in a specific byte position?

--
type: enhancement - behavior
versions: +Python 3.4, Python 3.5

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



[issue21304] PEP 446: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-04-18 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
title: Backport hashlib.pbkdf2_hmac to Python 2.7 - PEP 446: Backport 
hashlib.pbkdf2_hmac to Python 2.7

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



[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-04-18 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
title: PEP 446: Backport hashlib.pbkdf2_hmac to Python 2.7 - PEP 466: Backport 
hashlib.pbkdf2_hmac to Python 2.7

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



[issue21310] ResourceWarning when open() fails with io.UnsupportedOperation: File or stream is not seekable

2014-04-18 Thread Martin Panter

New submission from Martin Panter:

 f = open(/dev/stdout, w+b)  # Or any non-seekable file, pipe, etc
__main__:1: ResourceWarning: unclosed file _io.FileIO name='/dev/stdout' 
mode='rb+'
Traceback (most recent call last):
  File stdin, line 1, in module
io.UnsupportedOperation: File or stream is not seekable.

It is mainly just the annoyance of the ResourceWarning, so nothing major. I 
think this was previously identified in Issue 18116, but it looks like that bug 
was side-stepped by removing an equivalent fdopen() call.

No ResourceWarning happens with an unbuffered file. I haven’t looked at the 
code but I guess the UnsupportedOperation might only be raised after trying to 
wrap the open FileIO object in a BufferedWriter object.

--
components: IO
messages: 216838
nosy: vadmium
priority: normal
severity: normal
status: open
title: ResourceWarning when open() fails with io.UnsupportedOperation: File or 
stream is not seekable
versions: Python 3.4

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



[issue18116] getpass.unix_getpass() always fallback to sys.stdin

2014-04-18 Thread Martin Panter

Martin Panter added the comment:

I opened Issue 21310 about a ResourceWarning from open() which I suspect is the 
same as what was originally described here.

--
nosy: +vadmium

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



[issue21211] pkgutil.find_loader() raises ImportError instead of returning None

2014-04-18 Thread Eric Snow

Eric Snow added the comment:

On second thought, all modules (except __main__) must have both __spec__ and 
__loader__ set to their correct respective objects.  So the current behavior is 
correct in that it exposes poorly formed modules.

--
resolution:  - not a bug
stage: test needed - resolved
status: open - closed

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



[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-04-18 Thread Gregory P. Smith

Gregory P. Smith added the comment:

See also http://bugs.python.org/issue21288 to consider one 
fix/oversite/addition to the existing API as part of this process. (discuss 
that there)

by default: use the exact same API as 3.4 if it is suitable for PEP 466 and 
2.7.7's needs. the above issue is about fixing a possible oversight; so if it 
happens in 3.4 it should happen in 2.7.7.

--
nosy: +gregory.p.smith

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



[issue21307] PEP 466: backport hashlib changes

2014-04-18 Thread Gregory P. Smith

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


--
nosy: +gregory.p.smith

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



[issue21308] PEP 466: backport ssl changes

2014-04-18 Thread Gregory P. Smith

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


--
nosy: +gregory.p.smith

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



[issue21304] PEP 466: Backport hashlib.pbkdf2_hmac to Python 2.7

2014-04-18 Thread Alex Gaynor

Alex Gaynor added the comment:

Yup, I've got my eyes on it, if anything lands there I'll include it in this in 
the 2.7 code, whether it's before or after this patch lands :-)

--

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



[issue19662] smtpd.py should not decode utf-8

2014-04-18 Thread Maciej Szulik

Maciej Szulik added the comment:

Sreepriya, are you still working on this issue? If no I'll be happy to take it 
over, is yes start with fixing following things:
- start with test - this is the most important to have each feautre tested
- decode_data, as David mentioned, needs to have default value True, meaning 
that __init__ should look like this: 
def __init__(self, server, conn, addr, data_size_limit=DATA_SIZE_DEFAULT, 
map=None, decode_data=True)
Assigning True in __init__ will make this value always True, and that's not the 
point. 
- add deprecation warning about this parameter using warnings module:
warnings.warn('decode_data=True is deprecated, data will not be decoded by 
default', DeprecationWarning, 2)
- as for the found_terminator method what David means is to decode data in the 
first if, where commands are checked, to simplify processing of this part 
(David please correct me if I'm wrong) and not what you did
- and finally you need to update the docs to include decode_data parameter with 
information about how it works and it's deprecation

--
nosy: +maciej.szulik

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



[issue11748] test_ftplib failure in test for source_address

2014-04-18 Thread Jessica McKellar

Jessica McKellar added the comment:

Antoine, thanks for the patch, and Giampaolo, thanks for the ping.

I confirmed that http://hg.python.org/cpython/rev/8a2d848244a2 does address the 
issue:

Before the patch, if another process bound to the port selected for the test 
before the test ran, the test would error out.

After the patch, if this race happens the test is skipped instead.

Anecdotally from local tests and from looking at recent buildbot builds, the 
test does generally run (so we don't have a problem with it skipping all the 
time and the behavior not getting tested).

= Closing as resolved.

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

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



[issue21287] Better support for AF_PACKET on opensolaris (illumos)

2014-04-18 Thread Igor Pashev

Igor Pashev added the comment:

Related to http://bugs.python.org/issue8852

--

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



[issue21287] Better support for AF_PACKET on opensolaris (illumos)

2014-04-18 Thread Igor Pashev

Changes by Igor Pashev pashev.i...@gmail.com:


Removed file: http://bugs.python.org/file34952/dyson-socketmodule-ifindex.patch

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