[issue24657] CGIHTTPServer module discard continuous '/' letters from params given by GET method.

2015-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 634fe6a90e0c by Martin Panter in branch '3.4':
Issue #24657: Prevent CGIRequestHandler from collapsing the URL query
https://hg.python.org/cpython/rev/634fe6a90e0c

New changeset ba1e3c112e42 by Martin Panter in branch '3.5':
Issues #25232, #24657: Merge two CGI server fixes from 3.4 into 3.5
https://hg.python.org/cpython/rev/ba1e3c112e42

New changeset 88918f2a54df by Martin Panter in branch '3.5':
Issues #25232, #24657: Use new enum status to match rest of tests
https://hg.python.org/cpython/rev/88918f2a54df

New changeset 0f03023d4318 by Martin Panter in branch 'default':
Issues #25232, #24657: Merge two CGI server fixes from 3.5
https://hg.python.org/cpython/rev/0f03023d4318

New changeset 3c006ee38287 by Martin Panter in branch 'default':
Issues #25232, #24657: Add NEWS to 3.6.0a1 section
https://hg.python.org/cpython/rev/3c006ee38287

--
nosy: +python-dev

___
Python tracker 

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



[issue25232] CGIRequestHandler behave incorrectly with query component consisting mutliple ?

2015-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 969afbf501af by Martin Panter in branch '3.4':
Issue #25232: Fix CGIRequestHandler's splitting of URL query
https://hg.python.org/cpython/rev/969afbf501af

New changeset ba1e3c112e42 by Martin Panter in branch '3.5':
Issues #25232, #24657: Merge two CGI server fixes from 3.4 into 3.5
https://hg.python.org/cpython/rev/ba1e3c112e42

New changeset 88918f2a54df by Martin Panter in branch '3.5':
Issues #25232, #24657: Use new enum status to match rest of tests
https://hg.python.org/cpython/rev/88918f2a54df

New changeset 0f03023d4318 by Martin Panter in branch 'default':
Issues #25232, #24657: Merge two CGI server fixes from 3.5
https://hg.python.org/cpython/rev/0f03023d4318

New changeset 3c006ee38287 by Martin Panter in branch 'default':
Issues #25232, #24657: Add NEWS to 3.6.0a1 section
https://hg.python.org/cpython/rev/3c006ee38287

--
nosy: +python-dev

___
Python tracker 

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



[issue24177] Add https?_proxy support to http.client

2015-10-02 Thread Martin Panter

Martin Panter added the comment:

I think this would have a serious chance of breaking stuff unless it was only 
enabled with a new flag or similar. Also, I guess it would probably be limited 
to Basic authentication.

The wget and curl programs both support different URL protocols, HTTP redirects 
(if curl --location is enabled), etc. In my mind they operate at a higher 
level, like urlopen(), and http.client is a more lower-level client. Are there 
many use cases where you would want proxy support for a HTTP request, but 
wouldn’t want to use urlopen() or some other high-level library like Requests?

--
nosy: +martin.panter

___
Python tracker 

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



[issue24657] CGIHTTPServer module discard continuous '/' letters from params given by GET method.

2015-10-02 Thread Martin Panter

Changes by Martin Panter :


--
assignee:  -> martin.panter
nosy: +berker.peksag
stage: patch review -> commit review

___
Python tracker 

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



[issue25232] CGIRequestHandler behave incorrectly with query component consisting mutliple ?

2015-10-02 Thread Martin Panter

Changes by Martin Panter :


--
assignee:  -> martin.panter
nosy: +berker.peksag
stage: patch review -> commit review

___
Python tracker 

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



[issue25228] Regression in cookie parsing with brackets and quotes

2015-10-02 Thread Martin Panter

Martin Panter added the comment:

Thanks for the test case. It looks like the commit in question was done as a 
security fix in 3.2.6 and 3.3.6. I’m not sure on the policy, but maybe that 
justifies putting any fixes into 3.2+.

I’m not familiar with HTTP cookies. Is this a case of a 100% 
specification-compiliant cookie, or a technically invalid one that would be 
nice to handle better? If the second case, maybe it is an instance of Issue 
22983.

--
keywords: +3.2regression
nosy: +martin.panter
stage:  -> needs patch

___
Python tracker 

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



[issue25299] TypeError: __init__() takes at least 4 arguments (4 given)

2015-10-02 Thread paul j3

paul j3 added the comment:

A fix that I am exploring would wrap the Action instantiation call in 
add_argument with a try/except block

That is replace:

def add_argument(...)

action = action_class(**kwargs)
...

with


