[issue21765] Idle: make 3.x HyperParser work with non-ascii identifiers.

2014-06-15 Thread Tal Einat

Tal Einat added the comment:

It seems that the unicodedata module already supplies relevant functions which 
can be used for this. For example, we can replace char in 
self._id_first_chars with something like:

from unicodedata import normalize, category
norm_char = normalize(char)[0]
is_id_first_char = norm_char_first == '_' or category(norm_char_first) in 
{Lu, Ll, Lt, Lm, Lo, Nl}

I'm not sure what the Other_ID_Start property mentioned in [1] and [2] means, 
though. Can we get someone with more in-depth knowledge of unicode to help with 
this? 

The real question is how to do this *fast*, since HyperParser does a *lot* of 
these checks. Do you think caching would be a good approach?

See:
.. [1]: https://docs.python.org/3/reference/lexical_analysis.html#identifiers
.. [2]: http://legacy.python.org/dev/peps/pep-3131/

--

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



[issue21765] Idle: make 3.x HyperParser work with non-ascii identifiers.

2014-06-15 Thread Tal Einat

Tal Einat added the comment:

Bah, I messed up the code sample in my previous message. It was supposed to be:

from unicodedata import normalize, category
norm_char_first = normalize(char)[0]
is_id_first_char = (
norm_char_first == '_' or
category(norm_char_first) in {Lu, Ll, Lt, Lm, Lo, Nl}
)

--

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



