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

2015-10-02 Thread Nick Coghlan

Nick Coghlan added the comment:

Adding Georg directly to the nosy, as I think this kind of structural question 
falls under his domain as the docs lead :)

--
nosy: +georg.brandl

___
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

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



[issue25276] Intermittent segfaults on PPC64 AIX 3.x

2015-10-02 Thread David Edelsohn

David Edelsohn added the comment:

As we have seen with similar issues on other targets, this likely is due to the 
random order of tests.  In another case, the timezone was not being restored 
properly by GLIBC.  Another test is leaving the process in a state that somehow 
evokes this failure from test_decimal.

--

___
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 Barry A. Warsaw

Changes by Barry A. Warsaw :


--
nosy: +barry

___
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 STINNER Victor

STINNER Victor added the comment:

Davey Shafik added the comment:
> We (PHP) also have a more visual guide at 
> http://php.net/supported-versions.php which updates dynamically to show the 
> current status.

Great job! It's much easier to see the status with the summary in a
single picture.

--

___
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 Serhiy Storchaka

Serhiy Storchaka added the comment:

I don't know what was the actual cause of the error and if issue24483 fixed it 
or mask.

--

___
Python tracker 

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



[issue25294] Absolute imports fail in some cases where relative imports would work

2015-10-02 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +brett.cannon, eric.snow, ncoghlan

___
Python tracker 

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



[issue25276] Intermittent segfaults on PPC64 AIX 3.x

2015-10-02 Thread Stefan Krah

Stefan Krah added the comment:

If you have time, you could use an explicit seed (and gdb):

# test_email segfault:
./python -m test -j 1 -u all -W --randseed 5634141

--

___
Python tracker 

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



[issue25276] Intermittent segfaults on PPC64 AIX 3.x

2015-10-02 Thread Stefan Krah

Stefan Krah added the comment:

And the segfaults are apparently somewhat random. This is beginning
to look like an issue unrelated to decimal that was perhaps recently
introduced (in which case "hg bisect" would be the fastest
way to debug).


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

[129/399/3] test_email
Fatal Python error: Segmentation fault

Current thread 0x0001 (most recent call first):
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/email/utils.py",
 line 57 in _has_surrogates
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/email/message.py",
 line 264 in get_payload
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_email/test_email.py",
 line 3463 in test_long_lines
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/case.py",
 line 600 in run
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/case.py",
 line 648 in __call__
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/suite.py",
 line 122 in run
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/suite.py",
 line 84 in __call__
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/suite.py",
 line 122 in run
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/suite.py",
 line 84 in __call__
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/suite.py",
 line 122 in run
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/suite.py",
 line 84 in __call__
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/suite.py",
 line 122 in run
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/suite.py",
 line 84 in __call__
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/suite.py",
 line 122 in run
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/suite.py",
 line 84 in __call__
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/unittest/runner.py",
 line 176 in run
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/support/__init__.py",
 line 1775 in _run_suite
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/support/__init__.py",
 line 1809 in run_unittest
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/libregrtest/runtest.py",
 line 159 in test_runner
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/libregrtest/runtest.py",
 line 160 in runtest_inner
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/libregrtest/runtest.py",
 line 113 in runtest
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/libregrtest/main.py",
 line 289 in run_tests_sequential
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/libregrtest/main.py",
 line 331 in run_tests
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/libregrtest/main.py",
 line 362 in main
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/libregrtest/main.py",
 line 404 in main
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/libregrtest/main.py",
 line 426 in main_in_temp_cwd
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/__main__.py",
 line 3 in 
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/runpy.py", 
line 85 in _run_code
  File 
"/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/runpy.py", 
line 170 in _run_module_as_main

--
title: test_decimal sometimes crash on PPC64 AIX 3.x -> Intermittent segfaults 
on PPC64 AIX 3.x

___
Python tracker 

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



[issue25276] Intermittent segfaults on PPC64 AIX 3.x

2015-10-02 Thread STINNER Victor

STINNER Victor added the comment:

I suggest to isolate tests using -j1: see my issue #25285.