try:
action = action_class(**kwargs)
except TypeError:
msg = str(_sys.exc_info()[1])
msg = msg.replace('__init__','add_argument')
msg = [msg]
msg.append('Wrong argument(s) for Action subclass: 
%s'%action_class.__name__)
# action_class is now a class, rather than the input string
msg.append('kwargs: %s'%kwargs)
sig = getattr(action_class, 'action_sig',None)
if sig is not None:
msg = sig(msg)
raise ValueError(msg)
   

This collects information on the error, the action class and arguments, and 
passes them to a class method of the Action.  That customizes the message, and 
returns it for reraising.

In 'class Action' I define:

@classmethod
def action_sig(cls, msg=[]):
# return the signature
# subclasses may return custom version
import inspect
try:
name = cls.__name__
sig = inspect.signature(cls.__init__)
sig = str(sig)
except AttributeError:
spec = inspect.getfullargspec(cls.__init__)
sig = inspect.formatargspec(*spec)
# remove self, option_strings, dest
dstr='dest,'
ind = sig.find(dstr)
if ind>=0:
sig = '(...'+sig[(ind+len(dstr)+1):]
sig = 'class args: %s'%sig
msg.append(sig)
return '\n'.join(msg)

This adds inspect.signature information from the subclass __init__ method to 
the message from add_argument.  Subclasses (including the user defined ones) 
could customize this.

So a missing 'const' error would display as:

ValueError: add_argument() missing 1 required positional argument: 'const'
Wrong argument(s) for Action subclass: _StoreConstAction
kwargs: {'option_strings': ['--bar'], 'dest': 'bar'}
class args: (...const, default=None, required=False, help=None, metavar=None)

This may be overkill, but it gives an idea of the information that we can add 
to the original TypeError.

Done right this action_sig() could also serve as a usage function for an Action 
class.

--
keywords: +3.5regression

___
Python tracker 

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



[issue24177] Add https?_proxy support to http.client

2015-10-02 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag

___
Python tracker 

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



[issue25238] Version added of context parameter for xmlrpc.client.ServerProxy incorrect

2015-10-02 Thread Martin Panter

Martin Panter added the comment:

What are you proposing? I think you will find both cases are true. The change 
was made in 3.4 (but only in time for 3.4.3+) and 3.5 (starting at 3.5.0). If 
the documentation failed to mention 3.5 and only mentioned 3.4.3, it would not 
be obvious if that change made it into 3.5.0, or only the upcoming 3.5.1, etc.

See the “Changed in version 3.3.1” notice at 
 for a 
similar case, which mentions both versions.

--
assignee:  -> docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python, martin.panter

___
Python tracker 

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



[issue19917] [httplib] logging information for request is not pretty printed

2015-10-02 Thread Berker Peksag

Berker Peksag added the comment:

Closing as a duplicate of issue 24255.

--
nosy: +berker.peksag
resolution:  -> duplicate
stage: test needed -> resolved
status: open -> closed
superseder:  -> Replace debuglevel-related logic with logging

___
Python tracker 

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



[issue23972] Asyncio reuseport

2015-10-02 Thread chris laws

chris laws added the comment:

Updates addressing review comments.

--
Added file: http://bugs.python.org/file40664/23972_cjl_v004.patch

___
Python tracker 

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



[issue24773] Implement PEP 495 (Local Time Disambiguation)

2015-10-02 Thread Stuart Bishop

Changes by Stuart Bishop :


--
nosy: +stub

___
Python tracker 

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



[issue25224] Replace Idle's README.txt with annotated file list

2015-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4e62989e3688 by Terry Jan Reedy in branch '2.7':
Issue #25224: README.txt is now an idlelib index for IDLE developers and
https://hg.python.org/cpython/rev/4e62989e3688

New changeset bb1a8d3dd4a1 by Terry Jan Reedy in branch '3.4':
Issue #25224: README.txt is now an idlelib index for IDLE developers and
https://hg.python.org/cpython/rev/bb1a8d3dd4a1

--

___
Python tracker 

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



[issue24820] IDLE themes for light on dark

2015-10-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I was going to push both a version of the breakpoint patch and the new theme, 
but noticed a problem.  If someone selects IDLE Dark and saves that choice and 
then run an older Python+IDLE, then the older IDLE will not find 'IDLE Dark' 
and will run a backup default black and white theme, possibly with some error 
messages.  The solution is to select IDLE Dark and then immediately hit [Save 
as New Custom Theme] and enter a different name.  IDLE will then change Select: 
from (o) a Built-in Theme to (o) a Custom Theme, with the saved name selected.  
I want to add a popup to say this before adding the theme.

--

___
Python tracker 

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



[issue24820] IDLE themes for light on dark

2015-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e67da755d614 by Terry Jan Reedy in branch '2.7':
Issue #24820: Users can now set breakpoint colors in Settings ->
https://hg.python.org/cpython/rev/e67da755d614

New changeset d874a6157223 by Terry Jan Reedy in branch '3.4':
Issue #24820: Users can now set breakpoint colors in Settings ->
https://hg.python.org/cpython/rev/d874a6157223

--
nosy: +python-dev

___
Python tracker 

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



[issue25303] py_compile disregards PYTHONDONTWRITEBYTECODE and -B

2015-10-02 Thread Pavel Roskin

New submission from Pavel Roskin:

$ echo "'''Simple script'''" >simple-script
$ PYTHONDONTWRITEBYTECODE=1 python3 -B -m py_compile simple-script
$ ls __pycache__
simple-scriptcpython-35.pyc

py_compile should recognize when the user doesn't want the bytecode to be 
produced. Otherwise, it's not usable in makefiles for a quick code check.

See also http://stackoverflow.com/questions/4284313/

--
components: Library (Lib)
messages: 252185
nosy: proski
priority: normal
severity: normal
status: open
title: py_compile disregards PYTHONDONTWRITEBYTECODE and -B
versions: Python 3.5

___
Python tracker 

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



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

2015-10-02 Thread Brett Cannon

Brett Cannon added the comment:

It's fine. =) Glad it was for good reasons. Just took quite a while to manually 
apply the old patch to the new layout and then fix merges.

--

___
Python tracker 

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



[issue18174] Make regrtest with --huntrleaks check for fd leaks

2015-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ec2ef7525fa5 by Victor Stinner in branch 'default':
Issue #18174: Fix test_regrtest when Python is compiled in release mode
https://hg.python.org/cpython/rev/ec2ef7525fa5

--

___
Python tracker 

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



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

2015-10-02 Thread STINNER Victor

STINNER Victor added the comment:

> regrtest changes are now in 2.7, 3.5, and default in spite of Victor changing 
> everything underneath me constantly in default. =) That should make the 
> buildbot happy again.

Yeah sorry, it was my regrtest week :-)

--

___
Python tracker 

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



[issue25301] Optimize UTF-8 decoder with error handlers

2015-10-02 Thread STINNER Victor

STINNER Victor added the comment:

Here is a first patch. It is written to keep best performances for valid UTF-8 
encoded string, but speedup strings with a few undecodable bytes.

