[issue25883] python 2.7.11 mod_wsgi regression on windows

2015-12-17 Thread stephan

stephan added the comment:

OK, I renamed:

 HKLM\Software\Wow6432Node\Python\PythonCore\2.7\PythonPath
to
 HKLM\Software\Wow6432Node\Python\PythonCore\2.7-32\PythonPath

and now it works again.

So I'll wait for python 2.7.12 :-)

Thanks Steve

--

___
Python tracker 

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



[issue25894] unittest subTest failure causes result to be omitted from listing

2015-12-17 Thread Zachary Ware

Zachary Ware added the comment:

Martin Panter added the comment:
> Okay, so you have a test with subtests. You have presented three cases:
>
> 1. Single subtest which passes. No problem I assume.

Or several subtests which pass.  No problems.

> 2. Two subtests: 1st fails, 2nd passes. This is how subtests are normally 
> used, so I guess there is no problem. Is that right?

Any of multiple subtests fail, and there is no indication in the
"summary line" (the line that is usually "..",
a dot for each successful test).  When a a regular test fails, an F
(or an E, if the raised exception was anything but
self.failureException) is added to the line; when any subtests fail,
nothing is added.  If you have 10 tests methods that use subtests, and
any subtest in each method fails, your summary line will be blank.  In
verbose mode, you'd get "test_one ... test_two ... test_three ... ..."
(note lack of newlines) instead of the expected "test_one ...
FAILURE\ntest_two ... FAILURE\ntest_three ... FAILURE\n..." (note the
newlines).

> 3. After two subtests have already run (one of which failed), SkipTest is 
> raised. I guess you want the test results to be reported better in this case.
>
> What is the use case? Why not skip the test before any subtests are started?

Only the subtest is skipped (which should be valid, or documented as
not valid), and the order of the subtests doesn't matter:

$ tests=210 ./python.exe subtest_test.py -v
test_subTest (__main__.TestClass) ... skipped 'skipped'

==
FAIL: test_subTest (__main__.TestClass) ()
--
Traceback (most recent call last):
  File "subtest_test.py", line 14, in test_subTest
self.assertTrue(t)
AssertionError: 0 is not true

--
Ran 1 test in 0.001s

FAILED (failures=1, skipped=1)

But, the summary makes it seem as though the entire test was skipped.

Hopefully this makes it a bit clearer :)

--

___
Python tracker 

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



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2015-12-17 Thread Martin Panter

Martin Panter added the comment:

If the timespec allowed any arbitrary number of digits after the decimal point, 
that would remove any argument about nanoseconds not being supported. It would 
also mean I could use this in one case where I currently format to two decimal 
places (my compromise between accurate timestamps and excessive information). 
Just a suggestion :)

--

___
Python tracker 

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



[issue25880] u'..'.encode('idna') → UnicodeError: label empty or too long

2015-12-17 Thread SpaceOne

SpaceOne added the comment:

It makes error handling really hard.
Here is a patch:
https://github.com/python/cpython/compare/master...spaceone:idna?expand=1

--
status: closed -> open

___
Python tracker 

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



[issue25809] "Invalid" tests on locales

2015-12-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bb7a19e42566 by Martin Panter in branch '3.4':
Issue #25809: Skip testing platform-dependent French thousands separator
https://hg.python.org/cpython/rev/bb7a19e42566

--

___
Python tracker 

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



[issue25885] ast Str type does not annotate the string type when it parses a python document

2015-12-17 Thread STINNER Victor

STINNER Victor added the comment:

> Would it be prudent to add a Parse flag to the AST module that could provide 
> one of two types of AST's an optimized AST or a complete AST

Adding syntax ("formatting", call it as you want) info to AST requires
to add new attributes to existing AST nodes and probably add new AST
nodes. It will make the code more complex, not only the code to
produce AST, but also code using AST (static code analyzer, my AST
optimizer project, etc.).

I don't think that it's worth it.

--

___
Python tracker 

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



[issue25885] ast Str type does not annotate the string type when it parses a python document