(Currently, -j1 doesn't use subprocesses.)

--

___
Python tracker 

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



[issue19006] UnitTest docs should have a single list of assertions

2015-10-02 Thread Nicholas H.Tollervey

Changes by Nicholas H.Tollervey :


--
nosy: +kushal.das, ntoll

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

Alexander added the comment:

Problem also described on http://stackoverflow.com/questions/3215/

--

___
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 Ezio Melotti

Ezio Melotti added the comment:

I like that, in fact I used the same format in my talk "The development process 
of Python": 
http://wolfprojects.altervista.org/talks/development-process-of-python-2011/ 
(slides 20/21).

The main problem is where to put all this though.

--

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

http://buildbot.python.org/all/builders/x86%20XP-4%202.7/builds/3431/steps/test/logs/stdio


==
FAIL: test_errors (test.test_codecs.UTF7Test)
--
Traceback (most recent call last):
  File 
"d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\test\test_codecs.py",
 line 709, in test_errors
self.assertEqual(raw.decode('utf-7', 'replace'), expected)
AssertionError: u'a\u20ac\ufffd' != u'a\u20ac\ufffdb'
- a\u20ac\ufffd
+ a\u20ac\ufffdb
?+


==
FAIL: test_lone_surrogates (test.test_codecs.UTF7Test)
--
Traceback (most recent call last):
  File 
"d:\cygwin\home\db3l\buildarea\2.7.bolen-windows\build\lib\test\test_codecs.py",
 line 743, in test_lone_surrogates
self.assertEqual(raw.decode('utf-7', 'replace'), expected)
AssertionError: u'a\ufffd' != u'a\ufffdb'
- a\ufffd
+ a\ufffdb
?   +

--

___
Python tracker 

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



[issue23640] int.from_bytes() is broken for subclasses

2015-10-02 Thread ashutosh

ashutosh added the comment:

hi

i am ashutosh. I am running kubuntu 14.04.
before applying the patch. It failed in 2 test i.e

test___all__ 
test_re

After applying patch. It again gave me 2 error
test___all__ 
test_re

So,it worked for me.

--
nosy: +singh_jug

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

New submission from Alexander:

Hi colleagues I have the code (max_help_position is 2000):

formatter_class=lambda prog: argparse.HelpFormatter(prog, 
max_help_position=2000)
parser = argparse.ArgumentParser(formatter_class=formatter_class)


subparsers = parser.add_subparsers(title="Commands", metavar="")

cmd_parser = subparsers.add_parser('long_long_long_long_long_long_long',
   help='- jksljdalkjda',
   formatter_class=formatter_class)

args = parser.parse_args(['-h'])
print args

Result:

we have

optional arguments:
  -h, --help  show this help message and exit

Commands:
  
long_long_long_long_long_long_long
  - jksljdalkjda
small - descr

instead

optional arguments:
  -h, --help  show this help message and exit

Commands:
  
long_long_long_long_long_long_long - jksljdalkjda
small  - descr

The code:

class MyFormatter(argparse.HelpFormatter):
def __init__(self, prog):
super(MyFormatter, self).__init__(prog, max_help_position=2000, 
width=2000)
self._max_help_position = 2000
self._action_max_length += 4

got same result.

The strings like:

formatter_class = lambda prog: argparse.HelpFormatter(prog,
  max_help_position=2000, width=2000)

formatter_class = lambda prog: argparse.HelpFormatter(prog,
  max_help_position=1000, width=2000)

formatter_class = lambda prog: argparse.HelpFormatter(prog,
  max_help_position=2000, width=1000)

got same result: we always have new line after command.

--
components: Library (Lib)
messages: 252093
nosy: morden2k
priority: normal
severity: normal
status: open
title: max_help_position is not works in argparse library
versions: Python 2.7

___
Python tracker 

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



[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()

2015-10-02 Thread STINNER Victor

STINNER Victor added the comment:

> New changeset 3f4c319a822f by Serhiy Storchaka in branch '3.5':
> Issue #24483: C implementation of functools.lru_cache() now calculates key's
> https://hg.python.org/cpython/rev/3f4c319a822f

I didn't follow this issue, but I like the change. Good job :)

--

___
Python tracker 

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



[issue25278] Unexpected socket exception on SFTP 'STOR' command

2015-10-02 Thread Eric V. Smith

Eric V. Smith added the comment:

You'll need to reproduce this in a smaller piece of code that demonstrates the 
problem. The code you've included is very large, and imports libraries we don't 
have access to.

Otherwise, we can't reproduce it and we can't help.

--

___
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 Serhiy Storchaka

Serhiy Storchaka added the comment:

Issue24483 fixes this issue.

--
dependencies: +Avoid repeated hash calculation in C implementation of 
functools.lru_cache()

___
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 Bar Harel

Bar Harel added the comment:

Here you go.

--
nosy: +bar.harel
Added file: http://bugs.python.org/file40656/Issue16802_rev2.patch

___
Python tracker 

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



[issue25276] test_decimal sometimes crash on PPC64 AIX 3.x

2015-10-02 Thread Stefan Krah

Stefan Krah added the comment:

I've checked:  test_decimal does not require abnormal amounts of
memory or stack. On Linux/x86 a stack size of 256 (default 8192)
is sufficient, and memory requirements aren't that high.

We assumed that there is some memory limit on the buildbot, since
in a later run test #pwmx330 failed with MemoryError.


The easiest way to debug this is to rerun the whole test suite
under gdb with the same random seed as in


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

--

___
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 Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +rhettinger, serhiy.storchaka
type:  -> behavior
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



[issue19884] Importing readline produces erroneous output

2015-10-02 Thread Yogesh Joshi

Yogesh Joshi added the comment:

I tried applying this patch and its failing and throwing the following error:

patching file Lib/test/test_readline.py
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 43.
2 out of 2 hunks FAILED -- saving rejects to file Lib/test/test_readline.py.rej
patching file Modules/readline.c
Hunk #1 FAILED at 1019.
1 out of 1 hunk FAILED -- saving rejects to file Modules/readline.c.rej

I'm using Mac Os El Captain

--
nosy: +iyogeshjoshi

___
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 Davey Shafik

Davey Shafik added the comment:

We (PHP) also have a more visual guide at http://php.net/supported-versions.php 
which updates dynamically to show the current status.

It shows the current status (EOL, Security only, Active) of releases from PHP 
5.3, which is still the default for many LTS distros and still in common use.

--
nosy: +dshafik

___
Python tracker 

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



[issue25298] Add lock and rlock weakref tests

2015-10-02 Thread Nir Soffer

Changes by Nir Soffer :


--
components: Tests
files: 0001-Add-lock-rlock-weakref-tests.patch
keywords: patch
nosy: nirs
priority: normal
severity: normal
status: open
title: Add lock and rlock weakref tests
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6
Added file: 
http://bugs.python.org/file40655/0001-Add-lock-rlock-weakref-tests.patch

___
Python tracker 

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



[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()

2015-10-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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

___
Python tracker 

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



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

2015-10-02 Thread A. Skrobov

New submission from A. Skrobov:

Python 2.7.3 (default, Dec 18 2014, 19:10:20) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from argparse import ArgumentParser
>>> parser = ArgumentParser()
>>> parser.add_argument("--foo", help="foo", action='store_const')
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.7/argparse.py", line 1281, in add_argument
action = action_class(**kwargs)
TypeError: __init__() takes at least 4 arguments (4 given)
>>> 



First, the exception message is entirely unhelpful (you wanted at least 4, you 
got 4, what's your problem?)

Second, adding "const=None" to the invocation makes it succeed; but,  according 
to https://docs.python.org/2/library/argparse.html#const this argument defaults 
to "None", so it shouldn't be necessary to specify it explicitly. Thus, either 
the documentation or the implementation is wrong.

--
assignee: docs@python
components: Documentation, Extension Modules
messages: 252106
nosy: A. Skrobov, docs@python
priority: normal
severity: normal
status: open
title: TypeError: __init__() takes at least 4 arguments (4 given)
type: behavior
versions: Python 2.7

___
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 Xiang Zhang

Xiang Zhang added the comment:

Yes, there seems to still exist some defects not conforming to the
specification. I would like to investigate it. Maybe I can propose
a patch for it.

--

___
Python tracker 

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



[issue25298] Add lock and rlock weakref tests

2015-10-02 Thread Nir Soffer

New submission from Nir Soffer:

Same patch works also for 2.7

--

___
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 Roundup Robot

Roundup Robot added the comment:

New changeset 3c13567ea642 by Serhiy Storchaka in branch '3.4':
Issue #24848: Fixed bugs in UTF-7 decoding of misformed data:
https://hg.python.org/cpython/rev/3c13567ea642

New changeset a61fa2b08f87 by Serhiy Storchaka in branch '3.5':
Issue #24848: Fixed bugs in UTF-7 decoding of misformed data:
https://hg.python.org/cpython/rev/a61fa2b08f87

New changeset 037253b7cd6d by Serhiy Storchaka in branch 'default':
Issue #24848: Fixed bugs in UTF-7 decoding of misformed data:
https://hg.python.org/cpython/rev/037253b7cd6d

New changeset c6eaa722e2c1 by Serhiy Storchaka in branch '2.7':
Issue #24848: Fixed bugs in UTF-7 decoding of misformed data:
https://hg.python.org/cpython/rev/c6eaa722e2c1

--
nosy: +python-dev

___
Python tracker 

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



[issue23640] int.from_bytes() is broken for subclasses

2015-10-02 Thread Yogesh Joshi

Yogesh Joshi added the comment:

I applied patch to module and ran all the tested on Mac Os El Captain, only 4 
tests were failing with or without applying patch, following are the tests 
failing:
test___all__ test_calendar test_re test_socket

--
nosy: +iyogeshjoshi

___
Python tracker 

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



[issue25125] "Edit with IDLE" does not work for shortcuts

2015-10-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Putting them under the current 'Open with >' would also be alright.  (It 
currently lists Notepad, Wordpad, and Py launcher for Windows (console), which 
I presume means run with default for Py.  What I was requesting is that the 
version be included with the entry wherever it is put.  The technical details 
of the different choices are not my concern.

--

___
Python tracker 

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



[issue24483] Avoid repeated hash calculation in C implementation of functools.lru_cache()

2015-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3f4c319a822f by Serhiy Storchaka in branch '3.5':
Issue #24483: C implementation of functools.lru_cache() now calculates key's
https://hg.python.org/cpython/rev/3f4c319a822f

New changeset 5758b85627c9 by Serhiy Storchaka in branch 'default':
Issue #24483: C implementation of functools.lru_cache() now calculates key's
https://hg.python.org/cpython/rev/5758b85627c9

--
nosy: +python-dev

___
Python tracker 

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



[issue25294] Absolute imports fail in some cases where relative imports would work

2015-10-02 Thread J Richard Snape

Changes by J Richard Snape :


--
nosy: +J Richard Snape

___
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

Changes by Florin Papa :


Added file: http://bugs.python.org/file40658/mpx_enable_2_7.patch

___
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

New submission from Florin Papa:

Hi all,

My name is Florin Papa and I work in the Server Languages Optimizations Team at 
Intel Corporation.

I would like to submit a patch that enables the use of the Intel MPX (Memory 
Protection Extensions) feature on Python default and 2.7. Invalid memory access 
problem is commonly found in C/C++ programs and leads to time consuming 
debugging, program instability and vulnerability. Many attacks exploit software 
bugs related to invalid memory access caused by buffer overflow/underflow. 
Existing set of techniques to avoid such memory bugs represent software only 
solutions which result in poor protection and performance.

Intel MPX introduces new registers and new instructions that operate on these 
registers. Some of the registers added are bounds registers which store a 
pointer’s lower bound and upper bound limits. Whenever the pointer is used, the 
requested reference is checked against the pointer’s associated bounds, thereby 
preventing out-of-bound memory access (such as buffer overflows and overruns). 
Out-of-bounds memory references initiate a #BR exception which can then be 
handled in an appropriate manner.

MPX technology was introduced on the sixth generation of Intel Core processors, 
code name SkyLake, the successor to Broadwell microarchitecture (only desktop 
processor is available on the market, server has not been released). For older 
generations of Intel processors that do not support MPX, nop’s will be added to 
the instruction stream [1]. 

MPX enabled builds are only possible using gcc 5.1 and newer [2].

To apply the patch please follow these steps:
hg clone https://hg.python.org/cpython
cd cpython
copy mpx_enable.patch to the current directory
hg import --no-commit mpx_enable.patch
./configure –with-mpx
make –j #cores

[1] 
https://software.intel.com/en-us/articles/introduction-to-intel-memory-protection-extensions
[2] https://gcc.gnu.org/wiki/Intel%20MPX%20support%20in%20the%20GCC%20compiler

Regards,
Florin

--
components: Extension Modules
files: mpx_enable_3_6.patch
keywords: patch
messages: 252110
nosy: florin.papa
priority: normal
severity: normal
status: open
title: Enable Intel MPX (Memory protection Extensions) feature
type: security
versions: Python 3.6
Added file: http://bugs.python.org/file40657/mpx_enable_3_6.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 R. David Murray

R. David Murray added the comment:

It seems to me a link to this version independent info could logically appear 
on the docs front page.  I think we ought to add the devguide there already, 
for instance.  The 'Meta information' section seems perfectly 
appropriate...even though all the docs currently in there are maintained in the 
Docs directory, both 'about' and 'reporting bugs' are currently 
version-independent information.

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



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

2015-10-02 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy: +skrah

___
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



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

2015-10-02 Thread R. David Murray

R. David Murray added the comment:

Oops, sorry, I missed the fact that you were pointing out a doc issue.

--
resolution: out of date -> 
stage: resolved -> needs patch
status: closed -> open

___
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



[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



[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



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

2015-10-02 Thread Stefan Krah

Stefan Krah added the comment:

In principle adding the option is fine, but do we have a buildbot
with a Skylake processor?  We have lots of options that are untested
and that break periodically.

--
nosy: +zach.ware

___
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



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



[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



[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



[issue24870] Optimize ascii and latin1 decoder with surrogateescape and surrogatepass error handlers

2015-10-02 Thread STINNER Victor

STINNER Victor added the comment:

I created issue #25301: "Optimize UTF-8 decoder with error handlers".

--

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



[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



[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



[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



[issue25301] Optimize UTF-8 decoder with error handlers

2015-10-02 Thread STINNER Victor

New submission from STINNER Victor:

The issue #24870 optimized the ASCII decoder with error handlers:

New changeset 3c430259873e by Victor Stinner in branch 'default':
Issue #24870: Optimize the ASCII decoder for error handlers: surrogateescape,
https://hg.python.org/cpython/rev/3c430259873e

We should also optimize the UTF-8 decoder with error handlers.

I will work on a patch next days.

--
components: Unicode
messages: 252117
nosy: ezio.melotti, haypo
priority: normal
severity: normal
status: open
title: Optimize UTF-8 decoder with error handlers
type: performance
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



[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



[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



[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



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

2015-10-02 Thread R. David Murray

R. David Murray added the comment:

Yes, the python2 TypeErrors for mimatched arguments are sub-optimal.  This has 
been fixed in python3:

>>> parser.add_argument('--foo', help="foo", action='store_const')
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/rdmurray/python/p36/Lib/argparse.py", line 1336, in add_argument
action = action_class(**kwargs)
TypeError: __init__() missing 1 required positional argument: 'const'

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



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

2015-10-02 Thread R. David Murray

R. David Murray added the comment:

Hmm.  After looking at the code, it may also be desirable to improve that error 
message at the argparse level, since there's a bit of not-immediately-obvious 
indirection going on there.

--

___
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



[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



[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



[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



[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



[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



[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



[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



[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



[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



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



[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



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

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



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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



  1   2   >