--
keywords: +patch
Added file: http://bugs.python.org/file40663/utf8_decoder.patch

___
Python tracker 

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



[issue25288] readline.py file in current directory caused unexpected code execution.

2015-10-02 Thread Akira Li

Akira Li added the comment:

python3 -I

could be used as a workaround.

--
nosy: +akira

___
Python tracker 

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



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

2015-10-02 Thread Brett Cannon

Brett Cannon added the comment:

regrtest changes are now in 2.7, 3.5, and default in spite of Victor changing 
everything underneath me constantly in default. =) That should make the 
buildbot happy again.

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



[issue25188] regrtest.py improvement for Profile Guided Optimization builds

2015-10-02 Thread Brett Cannon

Brett Cannon added the comment:

Thanks for the initial patch, Alecsandru! May I not have to touch regrtest 
until after Victor is done doing whatever he is doing to it in 3.6. =)

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

___
Python tracker 

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



[issue25188] regrtest.py improvement for Profile Guided Optimization builds

2015-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 136ad559fa4f by Brett Cannon in branch '2.7':
Issue #25188: Add -P/--pgo to test.regrtest for PGO building.
https://hg.python.org/cpython/rev/136ad559fa4f

--

___
Python tracker 

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



[issue25188] regrtest.py improvement for Profile Guided Optimization builds

2015-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fb90425017e3 by Brett Cannon in branch '3.5':
Issue #25188: Add a -P/--pgo flag to regrtest to silence error output.
https://hg.python.org/cpython/rev/fb90425017e3

New changeset c1ecb258003b by Brett Cannon in branch 'default':
Merge from 3.5 for issue #25188.
https://hg.python.org/cpython/rev/c1ecb258003b

--
nosy: +python-dev

___
Python tracker 

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



[issue14565] Allow multilevel subdirectories in cgi_directories

2015-10-02 Thread Glenn Linderman

Glenn Linderman added the comment:

Martin, thanks for the recent activity in this area. Sorry I've not yet learned 
how to submit patches. python_dev keeps busy changing the process and tools, 
and I keep busy with other projects, having patched a version of http-server 
well enough for my personal needs.

Your analysis that this is a new feature because the code doesn't support it, 
and the documentation is vague has some merit. 

On the other hand, the reason I called it a behavior bug in the first place is 
comparison to other web servers that support multi-part paths to cgi scripts 
indicates it is clearly deficient by comparison... and the documentation isn't 
explicit enough to say so, so it can be considered a "deficient" if not "buggy" 
implementation. Certainly, any attempt to port a real web site that depends 
heavily on cgi scripts to http-server would be extremely likely to fail due to 
this deficiency, that is not documented as a limitation of the "generally 
expected" abilities of a web server.

It'd sure be nice to fix it, whether it is called a bug or an enhancement, and 
the fix is in the comments above.

--

___
Python tracker 

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



[issue24848] Warts in UTF-7 error handling

2015-10-02 Thread STINNER Victor

STINNER Victor added the comment:

Oops, ignore my comment, I forgot to recompile Python. "make" and the bug is 
done :-)

--

___
Python tracker 

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



[issue24848] Warts in UTF-7 error handling

2015-10-02 Thread STINNER Victor

STINNER Victor added the comment:

> Have no ideas why tests are failed and only on this buildbot.

test_codecs always crash on Python 3.6 with Python compiled in debug mode:

test_errors (test.test_codecs.UTF7Test) ... python: 
Objects/unicodeobject.c:1263: _copy_characters: Assertion `ch <= to_maxchar' 
failed.
Fatal Python error: Aborted

Current thread 0x7f1489057700 (most recent call first):
  File "/home/haypo/prog/python/default/Lib/encodings/utf_7.py", line 12 in 
decode
  File "/home/haypo/prog/python/default/Lib/test/test_codecs.py", line 1021 in 
test_errors
  File "/home/haypo/prog/python/default/Lib/unittest/case.py", line 600 in run
  File "/home/haypo/prog/python/default/Lib/unittest/case.py", line 648 in 
__call__
  File "/home/haypo/prog/python/default/Lib/unittest/suite.py", line 122 in run
  File "/home/haypo/prog/python/default/Lib/unittest/suite.py", line 84 in 
__call__
  File "/home/haypo/prog/python/default/Lib/unittest/suite.py", line 122 in run
  File "/home/haypo/prog/python/default/Lib/unittest/suite.py", line 84 in 
__call__
  File "/home/haypo/prog/python/default/Lib/unittest/suite.py", line 122 in run
  File "/home/haypo/prog/python/default/Lib/unittest/suite.py", line 84 in 
__call__
  File "/home/haypo/prog/python/default/Lib/unittest/runner.py", line 176 in run
  File "/home/haypo/prog/python/default/Lib/test/support/__init__.py", line 
1775 in _run_suite
  File "/home/haypo/prog/python/default/Lib/test/support/__init__.py", line 
1809 in run_unittest
  File "/home/haypo/prog/python/default/Lib/test/libregrtest/runtest.py", line 
159 in test_runner
  File "/home/haypo/prog/python/default/Lib/test/libregrtest/runtest.py", line 
160 in runtest_inner
  File "/home/haypo/prog/python/default/Lib/test/libregrtest/runtest.py", line 
124 in runtest
  File "/home/haypo/prog/python/default/Lib/test/libregrtest/main.py", line 285 
in run_tests_sequential
  File "/home/haypo/prog/python/default/Lib/test/libregrtest/main.py", line 344 
in run_tests
  File "/home/haypo/prog/python/default/Lib/test/libregrtest/main.py", line 380 
in main
  File "/home/haypo/prog/python/default/Lib/test/libregrtest/main.py", line 421 
in main
  File "/home/haypo/prog/python/default/Lib/test/libregrtest/main.py", line 443 
in main_in_temp_cwd
  File "/home/haypo/prog/python/default/Lib/test/__main__.py", line 3 in 

  File "/home/haypo/prog/python/default/Lib/runpy.py", line 85 in _run_code
  File "/home/haypo/prog/python/default/Lib/runpy.py", line 170 in 
_run_module_as_main
Abandon (core dumped)

--

___
Python tracker 

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



[issue22806] regrtest: add switch -c to run only modified tests

2015-10-02 Thread STINNER Victor

STINNER Victor added the comment:

I added "python -m test --list-tests". It's not perfect but it's better than 
nothing :-p

--

___
Python tracker 

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



[issue18174] Make regrtest with --huntrleaks check for fd leaks

2015-10-02 Thread STINNER Victor

STINNER Victor added the comment:

I commited the first part to check for file descriptor leak.

I didn't commit the second part, to check for Windows handle leak.

--

___
Python tracker 

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



[issue18174] Make regrtest with --huntrleaks check for fd leaks

2015-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 72129c767c92 by Victor Stinner in branch 'default':
Issue #18174: "python -m test --huntrleaks ..." now also checks for leak of
https://hg.python.org/cpython/rev/72129c767c92

--

___
Python tracker 

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



[issue22806] regrtest: add switch -c to run only modified tests

2015-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1005573e6a74 by Victor Stinner in branch 'default':
Issue #22806: Add ``python -m test --list-tests`` command to list tests.
https://hg.python.org/cpython/rev/1005573e6a74

--
nosy: +python-dev

___
Python tracker 

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



[issue25258] HtmlParser doesn't handle void element tags correctly

2015-10-02 Thread Ezio Melotti

Ezio Melotti added the comment:

> this inconsistent cannot be fixed from the inherited class as (handle_* 
> calls are dispatched in the internal method of HTMLParser)

You can override handle_startendtag() like this:

>>> class MyHTMLParser(HTMLParser):
... def handle_starttag(self, tag, attrs):
... print('start', tag)
... def handle_endtag(self, tag):
... print('end', tag)
... def handle_startendtag(self, tag, attrs):
... self.handle_starttag(tag, attrs)
... 
>>> parser = MyHTMLParser()
>>> parser.feed('')
start link
start img


(P.S. please don't quote the whole message in your reply)

--

___
Python tracker 

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



[issue14423] Getting the starting date of iso week from a week number and a year.

2015-10-02 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

I am rejecting this in favor of #12006.

--
resolution:  -> rejected
status: open -> closed
superseder:  -> strptime should implement %G, %V and %u directives

___
Python tracker 

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



[issue25188] regrtest.py improvement for Profile Guided Optimization builds

2015-10-02 Thread Brett Cannon

Brett Cannon added the comment:

Here is a patch for Python 3.6. I'll commit this after I eat before Victor 
changes something else. =)

--
Added file: http://bugs.python.org/file40662/issue25188-py36.diff

___
Python tracker 

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



[issue13305] datetime.strftime("%Y") not consistent for years < 1000

2015-10-02 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Can someone recap the status of this issue?  It is classified as a 
documentation bug, but I don't see a clear statement of what is wrong with the 
documentation.

--
versions: +Python 3.6 -Python 3.3

___
Python tracker 

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



[issue10021] Format parser is too permissive

2015-10-02 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
stage:  -> needs patch
versions: +Python 3.6 -Python 3.2

___
Python tracker 

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



[issue762963] timemodule.c: Python loses current timezone

2015-10-02 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
resolution:  -> out of date
status: open -> closed
superseder:  -> Time zone-capable variant of time.localtime

___
Python tracker 

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



[issue13466] new timezones

2015-10-02 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Since nobody responded, I am closing this issue.

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

___
Python tracker 

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



[issue25297] max_help_position is not works in argparse library

2015-10-02 Thread paul j3

paul j3 added the comment:

There's a bug in the HelpFormatter.add_argument method.  It does not take into 
account the extra indentation of subactions (sub parsers) when calculating 
self._action_max_length.

The corrected method and a test case is in the attached file.

class MyFormatter(argparse.HelpFormatter):
"""
Corrected _max_action_length for the indenting of subactions
"""
def add_argument(self, action):
if action.help is not argparse.SUPPRESS:

# find all invocations
get_invocation = self._format_action_invocation
invocations = [get_invocation(action)]
current_indent = self._current_indent
for subaction in self._iter_indented_subactions(action):
# compensate for the indent that will be added
indent_chg = self._current_indent - current_indent
added_indent = 'x'*indent_chg
invocations.append(added_indent + get_invocation( subaction) )
# print('inv', invocations)

# update the maximum item length
invocation_length = max([len(s) for s in invocations])
action_length = invocation_length + self._current_indent
self._action_max_length = max(self._action_max_length,
  action_length)

# add the item to the list
self._add_item(self._format_action, [action])

Without this correction self._action_max_length is off by 2 if a subparser has 
the longest invocation.  Normally that wouldn't be an issue since normally 
subparser names are short and easy to use.  But with the 'aliases' that newer 
argparse allows, the invocation could be longer, and possibly longer than 
regular arguments.

I haven't passed this correction through test_argparse.py.  It also would need 
a test case or two.  I don't think it need a documentation change.

I don't know if this correction will work with the subparser grouping proposed 
in http://bugs.python.org/issue9341.

--
Added file: http://bugs.python.org/file40661/issue25297.py

___
Python tracker 

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



[issue22444] Floor divide should return int

2015-10-02 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue12314] regrtest checks (os.environ, sys.path, etc.) are hard to use

2015-10-02 Thread STINNER Victor

Changes by STINNER Victor :


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

___
Python tracker 

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



[issue13954] Add regrtest option to record test results to a file

2015-10-02 Thread STINNER Victor

Changes by STINNER Victor :


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

___
Python tracker 

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



[issue10967] move regrtest over to using more unittest infrastructure

2015-10-02 Thread STINNER Victor

STINNER Victor added the comment:

This issue was opened 4 years ago and has no activity since 2 years :-/ Even if 
yes, it would be nice to enhance regrtest and unittest, this issue doesn't 
propose any concrete plan with a concrete patch. I understand that the current 
situation is not perfect but it's acceptable :-) I close the issue as out of 
date.

If someone is still motivated, please open a new issue with a concrete plan and 
maybe summarize this one.

In the meanwhile, the work on relying on unittest test discovery is still 
ongoing and made good progress last... years (see issue #16748).

--
dependencies:  -Make CPython test package discoverable
nosy: +haypo
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue22806] regrtest: add switch -c to run only modified tests

2015-10-02 Thread STINNER Victor

STINNER Victor added the comment:

I'm now closing this issue because Antoine, Serhiy and me dislike the idea.

> An alternate suggestion would be to allow filenames like 
> "Lib/test/test_foo.py" as arguments to regrtest.

This sounds like a better plan. Please open a new issue if you still need that.

FYI I refactoring regrtest.py into libregrtest, it might be easier to enhance 
it now.

--
nosy: +haypo
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue25220] Enhance and refactor test.regrtest (convert regrtest.py to a package)

2015-10-02 Thread STINNER Victor

Changes by STINNER Victor :


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

___
Python tracker 

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



[issue9769] PyUnicode_FromFormatV() doesn't handle non-ascii text correctly

2015-10-02 Thread STINNER Victor

Changes by STINNER Victor :


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

___
Python tracker 

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



[issue11365] Integrate Buildroot patches (cross-compilation)

2015-10-02 Thread STINNER Victor

Changes by STINNER Victor :


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

___
Python tracker 

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



[issue12939] Add new io.FileIO using the native Windows API

2015-10-02 Thread STINNER Victor

STINNER Victor added the comment:

Lack of interest, I'm not convinced that it's *really* needed. We survived 8 
years with the current io module in Python 3, it's probably enough. I close the 
issue.

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

___
Python tracker 

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



[issue17548] unittest.mock: test_create_autospec_unbound_methods is skipped

2015-10-02 Thread STINNER Victor

Changes by STINNER Victor :


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

___
Python tracker 

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



[issue19519] Parser: don't transcode input string to UTF-8 if it is already encoded to UTF-8

2015-10-02 Thread STINNER Victor

Changes by STINNER Victor :


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

___
Python tracker 

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



[issue19518] Add new PyRun_xxx() functions to not encode the filename

2015-10-02 Thread STINNER Victor

Changes by STINNER Victor :


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

___
Python tracker 

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



[issue19817] tracemalloc add a memory limit feature

2015-10-02 Thread STINNER Victor

Changes by STINNER Victor :


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

___
Python tracker 

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



[issue19835] Add a MemoryError singleton to fix an unlimited loop when the memory is exhausted

2015-10-02 Thread STINNER Victor

Changes by STINNER Victor :


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

___
Python tracker 

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



[issue22323] Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString(): don't cache the result

2015-10-02 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue20910] Make sleep configurable in tests

2015-10-02 Thread STINNER Victor

Changes by STINNER Victor :


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

___
Python tracker 

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



[issue20964] Add support.check_time_delta()

2015-10-02 Thread STINNER Victor

Changes by STINNER Victor :


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

___
Python tracker 

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



[issue22324] Use PyUnicode_AsWideCharString() instead of PyUnicode_AsUnicode()

2015-10-02 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue25220] Enhance and refactor test.regrtest (convert regrtest.py to a package)

2015-10-02 Thread STINNER Victor

STINNER Victor added the comment:

It's not perfect, but libregrtest looks better than Python 3.5 regrtest.py. I 
close the issue.

--

___
Python tracker 

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



[issue25287] test_crypt fails on OpenBSD

2015-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4da7edbf78d4 by Victor Stinner in branch 'default':
Issue #25287: Don't add crypt.METHOD_CRYPT to crypt.methods if it's not
https://hg.python.org/cpython/rev/4da7edbf78d4

--
nosy: +python-dev

___
Python tracker 

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



[issue7897] Support parametrized tests in unittest

2015-10-02 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
versions: +Python 3.6 -Python 3.5

___
Python tracker 

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



[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-02 Thread Florin Papa

Florin Papa added the comment:

Hi David,

If you are not sure about MPX hardware support, you can find out the processor 
model with the following commands:

Linux - cat /proc/cpuinfo | grep model
Mac   - sysctl -n machdep.cpu.brand_string

If the processor code is one of the following - i7-6xxx, i7-6xxxT, i5-6xxx, 
i5-6xxxT, i3-6xxx, i3-6xxxT - it is definitely part of the 6th Generation Intel 
processors and it supports MPX. Otherwise, it does not.

Whether the hardware is MPX enabled is irrelevant for the build process. GCC 
5.1 and higher will generate the MPX specific instructions, which will be 
turned into nop's at runtime if the processor is not MPX enabled.

--

___
Python tracker 

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



[issue25258] HtmlParser doesn't handle void element tags correctly

2015-10-02 Thread Chenyun Yang

Chenyun Yang added the comment:

Correct for previous comment, consistent -> not consistent

On Fri, Oct 2, 2015 at 1:16 PM, Chenyun Yang  wrote:

>
> Chenyun Yang added the comment:
>
> I am fine with either handle_startendtag or handle_starttag,
>
> The issue is that the behavior is consistent for the two equally valid
> syntax ( and  are handled differently); this inconsistent cannot
> be fixed from the inherited class as (handle_* calls are dispatched in the
> internal method of HTMLParser)
>
> On Fri, Oct 2, 2015 at 12:42 PM, Ezio Melotti 
> wrote:
>
> >
> > Ezio Melotti added the comment:
> >
> > Note that HTMLParser tries to follow the HTML5 specs, and for this case
> > they say [0]:
> > "Set the self-closing flag of the current tag token. Switch to the data
> > state. Emit the current tag token."
> >
> > So it seems that for , only the  (and not the closing )
> > should be emitted.  HTMLParser has no way to set the self-closing flag,
> so
> > calling handle_startendtag seems the most reasonable things to do, since
> it
> > allows tree-builders to set the flag themselves.  That said, the default
> > implementation of handle_startendtag should indeed just call
> > handle_starttag, however this would be a backward-incompatible change.
> >
> > [0]: http://www.w3.org/TR/html5/syntax.html#self-closing-start-tag-state
> >
> > --
> > type:  -> behavior
> >
> > ___
> > Python tracker 
> > 
> > ___
> >
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue25266] mako benchmark not working in Python 3.6

2015-10-02 Thread Florin Papa

Florin Papa added the comment:

It's OK. I just saw one of Claudiu Popa's issues and figured we have similar 
last names.

--

___
Python tracker 

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



[issue25258] HtmlParser doesn't handle void element tags correctly

2015-10-02 Thread Chenyun Yang

Chenyun Yang added the comment:

I am fine with either handle_startendtag or handle_starttag,

The issue is that the behavior is consistent for the two equally valid
syntax ( and  are handled differently); this inconsistent cannot
be fixed from the inherited class as (handle_* calls are dispatched in the
internal method of HTMLParser)

On Fri, Oct 2, 2015 at 12:42 PM, Ezio Melotti 
wrote:

>
> Ezio Melotti added the comment:
>
> Note that HTMLParser tries to follow the HTML5 specs, and for this case
> they say [0]:
> "Set the self-closing flag of the current tag token. Switch to the data
> state. Emit the current tag token."
>
> So it seems that for , only the  (and not the closing )
> should be emitted.  HTMLParser has no way to set the self-closing flag, so
> calling handle_startendtag seems the most reasonable things to do, since it
> allows tree-builders to set the flag themselves.  That said, the default
> implementation of handle_startendtag should indeed just call
> handle_starttag, however this would be a backward-incompatible change.
>
> [0]: http://www.w3.org/TR/html5/syntax.html#self-closing-start-tag-state
>
> --
> type:  -> behavior
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue25266] mako benchmark not working in Python 3.6

2015-10-02 Thread Brett Cannon

Brett Cannon added the comment:

Sorry about that. Confusion of last name with Claudiu Popa from pylint.

--

___
Python tracker 

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



[issue25258] HtmlParser doesn't handle void element tags correctly

2015-10-02 Thread Ezio Melotti

Ezio Melotti added the comment:

Note that HTMLParser tries to follow the HTML5 specs, and for this case they 
say [0]:
"Set the self-closing flag of the current tag token. Switch to the data state. 
Emit the current tag token."

So it seems that for , only the  (and not the closing ) 
should be emitted.  HTMLParser has no way to set the self-closing flag, so 
calling handle_startendtag seems the most reasonable things to do, since it 
allows tree-builders to set the flag themselves.  That said, the default 
implementation of handle_startendtag should indeed just call handle_starttag, 
however this would be a backward-incompatible change.

[0]: http://www.w3.org/TR/html5/syntax.html#self-closing-start-tag-state

--
type:  -> behavior

___
Python tracker 

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



[issue25266] mako benchmark not working in Python 3.6

2015-10-02 Thread Florin Papa

Florin Papa added the comment:

No problem. The name is Florin Papa :)

--

___
Python tracker 

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



[issue25258] HtmlParser doesn't handle void element tags correctly

2015-10-02 Thread Chenyun Yang

Chenyun Yang added the comment:

the example you give for  is a different case.

,  are void elements which are allowed to have no close tag;
 without  is a browser implementation detail, most browser
autocompletes .

Without the parser calls the handle_endtag(), the client code which uses
HTMLParser won't be able to know whether the a traversal is finished.

Do you have a strong reason why we should include the knowledge of  void
elements into the HTMLParser at this line?

https://github.com/python/cpython/blob/bdfb14c688b873567d179881fc5bb67363a6074c/Lib/html/parser.py#L341

if end.endswith('/>') or (end.endswith('>') and tag in VOID_ELEMENTS)

On Wed, Sep 30, 2015 at 7:05 PM, Martin Panter 
wrote:

>
> Martin Panter added the comment:
>
> My thinking is that the knowledge that  does not have a closing tag
> is at a higher level than the current HTMLParser class. It is similar to
> knowing where the following HTML implicitly closes the  elements:
>
> Item AItem B
>
> In both cases I would not expect the HTMLParser to report “virtual” empty
> or closing tags. I don’t think it should report an empty  or closing
>  tag just because that is easy to do, because it would be
> inconsistent with other implied HTML tags. But maybe see what other people
> say.
>
> I don’t know your particular use case, but I would suggest if you need to
> parse non-XML HTML  tags, use the handle_starttag() method and don’t
> rely on the end tag :)
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue25266] mako benchmark not working in Python 3.6

2015-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 85edb638dce6 by Brett Cannon in branch 'default':
Issue #25266: the mako benchmark does not work in Python 3.6.
https://hg.python.org/benchmarks/rev/85edb638dce6

--
nosy: +python-dev

___
Python tracker 

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



[issue25266] mako benchmark not working in Python 3.6

2015-10-02 Thread Brett Cannon

Brett Cannon added the comment:

Thanks for the patch!

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

___
Python tracker 

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



[issue24848] Warts in UTF-7 error handling

2015-10-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Have no ideas why tests are failed and only on this buildbot.

--

___
Python tracker 

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



[issue22080] Add windows_helper module helper

2015-10-02 Thread eryksun

Changes by eryksun :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden
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



[issue12006] strptime should implement %G, %V and %u directives

2015-10-02 Thread Ashley Anderson

Changes by Ashley Anderson :


Added file: http://bugs.python.org/file40660/issue12006_10_complete.patch

___
Python tracker 

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



[issue12006] strptime should implement %G, %V and %u directives

2015-10-02 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

> Also please let me know if this is not the proper way to respond to the code 
> review!

I believe Rietveld gives you a "done" button on each reviewer comment.  If all 
you do is to take the reviewer suggestion, you can just press it.

Responding with an issue note as you did is perfectly fine as well.

--

___
Python tracker 

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



[issue25293] Hooking Thread/Process instantiation in concurrent.futures.

2015-10-02 Thread Yury Selivanov

Changes by Yury Selivanov :


--
nosy: +yselivanov

___
Python tracker 

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



[issue16802] fileno argument to socket.socket() undocumented

2015-10-02 Thread Guido van Rossum

Guido van Rossum added the comment:

Patch looks good.

--

___
Python tracker 

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



[issue25297] max_help_position is not works in argparse library

2015-10-02 Thread paul j3

paul j3 added the comment:

My testing shows that it's a problem with the subparsers listing.  When regular 
arguments are long, 'max_help_position' works (within limits allowed by 
'width').

--

___
Python tracker 

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



[issue25290] csv.reader: minor docstring typo

2015-10-02 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patch, Johannes! I forgot to update 2.7 docs, but should be OK 
now.

--
assignee:  -> docs@python
components: +Documentation -Library (Lib)
nosy: +berker.peksag, docs@python
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
type: enhancement -> behavior
versions: +Python 3.4, Python 3.5

___
Python tracker 

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



[issue25290] csv.reader: minor docstring typo

2015-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ceff1babf66e by Berker Peksag in branch '2.7':
Issue #25290: Fix typo in csv.reader() docstring
https://hg.python.org/cpython/rev/ceff1babf66e

--

___
Python tracker 

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



[issue25290] csv.reader: minor docstring typo

2015-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3940f480ea16 by Berker Peksag in branch '3.4':
Issue #25290: Fix typo in csv.reader() docstring
https://hg.python.org/cpython/rev/3940f480ea16

New changeset 3b565295eba0 by Berker Peksag in branch '3.5':
Issue #25290: Fix typo in csv.reader() docstring
https://hg.python.org/cpython/rev/3b565295eba0

New changeset 7a3073921687 by Berker Peksag in branch 'default':
Issue #25290: Fix typo in csv.reader() docstring
https://hg.python.org/cpython/rev/7a3073921687

--
nosy: +python-dev

___
Python tracker 

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



[issue25097] test_logging may fail with 'Access is denied' when pywin32 is installed

2015-10-02 Thread Vinay Sajip

Vinay Sajip added the comment:

I'm not able to build on Windows at the moment, unfortunately - did the change 
actually work for you?

--

___
Python tracker 

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



[issue12006] strptime should implement %G, %V and %u directives

2015-10-02 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

My bad.  In this case, maybe Erik can review your latest patch?

--

___
Python tracker 

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



[issue25296] Simple End-of-life guide covering all unsupported versions

2015-10-02 Thread Carol Willing

Carol Willing added the comment:

And that would be EOL (end of life) not EOF. More coffee please...

--

___
Python tracker 

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



[issue25296] Simple End-of-life guide covering all unsupported versions

2015-10-02 Thread Carol Willing

Carol Willing added the comment:

+1 to adding the EOF info to the Docs front page and a link from the downloads 
page.

Also, +1 to David's suggestion to adding the devguide as well to the front 
page. In the future, it would be nice to add the devguide to the CPython repo 
instead of having it as a standalone. It would consolidate things in to one 
workflow instead of a different workflow for the devguide.

P.S. Ezio - nice slide deck content :)

--
nosy: +willingc

___
Python tracker 

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



[issue25302] Memory Leaks with Address Sanitizer

2015-10-02 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue25302] Memory Leaks with Address Sanitizer

2015-10-02 Thread Matt Clarkson

New submission from Matt Clarkson:

I have the following `main.cpp`

```
#include 