2015-12-17 Thread STINNER Victor

STINNER Victor added the comment:

If you consider that we are wrong, please follow the advice of
starting a discussion on python-ideas. This is how Python is
developed, we have a workflow. Proposing ideas on the bug tracker
works in some cases, but AST is really a *core* feature of Python. You
need deep discussions to change the core. To be cristal clear: *if*
anyone is going to change AST, IMHO a PEP is needed. Writing a PEP
requires a specific workflow starting at python-ideas.

--

___
Python tracker 

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



[issue19587] Remove empty tests in test_bytes.FixedStringTest

2015-12-17 Thread Martin Panter

Martin Panter added the comment:

test_contains() does not appear to be overriding anything, so there is no 
problem removing that.

Unmasking the other three methods will allow six new test methods to run (via 
ByteArrayAsStringTest and BytesAsStringTest). There are already three 
equivalent methods defined in buffer_tests.py run via BytearrayPEP3137Test. I 
suggest to remove those three from buffer_tests. The net result will be the 
same tests run for bytes(), and three new tests for bytearray(). The 
buffer_tests file is not used anywhere else.

--
nosy: +martin.panter
versions: +Python 3.5, Python 3.6 -Python 3.3, Python 3.4
Added file: http://bugs.python.org/file41335/test_bytes.v3.diff

___
Python tracker 

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



[issue25880] u'..'.encode('idna') → UnicodeError: label empty or too long

2015-12-17 Thread R. David Murray

R. David Murray added the comment:

Can you explain why it makes error handling hard?  I'm still not seeing the use 
case.  I've always viewed UnicodeEncodeError vs UnicodeDecodeError as "extra" 
information for the consumer of the error message, not something that matters 
in code (I just catch UnicodeError).

I'm not objecting to the change, but it might be nice to know why Martin chose 
plain UnicodeError, if he's got the time to answer.

--
nosy: +loewis

___
Python tracker 

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



[issue25880] u'..'.encode('idna') → UnicodeError: label empty or too long

2015-12-17 Thread SpaceOne

SpaceOne added the comment:

Because i need to do everywhere where I use this:

try:
user_input.encode(encoding)
except UnicodeDecodeError:
raise
except (UnicodeError, UnicodeEncodeError):
do_my_error_handling()

instead of
try:
user_input.encode(encoding)
except UnicodeEncodeError:
do_my_error_handling()

--

___
Python tracker 

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



[issue25809] "Invalid" tests on locales

2015-12-17 Thread koobs

koobs added the comment:

Thank you all. A+++, would collaborate again.

--

___
Python tracker 

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



[issue25894] unittest subTest failure causes result to be omitted from listing

2015-12-17 Thread R. David Murray

R. David Murray added the comment:

I believe this was discussed at the time subTest was added and deemed an 
acceptable tradeoff for a simpler implementation.  I'm not sure it is, but I'm 
not prepared to write code to fix it :)  I'm bothered every time I see this, 
but I have to admit that the tracebacks are the most important feedback and you 
do get those.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue25885] ast Str type does not annotate the string type when it parses a python document

2015-12-17 Thread Eric V. Smith

Eric V. Smith added the comment:

I agree that the proposed change would require a PEP, and this should be 
discussed on python-ideas.

I also think there's very little chance such a change would be accepted, but 
that doesn't mean it's impossible.

I think using a external library is your best bet here. If you want to pursue 
this on python-ideas, you should discuss why being in the stdlib's ast module 
would be an improvement over using an external library.

--
nosy: +eric.smith
status: open -> closed

___
Python tracker 

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



[issue25880] u'..'.encode('idna') → UnicodeError: label empty or too long

2015-12-17 Thread SilentGhost

SilentGhost added the comment:

I think what David was trying to say is that you could do

try:
user_input.encode(encoding)
except UnicodeError:
do_my_error_handling()

since UnicodeError is a super class of UnicodeDecodeError and 
UnicodeEncodeError.

--
nosy: +SilentGhost

___
Python tracker 

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