[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2014-06-15 Thread Aymeric Augustin

Aymeric Augustin added the comment:

Jim, I believe this API decision doesn't affect the patch in a major way.

I'll write the rest of the patch and the committer who reviews it will decide.

--

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



[issue21756] IDLE - ParenMatch fails to find closing paren of multi-line statements

2014-06-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I meant what you said in your last paragraph -- not passing a value for the new 
parameter would keep current behavior.

--

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



[issue21751] Expand zipimport to support bzip2 and lzma

2014-06-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

You can use deflate for Python files and advanced compression methods for large 
well-compressable package data.

--

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



[issue21768] Fix a NameError in test_pydoc

2014-06-15 Thread Claudiu Popa

New submission from Claudiu Popa:

There's no 'o' in test_pydoc.TestDescriptions.test_builtin, but 'name'.

--
components: Tests
files: test_pydoc_nameerror.patch
keywords: patch
messages: 220618
nosy: Claudiu.Popa
priority: normal
severity: normal
status: open
title: Fix a NameError in test_pydoc
versions: Python 3.5
Added file: http://bugs.python.org/file35642/test_pydoc_nameerror.patch

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



[issue21769] Fix a NameError in test_descr

2014-06-15 Thread Claudiu Popa

New submission from Claudiu Popa:

Hi. Here's a patch which uses `self.fail` in test_descr instead of `raise 
TestFailed`.

--
components: Tests
files: test_descr_nameerror.patch
keywords: patch
messages: 220619
nosy: Claudiu.Popa
priority: normal
severity: normal
status: open
title: Fix a NameError in test_descr
versions: Python 3.5
Added file: http://bugs.python.org/file35643/test_descr_nameerror.patch

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



[issue21758] Not so correct documentation about asyncio.subprocess_shell method

2014-06-15 Thread STINNER Victor

STINNER Victor added the comment:

IMO it's fine to support bytes on UNIX, os.fsencode() is well defined. On
Windows, we may use the same decoder.

--

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



[issue21765] Idle: make 3.x HyperParser work with non-ascii identifiers.

2014-06-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I checked for usage: _id(_first)_chars is only used in _eat_identifier, which 
is used in one place in get_expression. That is called once each in 
AutoComplete and CallTips. Both are seldom visible accept as requested (by 
waiting, for calltips). Calltips is only called on entry of '('. Is 
AutoComplete doing hidden checks?

_eat_identifier currently does a linear 'c in string' scan of the 2 char 
strings. I believe that both are long enough that O(1) 'c in set' checks would 
be faster. The sets could be augmented with latin1 id chars without becoming 
hugh or slowing the check (see below). This is a change we could make as soon 
as the test file and new failing tests are ready.

I just discovered, new in 3.x, str.isidentifier.
 '1'.isidentifier()
False
 'a'.isidentifier()
True
 '\u'
'쳌'
 '\u'.isidentifier()
True

This is, however, meant to be used in the forward direction. If 
s[pos].isidentifier(), check s[pos:end].identifier(), where end is 
progressively incremented until the check fails. For backwards checking, it 
could be used with a start char prefixed: ('a'+s[start:pos]).isidentifier(). To 
limit the cost, the start decrement could be 4 chars at a time, with 2 extra 
tests (binary search) on failure to find the actual start.

The 3.x versions of other isxyg functions could be useful: isalpha, isdecimal, 
isdigit, isnumeric. We just have to check their definitions against the two 
identifier class definitions.

What is slightly annoying is that in CPython 3.3+, all-ascii strings are marked 
as such but the info is not directly accessible without without ctypes. I 
believe all-latin-1 strings can be detected by comparing sys.getsizeof(s) to 
len(s), so we could augment the char sets to include the extra identifier chars 
in latin-1.

We could add a configuation option to assume all-ascii (or better, all-latin1 
code chars or not, and note that 'all latin1' will run faster but not recognize 
identifiers for the two features that use this.

--

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



[issue21770] Module not callable in script_helper.py

2014-06-15 Thread Claudiu Popa

New submission from Claudiu Popa:

Using make_zip_pkg from script_helper with compiled=True will lead to the 
following failure:

Traceback (most recent call last):
  File D:\Projects\cpython\lib\test\test_cmd_line_script.py, line 305, in 
test_module_in_subpackage_in_zipfile
zip_name, run_name = _make_test_zip_pkg(script_dir, 'test_zip', 'test_pkg', 
'script', depth=2)
  File D:\Projects\cpython\lib\test\test_cmd_line_script.py, line 86, in 
_make_test_zip_pkg
source, depth, compiled=True)
  File D:\Projects\cpython\lib\test\script_helper.py, line 158, in 
make_zip_pkg
init_name = py_compile(init_name, doraise=True)
TypeError: 'module' object is not callable

The attached patch fixes this.

--
components: Tests
files: script_helper_fix.patch
keywords: patch
messages: 220622
nosy: Claudiu.Popa
priority: normal
severity: normal
status: open
title: Module not callable in script_helper.py
versions: Python 3.5
Added file: http://bugs.python.org/file35644/script_helper_fix.patch

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



[issue21736] Add __file__ attribute to frozen modules

2014-06-15 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 15.06.2014 01:53, Nick Coghlan wrote:
 
 Can we just drop __file__ and set the origin for frozen modules to
 something that includes the original file name?

This wouldn't really help, because too much code out there uses
the __file__ attribute and assumes it's always available.

Note that the filename information is already available in the
code object's co_filename attribute.

--

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



[issue21427] installer not working

2014-06-15 Thread Uwe

Uwe added the comment:

problem is solved

observation
- installer problem only occurred on win7 32 bit with prior python installation
(my working system)
- When repeating the installer problem I noticed that a window was opened very 
shortly with python.exe running. An error message from this call resulted in 
the exit process of the installer
- the window popped up only for about 1second. A was reading (taking a video) 
that it was complaining about an error in numpy when calling imp.py in 
/python33/lib (the old installation, something wrong with libtool, bootstrap)
- I removed step by step all installed libraries, but the error still appeared
- I removed the prior python 3.3.5 installation completely, now the installer 
worked
- when opening the window with python, it was downloading something like 
setuptools (not absolutely sure about the name)
- a test with nose 1.3.3, numpy 1.8.1, scipy 0.14.0 (all from Gohlkes web site) 
went ok.
- unfortunately, the error message with the registry was not reflecting the 
problem

Hence, the solution is to remove the prior installation of python. That was not 
necessary in older versions and not necessary for win7 64 bit: strange.

--

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



[issue21519] IDLE : Bug in keybinding validity check

2014-06-15 Thread Saimadhav Heblikar

Saimadhav Heblikar added the comment:

A small bug in line 185 in keybindingDialog.py. 'F2' appears twice and 'F3' is 
missing. Since this is a typo, I did not create a new issue.

--

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



[issue21765] Idle: make 3.x HyperParser work with non-ascii identifiers.

2014-06-15 Thread Tal Einat

Tal Einat added the comment:

AutoComplete isn't doing hidden checks. My concern is that auto-completion 
happens automatically and the parsing is done synchronously, so if the parsing 
takes a significant amount of time it can cause a delay long enough to be 
noticeable by users. We should also consider the IDLE is being used on some 
relatively weak computers, such as Raspberry Pi. I have one for testing if 
needed!

Your suggestion of jumping backwards several characters at a time and calling 
isidentifier() seems problematic. For example, how would it deal with something 
like 2fast2furious? Recognizing fast2furious as the identifier candidate is 
incorrect, but that's what we'd get with a straightforward implementation of 
your suggestion. I can't think of a way to get this right without be able to 
check if each character is valid for identifiers.

I still think the category(normalize(char)[0]) in {...} approach could be just 
fine. I'd really like to get feedback from an expert on unicode. The experts 
index lists three people as experts on unicodedata; I've added them to the nosy 
for this issue.

Once we have an identifier candidate, the code currently just checks that the 
first char is valid and that the identifier isn't a keyword. We probably should 
use str.isidentifier() instead of just checking the first character.

--
nosy: +ezio.melotti, lemburg, loewis

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



[issue18507] import_init() should not use Py_FatalError() but return an error

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

Just making sure this hasn't slipped under the radar.

--
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.4

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



[issue14017] Make it easy to create a new TextIOWrapper based on an existing

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

@Nick would you like or even need this in 3.5?

--
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.4

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



[issue16133] asyncore.dispatcher.recv doesn't handle EAGAIN / EWOULDBLOCK

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

Could we have a review of the latest path from Xavier please.

Aside, msg172160 add Windows project file for _sha3 module. I choose to build 
_sha3 as a sparat module as it's rather large (190k for AMD64)., presumably 
Christian mistyped an issue number?

--
nosy: +BreamoreBoy

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



[issue11322] encoding package's normalize_encoding() function is too slow

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

What's the status of this issue, as we've lived with this really slow 
implementation for well over three years?

--
nosy: +BreamoreBoy
versions: +Python 3.4, Python 3.5 -Python 3.3

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



[issue15506] configure should use PKG_PROG_PKG_CONFIG

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

I've guessed at the versions impacted, assuming of course that the change 
proposed inline in msg166915 is acceptable.  I'm sorry but I don't know who is 
best qualified to put on the nosy list for this issue.

--
nosy: +BreamoreBoy
versions: +Python 2.7, Python 3.4, Python 3.5

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



[issue18875] Automatic insertion of the closing parentheses, brackets, and braces

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

I'd like to see this feature as I've been using IDLE quite a lot recently and 
I'm so used to seeing it in other IDEs.

--
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.4

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



Re: [issue11322] encoding package's normalize_encoding() function is too slow

2014-06-15 Thread M.-A. Lemburg
On 15.06.2014 15:02, Mark Lawrence wrote:
 
 What's the status of this issue, as we've lived with this really slow 
 implementation for well over three years?

I guess it just needs someone to write a patch.

Note that encoding lookups are cached, so the slowness only
becomes an issue if you lookup lots of different encodings.

-- 
Marc-Andre Lemburg
eGenix.com

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



[issue14540] Crash in Modules/_ctypes/libffi/src/dlmalloc.c on ia64-hp-hpux11.31

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

Is this still a problem given that we're two years on and up to Python 2.7.7?

--
nosy: +BreamoreBoy

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



[issue15954] No error checking after using of the wcsxfrm()

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

@Serhiy will you follow up on this?

--
nosy: +BreamoreBoy
versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3

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



[issue13779] os.walk: bottom-up

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

The OP is happy with the proposed doc patch so can we have this committed 
please.

--
nosy: +BreamoreBoy

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



[issue21095] EmailMessage should support Header objects

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

@David can we have your comments please.

--
nosy: +BreamoreBoy

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



[issue10118] Tkinter does not find font

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

Is this still a problem with tcl/tk 8.6?

--
nosy: +BreamoreBoy

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



[issue21771] name of 2nd parameter to itertools.groupby()

2014-06-15 Thread Uwe Kleine-König

New submission from Uwe Kleine-König:

The name of the 2nd parameter to itertools.groupby() is documented 
inconsitently. Sometimes it's key, sometimes keyfunc. The code actually 
uses key, so I adapted all occurences I found to key.

 from itertools import groupby
 groupby.__doc__
'groupby(iterable[, keyfunc]) - create an iterator which returns\n(key, 
sub-iterator) grouped by each value of key(value).\n'

 groupby([], keyfunc=lambda x: x)
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: 'keyfunc' is an invalid keyword argument for this function

 groupby([], key=lambda x: x)
itertools.groupby object at 0x7fee025d2048

--
assignee: docs@python
components: Documentation
files: groupby-keyfunc.patch
keywords: patch
messages: 220639
nosy: docs@python, ukl
priority: normal
severity: normal
status: open
title: name of 2nd parameter to itertools.groupby()
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file35645/groupby-keyfunc.patch

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



[issue16181] cookielib.http2time raises ValueError for invalid date.

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

A simple patch is attached so could someone take a look please, thanks.

--
nosy: +BreamoreBoy

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



[issue15025] httplib and http.client are missing response messages for defined WEBDAV responses, e.g., UNPROCESSABLE_ENTITY (422)

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

Can someone take a look please as nobody is given against http in the experts 
index.

--
nosy: +BreamoreBoy

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



[issue16181] cookielib.http2time raises ValueError for invalid date.

2014-06-15 Thread Berker Peksag

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


--
stage:  - patch review
versions: +Python 3.5 -Python 3.3

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



[issue16587] Py_Initialize breaks wprintf on Windows

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

I'll let our Windows gurus fight over who gets this one :)

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

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



[issue14534] Add method to mark unittest.TestCases as do not run.

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

Do we have a consensus as to whether or not David's proposed solution is 
acceptable?

--
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.3

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



[issue15476] Add code object to glossary

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

Can this be closed given msg169859 and msg169861?

--
nosy: +BreamoreBoy

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



[issue15680] PEP 3121 refactoring applied to audioop module

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

Could somebody review the attached patch please.

--
nosy: +BreamoreBoy

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



[issue21095] EmailMessage should support Header objects

2014-06-15 Thread R. David Murray

R. David Murray added the comment:

I have to look at the implementation to remind myself how hard this would be to 
implement.  The goal was to leave Header a legacy API...if you need that level 
of control, you use the old API.  But I can see the functionality argument, and 
Header *is* a reasonable API for building such a custom header.  It may be a 
while before I have time to take a look at it, though, so if anyone else wants 
to take a look, feel free :)

One problem is that while the parser does retain the cte of each encoded word, 
if the header is refolded for any reason the cte is (often? always? I don't 
remember) ignored because encoded words may be recombined during folding.  And 
if you are creating the header inside a program, that header is going to get 
refolded on serialization, unless max_line_length is set to 0/None or the 
header fits on one line.

So it's not obvious to me that this can work at all.  What *could* work would 
be to have a policy setting to use something other than utf-8 for the CTE for 
encoding headers, but that would be a global setting (applying to all headers 
that are refolded during serialization).

Basically, controlling the CTE of encoded words on an individual basis goes 
directly against the model used by the new Email API: in that model, the 
model of the email message is the *decoded* version of the message, and 
serialization is responsible for doing whatever CTE encoding is appropriate.  
The goal is to *hide* the details of the RFCs from the library user.  So, if 
you want control at that level, you have to go back to the old API, which 
required you do understand what you were doing at the RFC level...

--

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



[issue21763] Clarify requirements for file-like objects

2014-06-15 Thread R. David Murray

R. David Murray added the comment:

I don't think that's true, though.  file like pretty much means has the file 
attributes that I actually use.  That is, it is context dependent (duck 
typing).

I'm also not sure I see the point in the change.  It is inherent in the 
definition of what ABCs are.  I think the language should be audited for 
imperative/prescriptive voice, though:

  Flush and close this stream. If called again, do nothing. Once the file is 
closed, any operation on the file (e.g. reading or writing) should raise a 
ValueError.

My use of 'should' there might be controversial, though, since in the default 
implementation 'will' is correct.  If 'will' is kept, then perhaps some 
variation of your note would be appropriate.

--
nosy: +r.david.murray

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



[issue14534] Add method to mark unittest.TestCases as do not run.

2014-06-15 Thread R. David Murray

R. David Murray added the comment:

It's Michael's solution that is under consideration, and I guess no one has 
felt strongly enough about having it to write a patch.  So this issue stays in 
limbo until someone does.

--

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



[issue1102] Add support for _msi.Record.GetString() and _msi.Record.GetInteger()

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

Can someone review the latest patch please as it's only five additional lines 
of C code.

--
nosy: +BreamoreBoy, steve.dower, zach.ware
versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3

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



[issue6926] socket module missing IPPROTO_IPV6, IPPROTO_IPV4

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

As XP is now out of support here are links 
http://legacy.python.org/dev/peps/pep-0011/#microsoft-windows 
http://support.microsoft.com/lifecycle/ that I hope come in useful.

--
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.3

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



[issue18875] Automatic insertion of the closing parentheses, brackets, and braces

2014-06-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I have never actually used this feature, and I do not see it in Notepad++. I 
worry that some people, especially beginners with no experience of this 
'feature' would hate this, so it would have to be optional.

Do you literally mean 'parentheses' or also square and curly brackets?  How 
about quotes? An autocloser here would be useful as Idle would not mishighlight 
the remainer of the text.

How does it increase speed? Hitting - to skip over the closer is hardly faster 
that typing the closer. It might reduce errors though.

Tal, any opinion on this?

--
nosy: +taleinat

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



[issue11717] conflicting definition of ssize_t in pyconfig.h

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

Is the patch acceptable?

--
nosy: +BreamoreBoy, steve.dower, tim.golden, zach.ware
versions: +Python 3.4, Python 3.5

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



[issue4918] Windows installer created with Python X.Y does not work with Python X.Y+1

2014-06-15 Thread Mark Lawrence

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


--
components:  -Distutils2
nosy: +dstufft
versions: +Python 3.4, Python 3.5 -3rd party, Python 3.2, Python 3.3

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



[issue18875] Automatic insertion of the closing parentheses, brackets, and braces

2014-06-15 Thread Tal Einat

Tal Einat added the comment:

I like the idea, though it's really just nice to have. This is a very common in 
IDEs these days, and whoever finds it annoying will be able to disable it.

If we do this, we should go all the way and close square and curly brackets, 
parenthesis, and quotes (including triple quotes!).

Also, any implementation must allow typing the closing parenthesis to actually 
just move the cursor beyond the automatically generated closer. Getting this 
right is more difficult than it sounds! But certainly possible.

I actually seem to recall having seen this implemented for IDLE quite a few 
years ago. I might even have been the one to implement it... I can't see any 
mention in IDLE-Spoon, IdleX or VIDLE, though. I'll take a look through my old 
files when I get the chance back home.

--

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



[issue21772] platform.uname() not EINTR safe

2014-06-15 Thread Tor Colvin

New submission from Tor Colvin:

platform.uname() periodically spews EINTR errors on mac - so use 
subproces.communicate() which is EINTR safe after 
http://bugs.python.org/issue1068268

Calling f.read() on naked os.open() output can produce IOError: [Errno 4] 
Interrupted system call. Attached is a suggested fix.

--
files: platform.py.fix
messages: 220654
nosy: Tor.Colvin
priority: normal
severity: normal
status: open
title: platform.uname() not EINTR safe
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file35646/platform.py.fix

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



[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-15 Thread Vinay Sajip

Vinay Sajip added the comment:

 Isn't __code__ implementation-specific?

Further data point: the contents of __code__ might be implementation-specific 
(as there are no other Python 3 implementations), but the 2.x equivalent, 
func_code, is to be found in CPython, Jython, IronPython and PyPy, and in each 
case it has a co_filename attribute pointing to a source file. Other internal 
details no doubt differ.

--

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



[issue10118] Tkinter does not find font

2014-06-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Mark, On Windows, 3.4 comes with tck/tk 8.6. I am guessing that you built not 
on windows. In any case, tkinter has had several patches since you last posted, 
not all backported to 2.7, so an updated report with 3.4 or 3.5 and 8.6 would 
help delineate the scope of the font recognition problem.

--
nosy: +serhiy.storchaka

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



[issue9693] asynchat push_callable() patch

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

Is this ever likely to get applied given the arrival of asyncio?

--
nosy: +BreamoreBoy

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



[issue6911] Document changes in asynchat

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

Is it worth applying the latest patch given that asynchat is deprecated in 
favour of asyncio?

--
nosy: +BreamoreBoy

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



[issue18959] Create a Superseded modules section in standard library ToC

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

Would somebody review the attached patch please.

--
nosy: +BreamoreBoy

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



[issue15476] Index code object and link to code object definition

2014-06-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:

There is no entry for 'code object' (unlike, for instance 'class object'). 
There is an entry for 'code' and a subentry for 'object' with four links.

The fourth link is to the short definition in the library manual:
https://docs.python.org/3/library/stdtypes.html#index-46
https://docs.python.org/3/library/stdtypes.html#code-objects
is better as it includes the header line. This is the one that should be used 
elsewhere.

The entry says See The standard type hierarchy for more information.

The third link is to the long definition in the datamodel section.
https://docs.python.org/3/reference/datamodel.html#index-53
Again, the header line is cut off. I presume this is because the index 
directive is after rather than before the header line. I think the short 
definition should point directly here.

The second link is to code objects in the C-API
https://docs.python.org/3/c-api/code.html#index-0

The first link is to marshal, because marshal marshals code objects. 

In other words, the unlabeled links are in the reverse order of what one would 
want. More helpful would be something like

code object
  C-API
  definition
  marshal

--
title: Add code object to glossary - Index code object and link to code 
object definition

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



[issue14759] BSDDB license missing from liscense page in 2.7.

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

I think msg160322 and msg160339 are saying this isn't an issue.  If I'm correct 
it can be closed. If I'm wrong who is best placed to provide the needed patch?

--
nosy: +BreamoreBoy

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



[issue1102] Add support for _msi.Record.GetString() and _msi.Record.GetInteger()

2014-06-15 Thread Terry J. Reedy

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


--
nosy:  -terry.reedy

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



[issue20578] BufferedIOBase.readinto1 is missing

2014-06-15 Thread Nikolaus Rath

Nikolaus Rath added the comment:

As discussed on python-devel, I'm attaching a new patch that uses 
memoryview.cast to ensure that the pure-Python readinto() now works with any 
object implementing the buffer protocol.

--
Added file: http://bugs.python.org/file35647/issue20578_r5.diff

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



[issue21763] Clarify requirements for file-like objects

2014-06-15 Thread Nikolaus Rath

Nikolaus Rath added the comment:

On 06/15/2014 08:29 AM, R. David Murray wrote:
 I don't think that's true, though.  file like pretty much means has the 
 file attributes that I actually use.  That is, it is context dependent (duck 
 typing).

Well, but when you pass your file-like object to some function from the
standard library, you don't know what file attributes will be used. So
to make sure that things work as expected, you have to make sure that
your file-like object behaves as prescribed by the IOBase* classes.

 I'm also not sure I see the point in the change.  It is inherent in the 
 definition of what ABCs are. 

True. But not everyone reading the io documentation is familiar enough
with ABCs to immediately make that mental translation.

--

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



[issue18875] Automatic insertion of the closing parentheses, brackets, and braces

2014-06-15 Thread Tal Einat

Tal Einat added the comment:

Well, I was wrong. I can't find anything of the sort in my old IDLE files.

--

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



[issue20578] BufferedIOBase.readinto1 is missing

2014-06-15 Thread Nikolaus Rath

Nikolaus Rath added the comment:

(refreshed patch, no changes)

--
Added file: http://bugs.python.org/file35648/issue20578_r6.diff

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



[issue8029] bug in 2to3 dealing with print FOO, followed by sys.stdout.write('')

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

@Benjamin could you review the patch please.

--
nosy: +BreamoreBoy
type:  - behavior
versions: +Python 2.7, Python 3.4, Python 3.5

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



[issue15954] No error checking after using of the wcsxfrm()

2014-06-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I have no Windows and can't provide relevant test case.

--

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



[issue8630] Keepends param in codec readline(s)

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

As codecs.py has changed I've generated a patch file which adds the missing 
parameters.  I looked at test_codecs.py but could only find one reference to 
the StreamReaderWriter class in WithStmtTest.  I'm sorry but I'll have to leave 
writing tests for StreamReaderWriter to somebody that's better qualified than 
myself.

--
keywords: +patch
nosy: +BreamoreBoy
Added file: http://bugs.python.org/file35649/Issue8630.patch

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



[issue21773] Fix a NameError in test_enum

2014-06-15 Thread Claudiu Popa

New submission from Claudiu Popa:

There's a bug in test_enum.TestStdLib.test_pydoc, print_diffs is undefined and 
using assertEqual seems to be clearer.

--
components: Tests
files: test_enum.patch
keywords: patch
messages: 220669
nosy: Claudiu.Popa, ethan.furman
priority: normal
severity: normal
status: open
title: Fix a NameError in test_enum
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file35650/test_enum.patch

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



[issue19714] Add tests for importlib.machinery.WindowsRegistryFinder

2014-06-15 Thread Claudiu Popa

Changes by Claudiu Popa pcmantic...@gmail.com:


--
stage: test needed - patch review
versions: +Python 3.5

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



[issue9008] CGIHTTPServer support for arbitrary CGI scripts

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

@Senthil Kumaran/orsenthil can you pick this up as implied in msg107919?

--
nosy: +BreamoreBoy
type:  - enhancement
versions: +Python 3.5 -Python 3.2

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



[issue19714] Add tests for importlib.machinery.WindowsRegistryFinder

2014-06-15 Thread Claudiu Popa

Claudiu Popa added the comment:

Attached a new version of the patch. The previous one called find_spec twice in 
the same test.

--
Added file: http://bugs.python.org/file35651/issue19714_2.patch

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



[issue15506] configure should use PKG_PROG_PKG_CONFIG

2014-06-15 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +doko

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



[issue21771] name of 2nd parameter to itertools.groupby()

2014-06-15 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +rhettinger

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



[issue21772] platform.uname() not EINTR safe

2014-06-15 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +lemburg

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



[issue15954] No error checking after using of the wcsxfrm()

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

@Serhiy you don't need Windows, msg170593 refers to a Linux man page.  Reading 
your msg170595 I'd guess that you've got confused with a similar function that 
is Windows specific.

--

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



[issue21774] Fix a NameError in xml.dom.minidom

2014-06-15 Thread Claudiu Popa

New submission from Claudiu Popa:

Hi. This patch fixes a NameError found in xml.dom.minidom. Here's an example 
for reproducing it:


from xml.dom import minidom
dom = minidom.parseString(a1/a)
pi = dom.createProcessingInstruction('xml-stylesheet',
 'type=text/xsl href=mystyle.xslt')
pi.nodeValue = 4

with output:


Traceback (most recent call last):
  File a.py, line 5, in module
pi.nodeValue = 4
  File C:\Python34\lib\xml\dom\minidom.py, line 979, in _set_nodeValue
self.data = data
NameError: name 'data' is not defined

--
components: Library (Lib)
files: minidom.patch
keywords: patch
messages: 220673
nosy: Claudiu.Popa
priority: normal
severity: normal
status: open
title: Fix a NameError in xml.dom.minidom
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file35652/minidom.patch

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



[issue21771] name of 2nd parameter to itertools.groupby()

2014-06-15 Thread Raymond Hettinger

Raymond Hettinger added the comment:

There is a bit an inconsistency but it is more helpful than harmful most of the 
time.  The glossary defines a key-function which is used in a number of places 
such such as sorted(), min(), nsmallest() and others.  In all those cases, the 
parameter for the key-function is *key*.

It might feel more consistent to call it key everywhere, but that leaves 
out the explanation that *key* represents a key-function.

The other issue is that groupby() returns a (key, sub-iterator) pair where 
key is the result of key-function, not the key itself.

What we have now is imperfect but it does a reasonably good job helping people 
understand what the function does.  IMO, changing it to be key would make the 
docs less intelligible.

Thank you for the patch, but I'm going to pass on it.

--
resolution:  - rejected
status: open - closed

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



[issue15955] gzip, bz2, lzma: add option to limit output size

2014-06-15 Thread Nadeem Vawda

Nadeem Vawda added the comment:

Sorry, I just haven't had any free time lately, and may still not be able
to give this the attention it deserves for another couple of weeks.

Serhiy, would you be interested in reviewing Nikolaus' patch?

--

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



[issue21774] Fix a NameError in xml.dom.minidom

2014-06-15 Thread Raymond Hettinger

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


--
assignee:  - rhettinger
nosy: +rhettinger

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



[issue21775] shutil.copytree() crashes copying to VFAT on Linux: AttributeError: 'PermissionError' object has no attribute 'winerror'

2014-06-15 Thread Greg Ward

New submission from Greg Ward:

When using shutil.copytree() on Linux to copy to a VFAT filesystem, it crashes 
like this:

Traceback (most recent call last):
  File /data/src/cpython/3.4/Lib/shutil.py, line 336, in copytree
copystat(src, dst)
  File /data/src/cpython/3.4/Lib/shutil.py, line 190, in copystat
lookup(chmod)(dst, mode, follow_symlinks=follow)
PermissionError: [Errno 1] Operation not permitted: '/mnt/example_nt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File copytree-crash.py, line 14, in module
shutil.copytree('PC/example_nt', '/mnt/example_nt')
  File /data/src/cpython/3.4/Lib/shutil.py, line 339, in copytree
if why.winerror is None:
AttributeError: 'PermissionError' object has no attribute 'winerror'

I am *not* complaining about the PermissionError. That has been issue1545. 
Rather, I'm complaining about the crash that happens while attempting to handle 
the PermissionError.

Reproducing this is fairly easy, although it requires root privilege.

1. dd if=/dev/zero of=dummy bs=1024 count=1024
2. mkfs.vfat -v dummy
3. sudo mount -o loop /tmp/dummy /mnt

Then create the reproduction script in the root of Python's source dir:

cat  copytree-crash.py EOF
import os
import shutil

# assumptions:
#   1. /mnt is a directory writeable by current user
#   2. /mnt is a VFAT filesystem
#   3. current OS is Linux-ish

if os.path.exists('/mnt/example_nt'):
print('cleaning up')
shutil.rmtree('/mnt/example_nt')

print('copying')
shutil.copytree('PC/example_nt', '/mnt/example_nt')
EOF

and run it:

sudo ./python copytree-crash.py

Crash happens as documented above.

--
components: Library (Lib)
messages: 220676
nosy: gward
priority: normal
severity: normal
status: open
title: shutil.copytree() crashes copying to VFAT on Linux: AttributeError: 
'PermissionError' object has no attribute 'winerror'
versions: Python 3.4

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



[issue21775] shutil.copytree() crashes copying to VFAT on Linux: AttributeError: 'PermissionError' object has no attribute 'winerror'

2014-06-15 Thread Greg Ward

Greg Ward added the comment:

In 3.3 and earlier, copytree() crashes roughly as described in issue1545, with 
shutil.Error that wraps the underlying Operation not permitted error from 
trying to chmod() something in a VFAT filesystem. Since this appears to 
accurately reflect what's coming from the kernel, I don't *think* this is a 
bug. Only the AttributeError, which is new in 3.4, is clearly a bug.

--
keywords: +3.4regression

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



[issue8677] Modules needing PY_SSIZE_T_CLEAN

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

Given the rise of the 64 bit machine I'd guess that this needs completing 
sooner rather than later.  I'd volunteer myself but I've never heard of the '#' 
format codes, let alone know anything about them :-(

--
nosy: +BreamoreBoy

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



[issue21775] shutil.copytree() crashes copying to VFAT on Linux: AttributeError: 'PermissionError' object has no attribute 'winerror'

2014-06-15 Thread Greg Ward

Greg Ward added the comment:

Bad news: because reproducing this requires sudo (to mount an arbitrary 
filesystem), I'm not sure it's possible/desirable to add test code for it.

Good news: the fix is trivial, and it passes my manual test. Here's a patch:

--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -336,7 +336,7 @@
 copystat(src, dst)
 except OSError as why:
 # Copying file access times may fail on Windows
-if why.winerror is None:
+if getattr(why, 'winerror', None) is None:
 errors.append((src, dst, str(why)))
 if errors:
 raise Error(errors)

Running test suite now to make sure this doesn't break anything else...

--

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



[issue21763] Clarify requirements for file-like objects

2014-06-15 Thread Nick Coghlan

Nick Coghlan added the comment:

Asking the question Does it quack and walk *enough* like a duck for my
code to work and my tests to pass? is part of the nature of ducktyping.

ABCs are definitely a useful guide to expectations, but even there it's
possible to lie to the interpreter and have required methods that raise
NotImplementedError, or do an explicit registration without implementing
the full interface.

--

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



[issue21774] Fix a NameError in xml.dom.minidom

2014-06-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ca33faa214ab by Raymond Hettinger in branch '3.4':
Issue #21774: Fix incorrect variable in xml.dom.minidom
http://hg.python.org/cpython/rev/ca33faa214ab

--
nosy: +python-dev

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



[issue21774] Fix a NameError in xml.dom.minidom

2014-06-15 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Thanks for the patch.

I'm curious how did you notice this?

--
resolution:  - fixed
status: open - closed
versions: +Python 3.4

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




[issue21774] Fix a NameError in xml.dom.minidom

2014-06-15 Thread Claudiu Popa

Claudiu Popa added the comment:

My pleasure. I run Pylint from time to time over stdlib in order to find false 
positives for Pylint and in the process I stumble across these type of bugs.

--

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



[issue4896] Faster why variable manipulation in ceval.c

2014-06-15 Thread Mark Lawrence

Mark Lawrence added the comment:

I'm guessing that a patch to ceval.c that's this old wouldn't apply cleanly 
now.  I'll rework it but only if the changes are highly likely to be accepted.  
Given the mixed results previously reported this is not guaranteed.  Opinions 
please.

--
nosy: +BreamoreBoy
type:  - performance
versions: +Python 3.4, Python 3.5 -Python 3.0, Python 3.1

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



[issue21763] Clarify requirements for file-like objects

2014-06-15 Thread Nikolaus Rath

Nikolaus Rath added the comment:

Maybe I'm missing some important point here, but I think that the documentation 
ought to tell me how I have to design a file-like object such that it fulfills 
all expectations of the standard library.

Yes, you can get away with less than that in many situations, but that doesn't 
mean that the documentation should not tell me about the full set of 
expectations.

--

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



[issue15795] Zipfile.extractall does not preserve file permissions

2014-06-15 Thread William Ehlhardt

Changes by William Ehlhardt williamehlha...@gmail.com:


--
nosy: +Orborde

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



[issue20928] xml.etree.ElementInclude does not include nested xincludes

2014-06-15 Thread R. David Murray

R. David Murray added the comment:

Thanks Caelyn.  This patch also needs a doc patch and a whatsnew entry in order 
to be complete.  It's not obvious to me where the relevant documentation is, 
though, so perhaps we instead have missing documentation that should be 
addressed in a separate issue.  The whatsnew entry would still be needed, 
though.

However, I think there is something important missing here in the patch itself. 
 It is specified (section 4.2.7 Inclusion Loops) that it is a fatal error for 
an already included document to be specified in a recursively processed 
xinclude directive, and indeed failing to detect such a loop has DOS 
implications.  So, the patch needs to address that before it can be committed.

--
nosy: +r.david.murray

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



[issue9008] CGIHTTPServer support for arbitrary CGI scripts

2014-06-15 Thread Martin Panter

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


--
nosy: +vadmium

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



[issue21763] Clarify requirements for file-like objects

2014-06-15 Thread Raymond Hettinger

Raymond Hettinger added the comment:

[R David Murray]
I don't think that's true, though.  file like pretty much means 
 has the file attributes that I actually use.  
 That is, it is context dependent (duck typing).

That is pretty much on-target.  

Also, the phrase file-like has been used very loosely from Python's 
inception.  Laying down a mandatory specification doesn't match the reality 
of how the phrase is used or the way our code has been written.

 Maybe I'm missing some important point here

Yes, I think you are.  That is evident in this and your other tracker items 
whose theme is there must be precisely documented rules for everything, all 
expectations, norms, cultural conventions, patterns must be written down, made 
precise, and enforced, etc.

Before creating more tracker items, please take time to learn about how 
Python's history, how it is used, and its cultural norms.  In particular, read 
the Zen of Python, consider what is meant by duck-typing, what is meant by a 
consenting adults language, what is meant by over-specification, etc.  Python 
is quite different from Java in this regard.

In a quest for tell me exactly what I have to do, I think you're starting to 
make-up new rules that don't reflect the underlying reality of  
the actual code or its intended requirements.

I recommend this tracker item be closed for the reasons listed by Nick Coghlan 
and David Murray.  I think the proposed patch doesn't make the docs better, and 
that it seeks to create new made-up rules rather than documenting the world as 
it actually exists.

Side-note:  The place to talk about what file-like means is the glossary.   
The ABC for files and the term file-like are related but are not equal.

--
nosy: +rhettinger

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



[issue19495] Enhancement for timeit: measure time to run blocks of code using 'with'

2014-06-15 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Perhaps a time-elapsed context manager would be a better fit in the contextlib 
module (which contains more general purpose 
macro-level tools usable for many different tasks)
rather than the timeit module (which is more
narrowly tailored to high-quality reproducable in-vitro performance analysis at 
a fine-grained level).

 It's a very common task.

That said, the task is sometimes solved in different ways.  Hard-wiring this to 
print would preclude its use in cases where you want to save the result to a 
variable, log it, or build some cumulative total-time statistics.

Also, I think it ignores some of the realities about how difficult it is to do 
meaningful performance analysis.
The cumsum example isn't the norm.  Most code is harder to time and doesn't 
have a high-volume tight-loop that you can that you can easily wrap a 
course-grained context manager around.  Getting reproduceable timings (creating 
a consistent setup, using repeated calls to average-out noise, and isolating 
the part you want to test) can be tricky in the middle of real applications.

I occasionally have code where the proposed content manager would have been 
nice (saving me from typing the usual start=time() ... end=time()-start pairs). 
 However, most of the time this technique is too simple and something like 
Robert Kern's line-profiler or cProfile are a better fit for identifying 
hotspots.

--
nosy: +ncoghlan

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



[issue20928] xml.etree.ElementInclude does not include nested xincludes

2014-06-15 Thread Raymond Hettinger

Raymond Hettinger added the comment:

FWIW, we often do whatsnew entries later in the development cycle.  I think 
this can go forward without whatsnew.

The doc entry could be as simple as a ..versionchanged 2.5 include() now 
supports recursive Xincludes or somesuch.

--
nosy: +rhettinger

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



[issue4896] Faster why variable manipulation in ceval.c

2014-06-15 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Before evaluating this further, the timings should be updated for the current 
3.5 code and using the various compilers for the difference OSes.  Also, it 
would be nice to run Antoine's suite of benchmarks.

--
nosy: +haypo, rhettinger
priority: normal - low
versions:  -Python 3.4

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



[issue19495] Enhancement for timeit: measure time to run blocks of code using 'with'

2014-06-15 Thread Steven D'Aprano

Steven D'Aprano added the comment:

On Mon, Jun 16, 2014 at 02:09:22AM +, Raymond Hettinger wrote:

 Perhaps a time-elapsed context manager would be a better fit in the 
 contextlib module (which contains more general purpose macro-level 
 tools usable for many different tasks) rather than the timeit module 
 (which is more narrowly tailored to high-quality reproducable in-vitro 
 performance analysis at a fine-grained level).

Perhaps you're right, but timeit is a fairly broad description, and I 
would expect anything related to the task time it to be found there. 
I'm +0.9 on timeit and +0.4 on contextlib.

Does anyone else have an opinion on where this belongs?

--

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



[issue19495] Enhancement for timeit: measure time to run blocks of code using 'with'

2014-06-15 Thread Guido van Rossum

Guido van Rossum added the comment:

I agree with Raymond -- this is a common pattern but there are many variations 
that are hard to catch in a single implementation. E.g. at Dropbox we have a 
decorator like this that lets you specify an identifier for the block you name, 
and which logs the measured times to a special log file. Then there is separate 
analysis software that shows the plots the average time for each named block 
over time. Incredibly useful, but hard to share the code.

I think that Jeff Preshing's blog post giving the basic idea (to which Steven's 
recipe links) is more useful than a implementation in the stdlib could ever be. 
Steven's class already has three keyword arguments, and that feels like either 
not enough or already too many, depending on your needs. It's too easy to 
bikeshed it to death. (E.g. the disable+restore gc feature could easily be 
moved into a separate decorator; and why not make the verbose printing a little 
more flexible by adding another parameter to either specify the file to print 
to or the function to be used to print. Oh, and the message could be 
customizable. Then again, you might want to subclass this in order to do all 
those customizations, eventually allowing this to be used as the basis for e.g. 
the Dropbox version. Etc. Not that I propose to go that way -- I'm just 
bringing this up to indicate how hopeless it would be to try and put some 
version in the stdlib.)

--

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



[issue19495] Enhancement for timeit: measure time to run blocks of code using 'with'

2014-06-15 Thread Guido van Rossum

Guido van Rossum added the comment:

FWIW, I definitely don't think this belongs in the timeit module, unless you 
are going to treat that module as a namespace package, which I don't like 
much (though in Java I think it's a pretty common pattern). If we have to have 
it, contextlib sounds fine (it's a grab-bag already). The sub-idea of a context 
manager to disable gc (or perhaps manipulate other state of the gc module) 
sounds fine even if you follow my recommendation not to add the timer context 
manager to the stdlib.

--

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



[issue13779] os.walk: bottom-up

2014-06-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 351c1422848f by Benjamin Peterson in branch '2.7':
clarify when the list of subdirectories is read (closes #13779)
http://hg.python.org/cpython/rev/351c1422848f

New changeset b10322b5ef0f by Benjamin Peterson in branch '3.4':
clarify when the list of subdirectories is read (closes #13779)
http://hg.python.org/cpython/rev/b10322b5ef0f

New changeset 1411df211159 by Benjamin Peterson in branch 'default':
merge 3.4 (#13779)
http://hg.python.org/cpython/rev/1411df211159

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

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

2014-06-15 Thread Raymond Hettinger

Raymond Hettinger added the comment:

There are a couple things I really like about this idea:

* In the past, we've had cases of TestXXX classes being omitted, so chunks of 
the test suite weren't being run.  You patch will fix that and let test 
discovery just work.

* The code is shorter, more idiomatic, and matches the way most users of 
unittest run their code.

I've added a number of stakeholders to the nosy list so they will have a chance 
to chime in.

--
nosy: +brett.cannon, michael.foord, rhettinger
versions:  -Python 3.4

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



[issue5207] extend strftime/strptime format for RFC3339 and RFC2822

2014-06-15 Thread Martin Panter

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


--
nosy: +vadmium

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



[issue21767] singledispatch docs should explicitly mention support for abstract base classes

2014-06-15 Thread Martin Panter

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


--
nosy: +vadmium

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



[issue5207] extend strftime/strptime format for RFC3339 and RFC2822

2014-06-15 Thread Martin Panter

Martin Panter added the comment:

For RFC 2822, perhaps email.utils.parsedate() is good enough?

For RFC 3339, Issue 15873 has been opened for the datetime module. It has 
more discussion and code, so perhaps this bug can be closed as a duplicate?

--

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