int main() {
  Py_Initialize();

  if (!Py_IsInitialized())
return 1;

  Py_Finalize();

  return 0;
}
```

Compiled with on Arch Linux 4.2.1 gcc 5.2.0 python 3.4.3:

```
g++ -fsanitize=address main.cpp -o main `python-config --includes --ldflags
```

I end up with 424764 byte(s) leaked in 316 allocation(s).

I can suppress the leaks in the following ways:

```
# These are the high level functions that leak (i.e. the *top* of the call 
stack)
#leak:Py_Initialize
#leak:Py_Finalize
#leak:PyEval_EvalCode

# Low level private functions that leak (i.e. the *bottom* of the call stack)
leak:new_keys_object
leak:type_new
leak:new_dict_with_shared_keys
leak:make_keys_shared
leak:_PyObject_Malloc
leak:PyList_New

# The closest to the leak public functions (i.e. closest to the *top* of the 
call stack)
#leak:PyUnicode_New
#leak:PyList_New
#leak:PyFrame_New
#leak:PyDict_New
#leak:PyBytes_FromStringAndSize
#leak:PyObject_Call
#leak:PyType_Ready
#leak:PyDict_Merge
#leak:PyDict_SetItemString
#leak:PyEval_EvalFrameEx
```

I read in the `PyInitalize` documentation that circular references, etc might 
not be freed but 424764 bytes seems a lot just for initializing the Python 
engine.