[issue25880] u'..'.encode('idna') → UnicodeError: label empty or too long

2015-12-17 Thread SpaceOne

SpaceOne added the comment:

I know that UnicodeEncodeError is a subclass of UnicodeError. The problem here 
is that UnicodeError would also catch UnicodeDecodeError.
This is especially disturbing if you catch errors of a whole function.

If you e.g. use python2.7 you might want to catch only UnicodeEncodeError if 
you encode something and don't want to catch UnicodeDecodeError.

>>> b'\xff'.encode('utf-8')
Traceback (most recent call last):
  File "", line 1, in 
UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal 
not in range(128)

(Read that code carefully!!! It's not something which should ever be done but 
might happen in the world)
Especially if you are writing python2+3 compatible applications.

--

___
Python tracker 

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



[issue25882] argparse help error: arguments created by add_mutually_exclusive_group() are shown outside their parent group created by add_argument_group()

2015-12-17 Thread paul j3

paul j3 added the comment:

Argument groups are not designed to be nested.

If you print_help the parent parser, you'll see that the sub_args are missing 
entirely, not just displaced.  They appear in the usage, but not the help 
lines.  sub_group has no record that it was added to global_group (it doesn't 
have the ._container attribute).  

All containers, both parsers and groups, have a ._action_groups list (inherited 
from their common super), but I don't think any of the group code uses that 
list.  And the part of the help_formatter than handles groups is not recursive. 
 It handles just one level of groups.

I suspect the sub_group actions appear in the 'optional arguments' group for 
similar reasons as with the mutually_exclusive_group, but the details probably 
differ.

There have been a number of questions on SO about using argument_groups to add 
actions to a mutually_exclusive_group.  They either want a convenient way of 
adding a group of actions, or they want some sort of 'any'  logic applied to 
the subgroup.  We've had to say - no you can't nest groups like that.  I have 
explored in another bug/issue the idea of nesting groups and applying all sorts 
of logic (not just xor), but that's a big issue.

--

___
Python tracker 

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



[issue25887] awaiting on coroutine more than once should be an error

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

Please review the attached patch.

--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file41336/Issue25887.patch

___
Python tracker 

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



[issue25887] awaiting on coroutine more than once should be an error

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

New patch -- added more tests, made gen_send_ex() to always raise an error if 
the genobject is an exhausted coroutine.

--
Added file: http://bugs.python.org/file41337/Issue25887_2.patch

___
Python tracker 

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



[issue25888] awaiting on coroutine that is being awaited should be an error

2015-12-17 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue25887] awaiting on coroutine more than once should be an error

2015-12-17 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue25896] array.array accepting byte-order codes in format strings

2015-12-17 Thread Zoinkity .

New submission from Zoinkity .:

I'd like to propose allowing the use of byte-order characters in the typecode 
string used by the array.array class.  

This removes any ambiguity on the order of the data, especially when that data 
is not known and loaded from an outside source.  You wouldn't need to presume 
little or big endian machine byteorder or test the system to determine this.  
Also, it removes the necessity of byteswapping data that isn't in the correct 
order.

--
components: Extension Modules
messages: 256614
nosy: Zoinkity..
priority: normal
severity: normal
status: open
title: array.array accepting byte-order codes in format strings
type: enhancement
versions: Python 3.6

___
Python tracker 

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



[issue24505] shutil.which wrong result on Windows

2015-12-17 Thread Toby Tobkin

Toby Tobkin added the comment:

Patch and tests attached. All Python tests passed on Windows 8 and Ubuntu 
14.04LTS.

--
keywords: +patch
Added file: http://bugs.python.org/file41338/issue 24505 proposed patch windows 
cmd semantics.patch

___
Python tracker 

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



[issue25897] Python 3.5.1 and Active Tcl/Tk 8.6.4.1

2015-12-17 Thread G

New submission from G:

I have installed one copy of Python 3.5.1 and Tcl/Tk 8.6.4.1 in a high school 
lab with 28 more computers. Want to be sure I'm doing it correctly. Before the 
update we were running Python 2.7.10 and always got a warning: Tcl/Tk (8.5.9) 
may be unstable. I'm still getting the same warning after installing Tcl/Tk 
8.6.4.1 . What to I need to do so 3.5.1 sees the correct Tcl/Tk file? What does 
unstable in this context mean? We had no issues I was aware of.

--
files: python update 1.png
messages: 256616
nosy: ccgm
priority: normal
severity: normal
status: open
title: Python 3.5.1 and Active Tcl/Tk 8.6.4.1
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file41340/python update 1.png

___
Python tracker 

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



[issue25897] Python 3.5.1 and Active Tcl/Tk 8.6.4.1

2015-12-17 Thread Ned Deily

Ned Deily added the comment:

Please read the information at the web page linked to in that message you have 
been seeing:  https://www.python.org/download/mac/tcltk/.  As explained there, 
the current Pythons downloaded from python.org for OS X dynamically link with 
Tcl/Tk 8.5.x, not 8.6.x.  You should download and install the latest ActiveTcl 
8.5 version for OS X which is currently 8.5.18.0 from 
http://www.activestate.com/activetcl/downloads.  You don't need to uninstall 
the 8.6.5.1 version that you've already installed; it will be ignored.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue25888] awaiting on coroutine that is being awaited should be an error

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

The patch is attached, please review.

--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file41339/Issue25888.patch

___
Python tracker 

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



[issue25897] Python 3.5.1 and Active Tcl/Tk 8.6.4.1

2015-12-17 Thread SilentGhost

Changes by SilentGhost :


--
components: +IDLE, Macintosh, Tkinter
nosy: +gpolo, ned.deily, ronaldoussoren, serhiy.storchaka

___
Python tracker 

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



[issue25898] Check for subsequence inside a sequence

2015-12-17 Thread Josh Rosenberg

Josh Rosenberg added the comment:

Aho Corasick doesn't seem likely to be useful here; it's good if the haystack 
is huge (or you have many haystacks to search) and you have many needles to 
look for (and the needles never change), but it pays a fairly steep setup cost; 
for a utility that searches for a single subsequence once, with no history, 
Aho-Corasick wouldn't help much.

A variant on Boyer-Moore (which involves less preprocessing work on the needle) 
might help, but I'm not sure the feature is compelling enough to warrant 
acceleration in the first place.

--

___
Python tracker 

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