I would like to help out solving the memory leaks, if that is possible?

--
components: Interpreter Core
files: leak.log
messages: 252136
nosy: Matt Clarkson
priority: normal
severity: normal
status: open
title: Memory Leaks with Address Sanitizer
type: resource usage
versions: Python 3.4
Added file: http://bugs.python.org/file40659/leak.log

___
Python tracker 

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



[issue25299] TypeError: __init__() takes at least 4 arguments (4 given)

2015-10-02 Thread R. David Murray

R. David Murray added the comment:

I think your second to last choice (catch the error) is the only practical 
solution.  It is also probably the best, since we need to support user-written 
action routines.

--

___
Python tracker 

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



[issue25297] max_help_position is not works in argparse library

2015-10-02 Thread paul j3

Changes by paul j3 :


--
nosy: +paul.j3

___
Python tracker 

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



[issue25295] functools.lru_cache raises KeyError

2015-10-02 Thread Aaron Meurer

Aaron Meurer added the comment:

Does this mean that some SymPy object is giving different hash values on 
successive calls to hash()? We definitely need to look into this on the SymPy 
side.

--

___
Python tracker 

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



[issue25299] TypeError: __init__() takes at least 4 arguments (4 given)

2015-10-02 Thread paul j3

paul j3 added the comment:

A related issue is

http://bugs.python.org/issue24754
argparse add_argument with action="store_true", type=bool should not crash

In this case the user specified a parameter that the 'store_true' subclass did 
not accept.

In both cases, 'parser.add_argument' does minimal error checking (or catching), 
so the user ends up seeing the '__init__' argument error.

This line in the 'store_const' documentation is clearly wrong.  There's no 
default.

(Note that the const keyword argument defaults to the rather
unhelpful None.)

Possible fixes to the bigger issue:

- major addition to the documentation, documenting allowable subclass 
parameters (but the subclasses aren't part of the API).

- major addition to add_argument that filters parameters before passing them to 
the subclasses.  But can that be done without replicating information that is 
implicit in the subclass __init__?  Can we use advanced inspection?  What about 
user defined Action classes?

- minor addition to add_argument that catches the __init__ parameter errors and 
adds a mollifing explanation.

- somehow make Action (and its subclasses) responsible for a nice error 
message.  But how do you override the normal behavior of Python regarding 
function parameters?

--
nosy: +paul.j3

___
Python tracker 

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



[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-02 Thread Florin Papa

Florin Papa added the comment:

> Why not enablind the option by default if GCC 5.1 or newer is detected? Is 
> there a risk of breaking third-party extensions?
> Should we pass the MPX compiler options to third-party extensions by way?
On a processor that does not support MPX technology, MPX specific instructions 
will be replaced by nop's and will introduce a performance loss. Also, third 
party extensions might need to be patched in order to work with MPX. One 
example is the math module, which needed the bnd_legacy attribute to disable 
instrumentation when calling libc functions (which are not instrumented and 
generated compile errors).

> I'm not sure that it's ok to add such change to Python 2.7. It's border line 
> between new feature and supporting a new architecture.
I believe that Python 2.7 should benefit from this change, since it is still 
used in real life applications, one example being Openstack Swift.

--

___
Python tracker 

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



[issue25296] Simple End-of-life guide covering all unsupported versions

2015-10-02 Thread Georg Brandl

Georg Brandl added the comment:

It should also be linked from the downloads page.

--

___
Python tracker 

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



[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-02 Thread STINNER Victor

STINNER Victor added the comment:

Why not enablind the option by default if GCC 5.1 or newer is detected? Is 
there a risk of breaking third-party extensions?

Should we pass the MPX compiler options to third-party extensions by way?

I'm not sure that it's ok to add such change to Python 2.7. It's border line 
between new feature and supporting a new architecture.

I would suggest to only modify Python 3.6.

--

___
Python tracker 

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



[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-02 Thread R. David Murray

R. David Murray added the comment:

Well, since it is arguably security related, I think that pushes it toward the 
"yes" side.  And yes, I think we could end up "breaking" third party code, as 
well as python (thus the need for a buildbot), but that may not be a bad thing 
in this case (that security business again :).

--

___
Python tracker 

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



[issue25299] TypeError: __init__() takes at least 4 arguments (4 given)

2015-10-02 Thread R. David Murray

R. David Murray added the comment:

To clarify this for other readers: the issue here is that the arguments to 
add_argument are passed through the action routine, which in this case is 
store_const, and store_const is the one that requires 'const' be 
specified...which isn't made clear by either the docs or the error message.

--

___
Python tracker 

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



[issue25296] Simple End-of-life guide covering all unsupported versions

2015-10-02 Thread Georg Brandl

Georg Brandl added the comment:

> It seems to me a link to this version independent info could logically appear 
> on the docs front page.

Yes, that sounds good. I do like the PHP graph of versions too...

--

___
Python tracker 

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



[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-02 Thread R. David Murray

R. David Murray added the comment:

I think Intel will make sure we do have one.

Florin: how does one determine if a processor supports mxp?  I don't know if 
the mac mini running the ICC buildbot is new enough to have a Skylake 
processor, but I suppose there's at least some chance it does.

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



[issue25299] TypeError: __init__() takes at least 4 arguments (4 given)

2015-10-02 Thread A. Skrobov

A. Skrobov added the comment:

Thank you for confirming that the mismatch between the documentation and the 
behaviour is preserved in Python 3!

Adding it to the list of affected versions.

--
versions: +Python 3.5

___
Python tracker 

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



[issue25295] functools.lru_cache raises KeyError

2015-10-02 Thread Peter Brady

Peter Brady added the comment:

As a sanity check I removed the stored hashvalue in Raymond Hettinger's 
backported lru_cache (which we use to support 2.6-3.2) and end up with errors 
as well.  So it seems like 24483 is the appropriate fix to restore the old 
behavior.  Thanks for looking into this.

--

___
Python tracker 

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



  1   2   >