[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2015-12-17 Thread Swati Jaiswal

Swati Jaiswal added the comment:

Okay, so should I go for a patch for it? And sorry if it sounds naive, but do 
we provide the work around or the user would implement if they purposely want 
it. If we provide it, then where should it be written?

--

___
Python tracker 

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



[issue2466] os.path.ismount doesn't work for mounts the user doesn't have permission to see

2015-12-17 Thread Robin Roth

Robin Roth added the comment:

any comments/updates on merging this?

--

___
Python tracker 

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



[issue25893] Second variable DWORD reqdSize in getpythonregpath is initialized but not used

2015-12-17 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka
versions: +Python 3.6

___
Python tracker 

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



[issue25892] PyObject *exc in encode_code_page_strict is initialized but not used

2015-12-17 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka
versions: +Python 3.6

___
Python tracker 

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



[issue25898] Check for subsequence inside a sequence

2015-12-17 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> rhettinger

___
Python tracker 

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



[issue25893] Second variable DWORD reqdSize in getpythonregpath is initialized but not used

2015-12-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 12ca4a3695f9 by Serhiy Storchaka in branch '3.5':
Issue #25893: Removed unused variable reqdSize.
https://hg.python.org/cpython/rev/12ca4a3695f9

New changeset b72736cfc904 by Serhiy Storchaka in branch 'default':
Issue #25893: Removed unused variable reqdSize.
https://hg.python.org/cpython/rev/b72736cfc904

--
nosy: +python-dev

___
Python tracker 

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



[issue19587] Remove empty tests in test_bytes.FixedStringTest

2015-12-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Currently buffer_tests.py is used only for bytearray, and it looks that it 
duplicates string_tests.py. May be remove all duplicated tests and move the 
rest of tests (if any) just into test_bytes.py?

--

___
Python tracker 

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



[issue25898] Check for subsequence inside a sequence

2015-12-17 Thread Josh Rosenberg

Josh Rosenberg added the comment:

A utility like this seems like it would belong in `itertools`, not 
`collections`. It should also ideally avoid fully realizing the sequence so it 
could work with iterators/generators as well; PySequence_Fast will force 
creation of a `list`/`tuple` of the whole sequence when in practice, a `deque` 
with a maxlen could be used to only maintain the necessary window into the 
"haystack".

It would also help to have a pure Python implementation (and until you have 
one, it's probably overkill to write the C accelerator) for other Python 
distributions, and to serve as a baseline for comparison to see if a C 
accelerator is justified.  Something like this might be a decent point of 
comparison:

def has_subsequence(it, searchseq, *, all=all, map=map, eq=operator.eq):
searchseq = tuple(searchseq)
if not searchseq:
return True  # Empty sequence in everything
window = collections.deque(itertools.islice(it, len(searchseq)-1), 
len(searchseq))
for x in it:
window.append(x)
if all(map(eq, window, searchseq)):
return True
return False

--
nosy: +josh.r

___
Python tracker 

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



[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2015-12-17 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> rhettinger

___
Python tracker 

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



[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2015-12-17 Thread Swati Jaiswal

Swati Jaiswal added the comment:

@Andrew Barnert,
sorry, I didn't get your previous messages so please ignore the last message i 
sent. I got your point i.e. We just need to provide the TypeError in the 
Mapping. And the work around is never implemented.
Should I go for the patch with it?

--

___
Python tracker 

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



[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The patch LGTM (but I prefer reordering solution).

--
stage: patch review -> commit review
type:  -> behavior
versions:  -Python 3.3, Python 3.4

___
Python tracker 

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



[issue25891] Stray variable meth_idx in enable_symlink

2015-12-17 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka
versions: +Python 3.6

___
Python tracker 

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



[issue25889] Find_BOM accepts a char*, but is passed an unsigned char*; and related usage

2015-12-17 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka
versions: +Python 3.6

___
Python tracker 

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



[issue25890] PyObject *po in _listdir_windows_no_opendir is initialized but not used

2015-12-17 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka
versions: +Python 3.6

___
Python tracker 

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



[issue25899] Unnecessary non-ASCII characters in standard library

2015-12-17 Thread Chris Angelico

New submission from Chris Angelico:

Discussion on python-list led to searching out unnecessary non-ASCII in the 
stdlib. While there are places where non-ASCII text is good and worthwhile (eg 
in comments identifying people such as Łukasz Langa, Peter Åstrand, Martin v. 
Löwis, and Gerhard Häring, or code specifically demonstrating or implementing 
non-ASCII behaviour), there are some instances which are unnecessary. Attached 
is a patch converting apostrophes, dashes, and one space.

--
components: Library (Lib)
files: asciify.diff
keywords: patch
messages: 256647
nosy: Rosuav
priority: normal
severity: normal
status: open
title: Unnecessary non-ASCII characters in standard library
versions: Python 3.6
Added file: http://bugs.python.org/file41344/asciify.diff

___
Python tracker 

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



[issue25608] ascynio readexactly() should raise ValueError if passed length <= 0 in argument

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

This issue is now resolved (see https://github.com/python/asyncio/pull/298)

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

___
Python tracker 

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



[issue25683] __context__ for yields inside except clause

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

I now don't think this is a bug.

In the above example, SubError is instantiated outside of `main` generator.  
It's also thrown *into* `main` from the *outside* scope.  And __context__ 
should be set for exceptions that were originated by the code that was handling 
other exceptions.

Closing this issue with 'not a bug'.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue25895] urllib.parse.urljoin does not handle WebSocket URLs

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

> The documentation should probably also be updated. It has a list of supported 
> schemes. 

I agree. Gergely, do you want to update your patch?

> I imagine this would have to be taken as a new feature for 3.6+, rather than 
> a bug fix.

Since urlparse can parse wss:// addresses, *but* urljoin can't work with them, 
I think we can classify this as a bug fix patch.

--

___
Python tracker 

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



[issue25897] Python 3.5.1 and Active Tcl/Tk 8.6.4.1

2015-12-17 Thread G

G added the comment:

Thank you very much

Sent from George Moreno's iPhone

> On Dec 17, 2015, at 14:48, SilentGhost  wrote:
> 
> 
> Changes by SilentGhost :
> 
> 
> --
> components: +IDLE, Macintosh, Tkinter
> nosy: +gpolo, ned.deily, ronaldoussoren, serhiy.storchaka
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue25612] nested try..excepts don't work correctly for generators

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

I closed issue #25683 as "not a bug".  So it's just this issue that we need to 
fix.

Anyone wants to review the patch? :)  Since the code involved here is quite 
complex, I don't want to commit this patch without a thorough review.

--

___
Python tracker 

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



[issue25580] async and await missing from token list

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

Ah, I see that issue25580_2.diff does exactly what I proposed.  I'm committing 
it.

--
keywords: +easy

___
Python tracker 

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



[issue25897] Python 3.5.1 and Active Tcl/Tk 8.6.4.1

2015-12-17 Thread G

G added the comment:

Thank you very much. 

Sent from George Moreno's iPhone

> On Dec 17, 2015, at 15:12, Ned Deily  wrote:
> 
> 
> Ned Deily added the comment:
> 
> Please read the information at the web page linked to in that message you 
> have been seeing:  https://www.python.org/download/mac/tcltk/.  As explained 
> there, the current Pythons downloaded from python.org for OS X dynamically 
> link with Tcl/Tk 8.5.x, not 8.6.x.  You should download and install the 
> latest ActiveTcl 8.5 version for OS X which is currently 8.5.18.0 from 
> http://www.activestate.com/activetcl/downloads. You don't need to uninstall 
> the 8.6.5.1 version that you've already installed; it will be ignored.
> 
> --
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue25782] CPython hangs on error __context__ set to the error itself

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

A new patch is attached.  Please review.

I decided to remove the fix for recursive __cause__.  Currently, `raise e from 
e` doesn't cause any problem, and if we fix the interpreter to raise an 
RuntimeError in such cases it will be a backwards incompatible change.  I don't 
see any point in introducing such a change in a bugfix Python release.  We can 
open a separate issue for 3.6 though.

Fixing __context__ in 3.5.2 is way more important, since the interpreter can 
actually infinitely loop itself in some places.  And since there is no syntax 
for setting __context__ manually (as opposed to __cause__ via raise .. from), I 
suspect that there will be much less people affected by this fix.

--
stage:  -> patch review
Added file: http://bugs.python.org/file41341/Issue25782_4.patch

___
Python tracker 

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



[issue25272] asyncio tests are getting noisy

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

I think I've fixed all of these:

https://github.com/python/asyncio/commit/cd4fdbb9ccd7c41a4e7c6b416bb2481ab0e21e1c
https://github.com/python/asyncio/commit/1365ac3a37836c6ec50138df8d64a87cdd0ac494
https://github.com/python/asyncio/commit/ae30b2b4244f1526d422500a1313c0c3dfd72dfe
https://github.com/python/asyncio/commit/5672730e26c555485447694e576c98d2a49341b9

I also updated asyncio/runtests.py to print out all warnings:

https://github.com/python/asyncio/commit/f25127c24aa8ca94960b5c012eb72afcef14403a

Closing this issue.

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

___
Python tracker 

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



[issue25580] async and await missing from token list

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

> My only background here is via the tokenize module, which seems to currently 
> behave as described in 
> : async and await 
> are either NAME tokens (like ordinary identifiers and other reserved 
> keywords) outside a coroutine definition, but they become special ASYNC and 
> AWAIT tokens inside a coroutine.


Exactly.  And in 3.7 they will be NAME tokens in any context.  That's why I'm 
reluctant to document them atm.

--

___
Python tracker 

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



[issue25580] async and await missing from token list

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

Thanks for the patch!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> enhancement

___
Python tracker 

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



[issue25580] async and await missing from token list

2015-12-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset aa79b2a5b2e1 by Yury Selivanov in branch '3.5':
docs: Document ASYNC/AWAIT tokens (issue #25580)
https://hg.python.org/cpython/rev/aa79b2a5b2e1

--
nosy: +python-dev

___
Python tracker 

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



[issue14911] generator.throw() documentation inaccurate

2015-12-17 Thread Yury Selivanov

Yury Selivanov added the comment:

Martin, could you please rebase your patch on top of recent cpython default 
branch, so that a 'review' link appears?

--

___
Python tracker 

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



[issue21815] imaplib truncates some untagged responses

2015-12-17 Thread Maciej Szulik

Maciej Szulik added the comment:

Lita if you still have problems or want to ask questions reach out to me on 
IRC, I'm soltysh on freenode.

--

___
Python tracker 

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



[issue25809] "Invalid" tests on locales

2015-12-17 Thread Martin Panter

Martin Panter added the comment:

3.4 buildbot is fixed now

--
status: open -> closed

___
Python tracker 

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



[issue25878] CPython on Windows builds with /W3, not /W4

2015-12-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Alexander for your work. I agree that we have to use maximal warning 
level available in the compiler, and specially disable those warning categories 
that produces mainly false positives with CPython sources. See also similar 
issue23545 about GCC.

And of course I concur with Martin that we have first fix all non-false 
warnings before increase warning level (as we have done for GCC), and it would 
be better to do this in separate issues.

--
components: +Build
nosy: +serhiy.storchaka
stage:  -> patch review
type:  -> enhancement
versions: +Python 3.6

___
Python tracker 

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



[issue25809] "Invalid" tests on locales

2015-12-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Martin.

--

___
Python tracker 

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



[issue1753718] base64 "legacy" functions violate RFC 3548

2015-12-17 Thread R. David Murray

R. David Murray added the comment:

The altchars 2 char limit is an assertion.  That's a bug that should be dealt 
with separately.  Either it should be turned into an error, or it should be 
dropped to match the docs.  Probably the latter, since it is documented as OK 
and it might break code that is currently working in -O mode or on python2.

--

___
Python tracker 

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



[issue1753718] base64 "legacy" functions violate RFC 3548

2015-12-17 Thread R. David Murray

R. David Murray added the comment:

Fixed the spurious 'u'.

--
Added file: http://bugs.python.org/file41343/issue-01753718.patch

___
Python tracker 

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



[issue1753718] base64 "legacy" functions violate RFC 3548

2015-12-17 Thread R. David Murray

R. David Murray added the comment:

"or on python2" should be "or ported from python2".

Also note that Nick's commit message specifically mentions a test for 
multi-dimensional input, so the module does indeed conform to the current 
bytes-like object definition in that regard.

--

___
Python tracker 

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



[issue25898] Check for subsequence inside a sequence

2015-12-17 Thread Emanuel Barry

Emanuel Barry added the comment:

Reviewed the Python code (unlike what my email said, it doesn't LGTM; I'm tired 
and just forgot). I checked the C code for the obvious pitfalls (didn't spot 
any), but it will require someone else better than me to look at it.

--
nosy: +ebarry
stage:  -> patch review

___
Python tracker 

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



[issue25898] Check for subsequence inside a sequence

2015-12-17 Thread Марк Коренберг

Марк Коренберг added the comment:

Really optimal search algorithm should be something like that:

https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm

--
nosy: +mmarkk

___
Python tracker 

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



[issue25882] argparse help error: arguments created by add_mutually_exclusive_group() are shown outside their parent group created by add_argument_group()

2015-12-17 Thread Balázs Regényi

Balázs Regényi added the comment:

paul.j3, thx the the patch, it is perfect!!!

--

___
Python tracker 

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



[issue25882] argparse help error: arguments created by add_mutually_exclusive_group() are shown outside their parent group created by add_argument_group()

2015-12-17 Thread Balázs Regényi

Balázs Regényi added the comment:

Unfortunately the problem consists in case of normal sub-group too :(.

If you complete my previous example code with the next code, then the problem 
can be seen:

sub_group = global_group.add_argument_group()
sub_group.add_argument("--sub-arg1")
sub_group.add_argument("--sub-arg2")

Part of unexpected output:

optional arguments:
  -h, --helpshow this help message and exit
  --sub-arg1 SUB_ARG1
  --sub-arg2 SUB_ARG2
  --child-arg1 CHILD_ARG1
  --child-arg2 CHILD_ARG2



Is there a patch for it too? :)

--

___
Python tracker 

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



[issue25898] Check for subsequence inside a sequence

2015-12-17 Thread Sebastian Linke

New submission from Sebastian Linke:

With the attached patch I propose to add a new function to the "collections" 
module. It is meant to be used for determining whether a given subsequence is 
part of a particular sequence (with respect to the ordering of the 
subsequence). 

Doing this in pure Python (using the CPython interpreter) is relatively slow. 
So I did the implementation in C.

--
components: Library (Lib)
files: has_subsequence.patch
keywords: patch
messages: 256633
nosy: seblin
priority: normal
severity: normal
status: open
title: Check for subsequence inside a sequence
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file41342/has_subsequence.patch

___
Python tracker 

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



[issue25898] Check for subsequence inside a sequence

2015-12-17 Thread Ethan Furman

Changes by Ethan Furman :


--
nosy: +rhettinger

___
Python tracker 

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



[issue1753718] base64 "legacy" functions violate RFC 3548

2015-12-17 Thread R. David Murray

R. David Murray added the comment:

The intent of the term "bytes-like object" it to make it possible to use it in 
documentation in the way I have used it here.  That the buffer has a len is 
clearly discussed in the Buffer Protocol documentation, but of course that's 
only talking about the C level API.  Perhaps what is needed is an addition to 
the bytes-like object description that clarifies that a bytes-like object is a 
Sequence that supports the buffer protocol?  (So: "A Sequence object that 
supports the Buffer Protocol and...")  Do we also need to clarify that the item 
size must be one byte?  That would seem to me to be implicit in the name.

I don't know if what ctypes produces is a bytes-like object in this sense, 
since I don't understand ctypes very well, but it sounds like it isn't.  Trying 
to wrap it in a memoryview gives an error ('unsupported format 

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



[issue25894] unittest subTest failure causes result to be omitted from listing

2015-12-17 Thread Martin Panter

Martin Panter added the comment:

Yes now I understand. If a subtest fails, there is no status update (not even a 
newline in verbose mode), and each subtest skip triggers a separate status 
update.

My gut feeling is that any subtest failure should be counted as the whole test 
failing. I’m not sure how the failure vs error cases should be handled. Maybe 
error should trump failure.

Judging by , Antoine intended for 
SkipTest to skip subtests. But I’m not sure that be reported as the whole test 
being skipped.

--

___
Python tracker 

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



[issue25836] Documentation of MAKE_FUNCTION/MAKE_CLOSURE_EXTENDED_ARG is misleading

2015-12-17 Thread Russell Keith-Magee

Russell Keith-Magee added the comment:

It turns out I wasn't completely correct. As per my second point, the 
interpretation of annotations needs be clarified, but my first point about 
default_args including the annotation count is incorrect. 

My error was made because of the documentation for EXTENDED_ARG. The current 
text implies that you need to combine the argument value of the EXTENDED_ARG 
opcode with the argument value for the previous opcode. However if you're using 
dis.Bytecode() to extract bytecodes, that composition is done for you - you can 
effectively ignore the EXTENDED_ARG opcode.

--
title: Documentation of MAKE_FUNCTION is still incorrect -> Documentation of 
MAKE_FUNCTION/MAKE_CLOSURE_EXTENDED_ARG is misleading

___
Python tracker 

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