[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Alecsandru Patrascu

Changes by Alecsandru Patrascu :


Added file: http://bugs.python.org/file40460/hash8-v02.patch

___
Python tracker 

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



[issue17750] allow the testsuite to run in the installed location

2015-09-14 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies: +test_compileall fails when run by unprivileged user on installed 
Python, test_zipfile failure when run by unprivileged user with installed Python

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

Maybe errno needs to be explicitly cleared before calling strftime or else 
we're seeing someone else's EINVAL?

--

___
Python tracker 

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



[issue25083] Python can sometimes create incorrect .pyc files

2015-09-14 Thread tzickel

tzickel added the comment:

You are not looking at the correct code, the function you are pointing to, 
check_compiled_module is run to check the existing .pyc (it is a good question, 
why the .pyc is overriden, but that is a secondary issue, which I cannot 
reproduce as I've said by demand).

I am talking about the code which creates a new (and incorrect) .pyc in 
parse_source_module:
https://hg.python.org/cpython/file/2.7/Python/import.c#l861
calls in the end to Py_UniversalNewlineFgets
https://hg.python.org/cpython/file/2.7/Objects/fileobject.c#l2749
you can see that function will return NULL if it gets an EOF because of a file 
error, and then the tokenises which calls it will not know if it got NULL 
because of EOF or file error, and compile the AST and generate an incorrect 
.pyc file.

--

___
Python tracker 

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



[issue19746] No introspective way to detect ModuleImportFailure in unittest

2015-09-14 Thread Peter

Peter added the comment:

This comment is just to note that this change broke our (exotic?) usage of 
unittest.TestLoader().loadTestsFromName(name) inside a try/except since under 
Python 3.5 some expected exceptions are no longer raised.

My nasty workaround hack:
https://github.com/biopython/biopython/commit/929fbfbcf2d1ba65ec460a413128dd5e6f68f5bf

I think it is unfortunate that the .errors attribute is just a list of messages 
as strings, rather than the original exception object(s) which would be easier 
to handle (e.g. using the subclass hierarchy).

--
nosy: +maubp

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Alecsandru Patrascu

Alecsandru Patrascu added the comment:

I've submitted a more compact version of the previous code (hash8-v02.patch)

--

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

(In the C code I mean, not in the test.)

--

___
Python tracker 

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



[issue25083] Python can sometimes create incorrect .pyc files

2015-09-14 Thread tzickel

Changes by tzickel :


--
nosy: +brett.cannon, meador.inge

___
Python tracker 

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



[issue17750] allow the testsuite to run in the installed location

2015-09-14 Thread Matthias Klose

Changes by Matthias Klose :


--
dependencies: +test_code_module tests fail when run from the installed location

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 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



[issue25109] test_code_module tests fail when run from the installed location

2015-09-14 Thread Matthias Klose

New submission from Matthias Klose:

seen when running the tests in the installed location:

the test expects:

Traceback (most recent call last):
  File "", line 1, in 
ValueError

but it gets:

Traceback (most recent call last):
  File "/usr/lib/python3.5/code.py", line 91, in runcode
exec(code, self.locals)
  File "", line 1, in 
ValueError

same for the other failing test case.

Re-running test 'test_code_module' in verbose mode
test_banner (test.test_code_module.TestInteractiveConsole) ... ok
test_cause_tb (test.test_code_module.TestInteractiveConsole) ... FAIL
test_console_stderr (test.test_code_module.TestInteractiveConsole) ... ok
test_context_tb (test.test_code_module.TestInteractiveConsole) ... FAIL
test_ps1 (test.test_code_module.TestInteractiveConsole) ... ok
test_ps2 (test.test_code_module.TestInteractiveConsole) ... ok
test_syntax_error (test.test_code_module.TestInteractiveConsole) ... ok
test_sysexcepthook (test.test_code_module.TestInteractiveConsole) ... ok

==
FAIL: test_cause_tb (test.test_code_module.TestInteractiveConsole)
--
Traceback (most recent call last):
  File "/usr/lib/python3.5/test/test_code_module.py", line 96, in test_cause_tb
self.assertIn(expected, output)
AssertionError: '\nAttributeError\n\nThe above exception was the direct cause 
of the following exception:\n\nTraceback (most recent call last):\n  File 
"", line 1, in \nValueError\n' not found in 'Python  on \nType "help", "copyright", 
"credits" or "license" for more 
information.\n(InteractiveConsole)\nAttributeError\n\nThe above exception was 
the direct cause of the following exception:\n\nTraceback (most recent call 
last):\n  File "/usr/lib/python3.5/code.py", line 91, in runcode\n
exec(code, self.locals)\n  File "", line 1, in 
\nValueError\n\n'

==
FAIL: test_context_tb (test.test_code_module.TestInteractiveConsole)
--
Traceback (most recent call last):
  File "/usr/lib/python3.5/test/test_code_module.py", line 114, in 
test_context_tb
self.assertIn(expected, output)
AssertionError: '\nTraceback (most recent call last):\n  File "", line 
1, in \nNameError: name \'ham\' is not defined\n\nDuring handling of 
the above exception, another exception occurred:\n\nTraceback (most recent call 
last):\n  File "", line 2, in \nNameError: name \'eggs\' is 
not defined\n' not found in 'Python  on \nType "help", "copyright", "credits" or "license" for 
more information.\n(InteractiveConsole)\nTraceback (most recent call last):\n  
File "", line 1, in \nNameError: name \'ham\' is not 
defined\n\nDuring handling of the above exception, another exception 
occurred:\n\nTraceback (most recent call last):\n  File 
"/usr/lib/python3.5/code.py", line 91, in runcode\nexec(code, 
self.locals)\n  File "", line 2, in \nNameError: name \'eggs\' 
is not defined\n\n'

--
components: Tests
messages: 250655
nosy: doko
priority: normal
severity: normal
status: open
title: test_code_module tests fail when run from the installed location
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



[issue25063] shutil.copyfileobj should internally use os.sendfile when possible

2015-09-14 Thread R. David Murray

R. David Murray added the comment:

I'm going to reject this.  If you think there is enough value in this to 
warrant the complications that would be required to ensure backward 
compatibility (assuming that is even possible), you could bring it up again on 
python-ideas.

--
resolution:  -> rejected
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



[issue25102] Windows installer: 'precompile standard library' option should pre-compile with -O and -OO

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

Doesn't it? It's supposed to...

--

___
Python tracker 

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



[issue25107] Windows 32-bit: exe-files doesn't run

2015-09-14 Thread eryksun

Changes by eryksun :


--
components: +Windows -IDLE

___
Python tracker 

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



[issue25089] Can't run Python Launcher on Windows

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

Just the main log file from the initial install is enough if there's no log for 
the launcher. It probably means the initial setup startup deselected it for 
some reason.

--

___
Python tracker 

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



[issue25107] Windows 32-bit: exe-files doesn't run

2015-09-14 Thread eryksun

eryksun added the comment:

The latest version that supports Windows XP is 3.4.3.

--
components: +IDLE -Windows
nosy: +eryksun

___
Python tracker 

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



[issue25089] Can't run Python Launcher on Windows

2015-09-14 Thread Mark Lawrence

Changes by Mark Lawrence :


Added file: http://bugs.python.org/file40461/Python 3.5.0 
(64-bit)_20150913191600.log

___
Python tracker 

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



[issue25103] 3.5.0 installed standard library on Windows has LF line endings

2015-09-14 Thread R. David Murray

R. David Murray added the comment:

I'm pretty sure the hg eol extension would need to get involved here.  This may 
not be worth the pain it would likely cause, but I could be wrong :)

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



[issue25110] Documentation sometimes still links to py3.4

2015-09-14 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +larry

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread eryksun

eryksun added the comment:

> errno should always be cleared before use (in C99 at least,
> not sure what the crt does).

The CRT's strftime doesn't clear errno. I suggested clearing it in issue 25029, 
msg250215.

--
nosy: +eryksun

___
Python tracker 

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



[issue25110] Documentation sometimes still links to py3.4

2015-09-14 Thread Florian Apolloner

New submission from Florian Apolloner:

Compare those two URLs:
https://docs.python.org/3/whatsnew/
https://docs.python.org/3/

The first one shows version 3.4, whereas the later shows version 3.5.

--
messages: 250667
nosy: Florian.Apolloner
priority: normal
severity: normal
status: open
title: Documentation sometimes still links to py3.4

___
Python tracker 

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



[issue25110] Documentation sometimes still links to py3.4

2015-09-14 Thread Florian Apolloner

Changes by Florian Apolloner :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
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



[issue25107] Windows 32-bit: exe-files doesn't run

2015-09-14 Thread Zachary Ware

Zachary Ware added the comment:

Windows XP is not supported by Python 3.5. See PEP 11 for details.

--
components: +Windows -IDLE
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
resolution:  -> wont fix
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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Stefan Krah

Stefan Krah added the comment:

Yes, errno should always be cleared before use (in C99 at least,
not sure what the crt does).

--
nosy: +skrah

___
Python tracker 

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



[issue25090] IDLE: remove noisy icons from class (module) browser

2015-09-14 Thread Mark Roseman

Mark Roseman added the comment:

Thanks Raymond. As an 'outsider' I rely on people like you to provide feedback 
based on your experience to some of the proposals I'm floating here. 

On a more specific note... 

This one came about mainly as I was looking at the class (module) browser. I 
thought it a bit limited/clunky, which as Terry noted has been brought up 
before. I noticed many editors/IDEs do a status bar thing showing current class 
and/or function, often as a gateway to navigating through the structure. I've 
found it a convenient and compact navigational cue/tool. I've also seen this 
used in addition to or in conjunction with a sidebar showing the file 
structure, highlighting current location. 

I've admittedly only briefly tried Code Context (and personally based on that 
limited experience didn't find it particularly helpful, and somewhat visually 
disruptive), and the mention here was almost an afterthought (since the status 
bar thing does provide a coarse level of context). I'd actually be curious to 
see how other editors/IDEs implement the same sort of feature as there may be 
some nice tweaks to steal - do you have any pointers?

Again, I greatly appreciate the feedback. In regards to your comment on "too 
many sweeping change proposals" I'd certainly like to hear any suggestions you 
may have around process, general concerns, etc.  Thanks again.

--

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue25102] Windows installer: 'precompile standard library' option should pre-compile with -O and -OO

2015-09-14 Thread Zachary Ware

Zachary Ware added the comment:

It doesn't appear to; my 'C:\Program Files\Python 3.5\Lib\__pycache__' is full 
of .pyc's, but none with an optimization tag.  To confirm with math rather than 
eyesight, according to 'dir' there are 168 files in Lib\, and 168 in 
Lib\__pycache__ rather than the expected 168*3.

For the record, I have not run this Python as a privileged user, so the 
contents of __pycache__ are not incidental; they were definitely created by the 
precompile option.

--

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Stefan Krah

Stefan Krah added the comment:

Clearing is easy: errno = 0; :)


C library functions are not supposed to set errno to 0 by
themselves (C99: paragraph 7.5).

--

___
Python tracker 

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



[issue25089] Can't run Python Launcher on Windows

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

Yep, as part of the upgrade detection we're choosing not to install the 
launcher. Not sure whether that's because of a bug or a previous install on 
your machine, but I'll take a closer look.

--
assignee:  -> steve.dower

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

I guess when I said I'd done "exactly" what you suggested I misread that 
part... whoops.

This is a pretty nasty bug to workaround... do we have any way for a user to 
clear errno from their own code?

--

___
Python tracker 

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



[issue25110] Documentation sometimes still links to py3.4

2015-09-14 Thread Larry Hastings

Larry Hastings added the comment:

Old version stuck in the CDN cache.  I cleared the cache, it's fine now.

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread R. David Murray

R. David Murray added the comment:

Given all the changes in the windows support in 3.5, I will not be at all 
surprised if we need to spin 3.5.1 much more quickly than we normally would in 
any case.

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread STINNER Victor

STINNER Victor added the comment:

It's common in Modules/posixmodule.c to set errno to 0 before calling a C 
function, especially when "errno != 0" is checked after the call (because it's 
the only way to check if the function failed?).

--

___
Python tracker 

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



[issue25108] traceback.extract_stack() compatibility break in 3.5

2015-09-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch that restores compatibility. There were no tests for 
print_stack(), format_stack(), and extract_stack() without arguments. New tests 
are passed with 3.4.

There is a difference between this bug and warnings.warn(stacklevel=) at import 
time. In the latter the behavior is changed when we specify the stacklevel and 
we can't workaround this besides change the specified stacklevel depending on 
Python version. In the former the behavior is changed only when we don't 
specify a frame. The workaround is version independed: specify the frame 
explicitly. Therefore we will not break a code with a workaround for 3.5.0, but 
will fix a code without workaround.

--
keywords: +patch
nosy: +serhiy.storchaka
stage:  -> patch review
Added file: http://bugs.python.org/file40462/traceback_extract_stack.patch

___
Python tracker 

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



[issue25099] test_compileall fails when run by unprivileged user on installed Python

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

IIRC there's an existing issue for this. (Or it may have just been mentioned in 
a "things that don't work when you're not root" list on an issue.)

--

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Alecsandru Patrascu

Alecsandru Patrascu added the comment:

Yes, it doesn't break the compatibility with existing applications. To make 
sure, we tested it in various scenarios and workloads.

--

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

I get that part.

Is there a way people can set errno to zero from Python code? Or do we need to 
ship 3.5.1 already?

--

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Brett Cannon

Brett Cannon added the comment:

If this is applying something we already did in Python 3 and it doesn't break 
compatibility then this should fall under the same sort of backport exemption 
that Guido granted for the eval loop performance enhancements that Intel did a 
couple months back.

--

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Chris Angelico

Chris Angelico added the comment:

+1 for anything that makes Python faster with provably no semantic changes.

--

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Stefan Krah

Stefan Krah added the comment:

Steve, sorry if I misunderstand you: My point (and eryksun's)
was that errno is currently not cleared before the call to
format_time() in

  Modules/timemodule.c:657


I didn't look at this issue in depth, just pointing out a
possible cause.

--

___
Python tracker 

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



[issue25074] Bind logger and waninigs modules for asyncio __del__ methods

2015-09-14 Thread STINNER Victor

STINNER Victor added the comment:

I don't like such "hacks". IMHO It's too late to try to log errors, to execute 
code to cleanup objects, etc. 

You should try to implement something in aiohttp or even in the application to 
cleanup objects at exit. For example, it's probably wrong if you still have 
tasks when the event loop is closed. Especially if tasks are still pending. See 
this part of the doc which lists "pending tasks at exit":
https://docs.python.org/dev/library/asyncio-dev.html#chain-coroutines-correctly

For "exceptions never consumed", I proposed a different enhancement in asyncio 
directly:
https://bugs.python.org/issue24598

What do you think?

--

___
Python tracker 

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



[issue25113] documentation version switcher is broken

2015-09-14 Thread Berker Peksag

Berker Peksag added the comment:

Looks like version_switch.js is not included into HTML.

SPHINXOPTS='-A versionswitcher=1' make -C Doc/ htmlview

works for me locally on the 3.5 branch. Perhaps 3.5 docs were created manually 
or without running "make autobuild-{dev,html,stable}"?

--
nosy: +berker.peksag

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Gregory P. Smith

Gregory P. Smith added the comment:

attaching an updated patch.

fwiw, in my own quick tests i'm not seeing a performance difference on the 
benchmark suite.  but i am not trying to run it in such an isolated quiet 
machine locked freq.  environment.

it is still a good idea regardless.  _some_ compilers really benefit from the 
manually unrolling.  any that already unrolled things themselves should not 
care.

--
Added file: http://bugs.python.org/file40467/hash8-v03-gps01.patch

___
Python tracker 

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



[issue25114] asynico: add ssl_object extra info

2015-09-14 Thread STINNER Victor

New submission from STINNER Victor:

Attached patch adds the "ssl_object" extra information to SSL sockets. For the 
legacy SSL implementation, it's a ssl.SSLSocket instance. For the new SSL 
implementation, it's a ssl.SSLObject instance.

ssl.SSLObject and ssl.SSLSocket have a similar but different API. Both classes 
provide important methods like getpeercert().

This issue fixes a regressions of Python 3.5 compared to Python 3.4 in asyncio 
SSL sockets: it's no more possible to get the peer certificate as a binary 
object (only as text). See the issue #22768.

My patch adds also unit tests on SSL extra info. We only had poor unit tests on 
these info.

--
components: asyncio
files: ssl_object.patch
keywords: patch
messages: 250705
nosy: gvanrossum, haypo, mathieui, yselivanov
priority: normal
severity: normal
status: open
title: asynico: add ssl_object extra info
versions: Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file40468/ssl_object.patch

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

Patch attached. I haven't been able to repro the issue locally without the fix, 
but it seems indisputably correct behavior.

We could also skip most of the function for an empty format string and save 
ourselves a lot of work. That would avoid the ambiguous returned "is it 
zero-length or is it an error" value.

--
keywords: +patch
Added file: http://bugs.python.org/file40469/25092_1.patch

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

(The fix is indisputably correct, is what I meant.)

--

___
Python tracker 

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



[issue25084] remove semi-busy loop in py2.7 threading.Condition.wait(timeout=x)

2015-09-14 Thread STINNER Victor

STINNER Victor added the comment:

As you noticed, this issue was correctly fixed in Python 3 by using the C timed 
acquire methods of locks, instead of polling. The problem is that Python 2 
supports a wide range of threading models:

Python/thread_atheos.h
Python/thread_beos.h
Python/thread_cthread.h
Python/thread_lwp.h
Python/thread_nt.h
Python/thread_os2.h
Python/thread_pth.h
Python/thread_pthread.h
Python/thread_sgi.h
Python/thread_solaris.h
Python/thread_wince.h

In Python 3, it was possible to use more features of OS threads because we 
dropped all implementations to only keep the 2 major implementations:

Python/thread_nt.h
Python/thread_pthread.h

Your change adds a new feature to threading.Lock in Python 2:

-.. method:: Lock.acquire([blocking])
+.. method:: Lock.acquire(blocking=True, timeout=-1)

But features cannot be added to Python 2 anymore!

The backport changes critical C code. There is a (high) risk of introducing a 
regression.

I suggest to close this issue as WONTFIX.

@Benjamin (Python 2.7 release manager): What do you think?

In 2015, it's time to upgrade to Python 3! 
https://docs.python.org/3/howto/pyporting.html

--
nosy: +benjamin.peterson, haypo

___
Python tracker 

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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

We don't check errno on any other platform.

--

___
Python tracker 

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



[issue23078] unittest.mock patch autospec doesn't work on staticmethods

2015-09-14 Thread Felipe

Felipe added the comment:

The attached patch implements these changes through _callable instead. This 
patch also ensures that the underlying object that staticmethod and classmethod 
wrap is a callable object as well.

--
Added file: http://bugs.python.org/file40470/issue23078.patch

___
Python tracker 

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



[issue24875] pyvenv doesn´t install PIP inside a new venv with --system-site-package

2015-09-14 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue24391] Better repr for threading objects

2015-09-14 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



[issue25108] traceback.extract_stack() compatibility break in 3.5

2015-09-14 Thread Nick Coghlan

Nick Coghlan added the comment:

Serhiy's explanation and fix look good to me.

--

___
Python tracker 

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



[issue22768] Add a way to get the peer certificate of a SSL Transport

2015-09-14 Thread STINNER Victor

STINNER Victor added the comment:

In Python 3.5, it's no more possible to get the peer certificate as binary. See 
the issue #25114 for a general fix.

--

___
Python tracker 

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



[issue25114] asynico: add ssl_object extra info

2015-09-14 Thread STINNER Victor

STINNER Victor added the comment:

Workaround for Python 3.5.0: force the legacy SSL implementation. For example, 
monkey patch the asyncio module with:

asyncio.sslproto._is_sslproto_availabe=lambda: False

--

___
Python tracker 

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



[issue25077] Compiler warnings: initialization from incompatible pointer type

2015-09-14 Thread STINNER Victor

STINNER Victor added the comment:

For ceval, it comes from pyatomic.h: see my atomic_pointer.patch attached to 
the issue #25077.

--
nosy: +haypo

___
Python tracker 

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



[issue25061] Add native enum support for argparse

2015-09-14 Thread paul j3

paul j3 added the comment:

Here's a EnumType factory class, modeled on FileType.  

class EnumType(object):
"""Factory for creating enum object types
"""
def __init__(self, enumclass):
self.enums = enumclass

def __call__(self, astring):
name = self.enums.__name__
try:
return self.enums[astring.upper()]
except KeyError:
msg = ', '.join([t.name.lower() for t in self.enums])
msg = '%s: use one of {%s}'%(name, msg)
raise argparse.ArgumentTypeError(msg)

def __repr__(self):
astr = ', '.join([t.name.lower() for t in self.enums])
return '%s(%s)' % (self.enums.__name__, astr)

It would be used like:

parser=argparse.ArgumentParser()
parser.add_argument("-p", type=EnumType(CustomEnumType),
default="VAL1", help = 'type info: %(type)s')

'EnumType(CustomEnumType)' is as close as we are going to get to 'simply 
passing the enum' to the parser, given the current 'type' syntax.  This 
statement produces a callable object, the equivalent of my previous function.

By giving the class a `__repr__` it can also be used in the 'help' with the 
'%(type)s' syntax.  That's the main functionality that this factory adds to my 
previous function definition.

parser.print_help()
print(parser.parse_args([]))
print(parser.parse_args(["-p","val2"]))
print(parser.parse_args(["-p","val4"]))


produces

usage: issue25061.py [-h] [-p P]
optional arguments:
-h, --help  show this help message and exit
-p Ptype info: CustomEnumType(val1, val2, val3)

Namespace(p=)
Namespace(p=)
usage: issue25061.py [-h] [-p P]
issue25061.py: error: argument -p: CustomEnumType: use one of
{val1, val2, val3}

I was toying with writing a custom Action class that would create its own type 
and help attributes based on the enum parameter.  But since this 
EnumType.__repr__ takes care of the help angle, I don't think I'll bother.

If there's enough interest, I can imagine casting this EnumType as a formal 
patch, complete with tests and documentation.  Till then, feel free to 
experiment with and refine these ideas.

--

___
Python tracker 

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



[issue25096] test_gdb failed to read version for gdb >= 7.10

2015-09-14 Thread STINNER Victor

STINNER Victor added the comment:

Fixed by changesets 21d6b2752fe8 (2.7) and 6a8aa246485e (3.4). Thanks for your 
bug report and your patch!

--
nosy: +haypo
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



[issue25108] traceback.extract_stack() compatibility break in 3.5

2015-09-14 Thread Robert Collins

Robert Collins added the comment:

wouldn't changing walk_stack to add one more f_back be better? Seems odd to 
work around it...

--

___
Python tracker 

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



[issue25115] SSL_set_verify_depth not exposed by the ssl module

2015-09-14 Thread Grant Bremer

New submission from Grant Bremer:

The SSL_set_verify_depth OpenSSL method is not currently exposed by the ssl 
module. The context object would seem to be the proper place for it as an 
instance method.

--
components: Library (Lib)
messages: 250718
nosy: Grant Bremer
priority: normal
severity: normal
status: open
title: SSL_set_verify_depth not exposed by the ssl module
type: enhancement
versions: Python 2.7, Python 3.5

___
Python tracker 

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



[issue25115] SSL_set_verify_depth not exposed by the ssl module

2015-09-14 Thread Grant Bremer

Changes by Grant Bremer :


--
hgrepos: +316
keywords: +patch
Added file: http://bugs.python.org/file40471/verify_depth.patch

___
Python tracker 

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



[issue25116] It failed to install Py3.5 on win2008R2

2015-09-14 Thread Kevin Zhang

Kevin Zhang added the comment:

I have installed Python2.7 and Python3.4 on this server before.
Python3.4 installation works well after I failed to executed python-3.5.0.exe.
Thanks again.

--

___
Python tracker 

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



[issue25095] test_httpservers hangs on 3.5.0, win 7

2015-09-14 Thread Martin Panter

Martin Panter added the comment:

Can you identify which test case hangs? E.g. on Linux I can run the following 
to see each test case run:

./python -m unittest -v test.test_httpservers

--
nosy: +martin.panter

___
Python tracker 

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



[issue25117] Windows installer: precompiling stdlib fails with missing DLL errors

2015-09-14 Thread Marius Gedminas

New submission from Marius Gedminas:

I installed Python 3.5 on a Windows Server 2012 VM, twice (once the 32-bit, and 
once the 64-bit version).  When it started throwing error dialogs at me, I 
started taking screenshots: http://imgur.com/a/zwfz4.

What happened:
- I selected advanced installation
- checked "install for all users"
- changed the install path to c:\python35 (and c:\python35-64)
- when the installer reached "Precompiling standard library" I got the error: 
"Python has stopped working".
- clicking "check online for a solution" produces this explanation: 
"api-ms-win-crt-runtime-l1-1-0.dll is missing from your computer".
- dismissing the error dialog leads the installer to say the installation is 
finished (presumably successfully); Python seems to work.

(The last dialog about VCRUNTIME140.dll is unrelated -- it's what happens if I 
try to use Python 3.7 to run virtualenv to create a Python 3.5 virtualenv.  
I'll file a separate bug, once I figure out if it's a Python or a virtualenv 
bug.)

--
components: Installation
messages: 250722
nosy: mgedmin
priority: normal
severity: normal
status: open
title: Windows installer: precompiling stdlib fails with missing DLL errors
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



[issue25117] Windows installer: precompiling stdlib fails with missing DLL errors

2015-09-14 Thread Aaron Meurer

Changes by Aaron Meurer :


--
nosy: +Aaron.Meurer

___
Python tracker 

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



[issue25116] It failed to install Py3.5 on win2008R2

2015-09-14 Thread Kevin Zhang

New submission from Kevin Zhang:

OS: Windows Server 2008 R2 Enterprise
I'm remote desktop to the server and try to install Python3.5 released version.
Remote desktop user/privilege: administrator
There is no window about installation pop up after I double clicked 
python-3.5.0.exe.

I could provide more info as you need.

--
components: Installation
messages: 250719
nosy: Kevin Zhang
priority: normal
severity: normal
status: open
title: It failed to install Py3.5 on win2008R2
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



[issue25118] OSError in os.waitpid

2015-09-14 Thread Rocco Matano

New submission from Rocco Matano:

On windows and python up to 3.4 using the combination of os.spawnX(os.P_NOWAIT, 
...) and os.waitpid() worked as expected, but with python 3.5 this no longer 
works. In fact os.waitpid() now raises an OSError when the child process 
terminates.
Running this simple script demonstrates that:

import sys
import os
import time

print(sys.version)

file = r'c:\windows\system32\cmd.exe'
args = [file, '/C', 'ping', '1.1.1.1', '-n', '1', '>NUL']
env = os.environ

t0 = time.time()
ret = os.spawnve(os.P_NOWAIT, file, args, env)
pid, status = os.waitpid(ret, 0)
t1 = time.time()
print("process took %.1f seconds" % (t1 - t0))

I get the following outputs:

C:\Users\rmatano\test_py35>py -3.4 test_waitpid.py
3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:25:23) [MSC v.1600 64 bit (AMD64)]
process took 3.6 seconds

C:\Users\rmatano\test_py35>py -3.5 test_waitpid.py
3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:27:37) [MSC v.1900 64 bit (AMD64)]
Traceback (most recent call last):
  File "twp.py", line 13, in 
pid, status = os.waitpid(ret, 0)
OSError: [Errno 0] Error

I guess this is a bug rather than a intended change in behavior, isn't it?

--
components: Library (Lib)
messages: 250723
nosy: rocco.matano
priority: normal
severity: normal
status: open
title: OSError in os.waitpid
type: behavior
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



[issue24875] pyvenv doesn´t install PIP inside a new venv with --system-site-package

2015-09-14 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



[issue25092] Regression: test_datetime fails on 3.5, Win 7, works on 3.4

2015-09-14 Thread STINNER Victor

STINNER Victor added the comment:

+#if defined _MSC_VER && _MSC_VER >= 1400 && defined(__STDC_SECURE_LIB__)
+errno = 0;
+#endif

This code is too complex. Please remove the #if and always set errno to 0, on 
any platform!

--

___
Python tracker 

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



[issue25105] Docs 3.x buildbot: ":root" found in ...

2015-09-14 Thread STINNER Victor

STINNER Victor added the comment:

It looks like a bug in the "suspicious" tool which should skip preformatted 
blocks (blocks starting with "::").


+don't provide any options to redirect it::

+

+>>> import contextlib, io, logging

+>>> f = io.StringIO()

+>>> with contextlib.redirect_stderr(f):

+... logging.warning('warning')

+...

+>>> f.getvalue()

+'WARNING:root:warning\n'

+

+(Contributed by Berker Peksag in :issue:`22389`.)

--

___
Python tracker 

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



[issue25105] Docs 3.x buildbot:

2015-09-14 Thread STINNER Victor

New submission from STINNER Victor:

It looks like the changeset 34f941df3476 introduced a bug:

http://buildbot.python.org/all/builders/Docs%203.x/builds/86/steps/suspicious/logs/stdio

writing output... [ 99%] whatsnew/3.5

WARNING: [whatsnew/3.5:924] ":root" found in "'WARNING:root:warning\n'"
WARNING: [whatsnew/3.5:924] ":warning" found in "'WARNING:root:warning\n'"
WARNING: [whatsnew/3.5:1244] "::" found in ">>> addr6 = 
ipaddress.IPv6Address('::1')"

--
assignee: docs@python
components: Documentation
messages: 250637
nosy: docs@python, haypo, yselivanov
priority: normal
severity: normal
status: open
title: Docs 3.x buildbot:
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue25105] Docs 3.x buildbot: ":root" found in ...

2015-09-14 Thread STINNER Victor

Changes by STINNER Victor :


--
title: Docs 3.x buildbot: -> Docs 3.x buildbot: ":root" found in ...

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Alecsandru Patrascu

New submission from Alecsandru Patrascu:

Hi All,

This is Alecsandru from Server Scripting Languages Optimization team at Intel 
Corporation.

I would like to submit a patch that improves the performance of the hash 
computation code on stringobject, bufferobject and unicodeobject. As can be 
seen from the attached sample performance results from the Grand Unified Python 
Benchmark, speedups up to 40% were observed. Furthermore, we see a 5-7% 
performance on OpenStack/Swift, where most of the code is in Python 2.7.

Attached is the patch that modifies Object/stringobject.c, 
Object/bufferobject.c and Object/unicodeobject.c files. We built and tested 
this patch for Python 2.7 on our Linux machines (CentOS 7/Ubuntu Server 14.04, 
Intel Xeon Haswell/Broadwell with 18/8 cores).

Steps to apply the patch:
1.  hg clone https://hg.python.org/cpython cpython 
2.  cd cpython 
3.  hg update 2.7
4.  Copy hash8.patch to the current directory 
5.  hg import --no-commit hash8.patch
6.  ./configure 
7.  make



In the following, please find our sample performance results measured on a XEON 
Haswell machine.  

Hardware (HW):  Intel XEON (Haswell) 18 Cores

BIOS settings:  Intel Turbo Boost Technology: false
Hyper-Threading: false

Operating System:   Ubuntu 14.04.3 LTS trusty

OS configuration:   CPU freq set at fixed: 2.0GHz by
echo 200 > 
/sys/devices/system/cpu/cpu*/cpufreq/scaling_min_freq
echo 200 > 
/sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq
Address Space Layout Randomization (ASLR) disabled (to 
reduce run to run variation) by
echo 0 > /proc/sys/kernel/randomize_va_space

GCC version:gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04)

Benchmark:  Grand Unified Python Benchmark (GUPB)
GUPB Source: https://hg.python.org/benchmarks/  
  

Python2.7 results:
Python source: hg clone https://hg.python.org/cpython cpython
Python Source: hg update 2.7

Benchmarks  Speedup(%)
unpack_sequence 40.32733766
chaos   24.84002537
chameleon   23.01392651
silent_logging  22.27202911
django  20.83842317
etree_process   20.46968294
nqueens 20.34234985
pathlib 19.63445919
pidigits19.34722148
etree_generate  19.25836634
pybench 19.06895825
django_v2   18.06073108
etree_iterparse 17.3797149
fannkuch17.08120879
pickle_list 16.60363602
raytrace16.0316265
slowpickle  15.86611184
pickle_dict 15.30447114
call_simple 14.42909032
richards14.2949594
simple_logging  13.6522626
etree_parse 13.38113097
json_dump_v212.2655
float   11.88164311
mako11.20606516
spectral_norm   11.04356684
hg_startup  10.57686164
mako_v2 10.37912648
slowunpickle10.24030714
go  10.03567319
meteor_contest  9.956231435
normal_startup  9.607401586
formatted_logging   9.601244811
html5lib9.082603748
2to38.741557816
html5lib_warmup 8.268150981
nbody   7.507012306
regex_compile   7.153922724
bzr_startup 7.140244739
telco   6.869411927
slowspitfire5.746323922
tornado_http5.24360121
rietveld3.865704876
regex_v83.777622219
hexiom2 3.586305282
json_dump   3.477551682
spambayes   3.183991854
fastunpickle2.971645347
fastpickle  0.673086656
regex_effbot0.127946837
json_load   0.023727176

Thank you,
Alecsandru

--
components: Interpreter Core
files: hash8-v01.patch
keywords: patch
messages: 250639
nosy: alecsandru.patrascu
priority: normal
severity: normal
status: open
title: Hash computation speedup for {buffer,string,unicode}object
type: enhancement
versions: Python 2.7
Added file: http://bugs.python.org/file40456/hash8-v01.patch

___
Python tracker 

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



[issue25099] test_compileall fails when run by unprivileged user on installed Python

2015-09-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Existing issue21264 reports about failure of different test. It may be the same 
issue or different but related issues.

--

___
Python tracker 

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



[issue25111] Broken compatibility in FrameSummary equality

2015-09-14 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
keywords: +patch
Added file: 
http://bugs.python.org/file40463/traceback_FrameSummary_equality.patch

___
Python tracker 

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



[issue25111] Broken compatibility in FrameSummary equality

2015-09-14 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Since 3.5 traceback.extract_tb() and traceback.extract_stack() return a list 
(actually list's subclass StackSummary) of FrameSummary objects instead of a 
list of tuples. FrameSummary is not fully compatible with tuple. One important 
incompatibility is in the comparing.

>>> import traceback
>>> traceback.extract_stack()[0] == ('', 1, '', '')
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/serhiy/py/cpython-3.5/Lib/traceback.py", line 254, in __eq__
return (self.filename == other.filename and
AttributeError: 'tuple' object has no attribute 'filename'

In general __eq__ shouldn't raise an exception. Issue25108 is needed to be 
fixed first for tests.

Here is a patch that restores compatibility.

An alternative solution would be to make FrameSummary a subclass of tuple 
(namedtuple).

--
components: Library (Lib)
messages: 250693
nosy: rbcollins, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Broken compatibility in FrameSummary equality
type: behavior
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Brett Cannon

Brett Cannon added the comment:

Assuming Benjamin doesn't object I don't think we need to explicit ask Guido. 
He made his feelings quite clear about allowing backports of performance 
improvements that already exist in Python 3 and have been battle-tested.

Having said that, I hope Intel is also looking at Python 3 improvements and not 
solely backporting stuff to Python 2.7. =)

--

___
Python tracker 

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



[issue24872] Add /NODEFAULTLIB:MSVCRT to _msvccompiler

2015-09-14 Thread Steve Dower

Changes by Steve Dower :


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



[issue25112] Windows installer assigns non-existent icons to Python file types

2015-09-14 Thread Thijs van Dien

New submission from Thijs van Dien:

Whenever the Python launcher is selected, the installer sets the icon for 
common Python file extensions, i.e. .py, .pyc, .pyo, .pyw, .pyz and .pyzw. 
Formerly (under Python 3.4) the icons were located in DLLs in the Python 
installation directory. The new installer assigns either py.exe,1 or py.exe,2 
as the icon. Because py.exe contains just a single icon, the only valid icon 
index is 0. As a result of the invalid icon, all Python files show up with 
either blank or generic icons. Probably those icons have not been included as 
they should have.

Tested on Windows 7 SP1, both X86 and AMD64, both fresh a fresh install and one 
with quite a bit of history. It occurs with all appropriate Python 3.5 
installers (pick any of X86/AMD64 and web/non-web). Make sure the Python 
launcher is selected; the default settings will do.

--
components: Installation, Windows
files: Screen Shot 2015-09-14 at 20.00.50.png
messages: 250696
nosy: paul.moore, steve.dower, thijsvandien, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Windows installer assigns non-existent icons to Python file types
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file40464/Screen Shot 2015-09-14 at 
20.00.50.png

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The code for str and buffer can be shared as _Py_HashBytes() (as in 3.4+). Also 
please add comments in the switch block as in 3.4+.

Should we ask Guido for granting backport exemption for this optimization?

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue25099] test_compileall fails when run by unprivileged user on installed Python

2015-09-14 Thread Brett Cannon

Brett Cannon added the comment:

It sounds like some tests just need to have a decorator that blocks execution 
if the relevant __pycache__ isn't writable.

--

___
Python tracker 

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



[issue25112] Windows installer assigns non-existent icons to Python file types

2015-09-14 Thread Steve Dower

Steve Dower added the comment:

That is indeed what happened. The resource file for the launcher was not 
updated (or the update got lost... I was fairly sure I did it)

Attached patch fixes it.

--
assignee:  -> steve.dower
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file40465/25112_1.patch

___
Python tracker 

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



[issue25102] Windows installer: 'precompile standard library' option should pre-compile with -O and -OO

2015-09-14 Thread Steve Dower

Changes by Steve Dower :


--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file40466/25102_1.patch

___
Python tracker 

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



[issue24836] Consistent failure in test_email on OS X Snow Leopard buildbot for Python 3.5

2015-09-14 Thread Geoffrey Spear

Changes by Geoffrey Spear :


--
nosy: +geoffreyspear

___
Python tracker 

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



[issue25113] documentation version switcher is broken

2015-09-14 Thread Yury Selivanov

New submission from Yury Selivanov:

The dropdown that allowed to switch the Python version for docs disappeared 
with py3.5 release.

--
messages: 250700
nosy: eric.araujo, ezio.melotti, georg.brandl, larry, yselivanov
priority: high
severity: normal
status: open
title: documentation version switcher is broken
type: enhancement
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



[issue25101] test_zipfile failure when run by unprivileged user with installed Python

2015-09-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch that check write access by just trying to create a file.

--
keywords: +patch
stage: needs patch -> patch review
versions: +Python 2.7, Python 3.4, Python 3.6
Added file: 
http://bugs.python.org/file40455/test_zipfile_check_write_access.patch

___
Python tracker 

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



[issue25098] test_uuid fails with pywin32 installed

2015-09-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Looks as a bug in pywin32.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue25093] New 3.5.0 failure in test_tcl on win7

2015-09-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Please commit corrected patch.

--
assignee:  -> zach.ware
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



[issue25088] scipy (0.16.0) install fails on 3.5

2015-09-14 Thread Naveen Togar

Naveen Togar added the comment:

Carol, Ned

Thanks for the info.  I'm going to install gfortran and proceed with the 
installing scipy and matplotlib.

Naveen

--

___
Python tracker 

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



[issue25099] test_compileall fails when run by unprivileged user on installed Python

2015-09-14 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Python 2.7 is closed for adding new features. Python 3.4+ uses different code 
for calculating hashes.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue25107] Windows 32-bit: exe-files doesn't run

2015-09-14 Thread Sergei

Changes by Sergei :


Added file: http://bugs.python.org/file40458/Clipboard02.jpg

___
Python tracker 

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



[issue25107] Windows 32-bit: exe-files doesn't run

2015-09-14 Thread Sergei

New submission from Sergei:

Can't run IDLE or python command line on Windows XP 32-bit after installation.

--
components: IDLE, Interpreter Core
files: Clipboard02.jpg
messages: 250641
nosy: Sergio
priority: normal
severity: normal
status: open
title: Windows 32-bit: exe-files doesn't run
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file40457/Clipboard02.jpg

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread STINNER Victor

STINNER Victor added the comment:

> Python 2.7 is closed for adding new features. Python 3.4+ uses different code 
> for calculating hashes.

The code doesn't modify the hash function. It's a common loop unroll 
optimization technique.

Since the optimization can be seen on real world benchmark, I think that it's 
worth to take this optimization.

--
nosy: +haypo
type: enhancement -> performance

___
Python tracker 

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



[issue25107] Windows 32-bit: exe-files doesn't run

2015-09-14 Thread Sergei

Changes by Sergei :


Removed file: http://bugs.python.org/file40457/Clipboard02.jpg

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Chris Angelico

Chris Angelico added the comment:

Or at very least, can fallthrough be used in the switch block, so there aren't 
7+6+5+4+3+2+1 copies of the same line?

-- Not a C performance expert --

--

___
Python tracker 

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



[issue25106] Hash computation speedup for {buffer, string, unicode}object

2015-09-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> Or at very least, can fallthrough be used in the switch block, so there
> aren't 7+6+5+4+3+2+1 copies of the same line?

It is how _Py_HashBytes is implemented in 3.4+.

--
title: Hash computation speedup for {buffer,string,unicode}object -> Hash 
computation speedup for {buffer, string, unicode}object

___
Python tracker 

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



[issue25108] traceback.extract_stack() compatibility break in 3.5

2015-09-14 Thread Antoine Pitrou

New submission from Antoine Pitrou:

This can be considered a regression, although perhaps it may not be desirable 
to fix it in a later release.

In 3.4:

>>> def f(): return traceback.extract_stack()
... 
>>> print([x[0:3] for x in f()])
[('', 1, ''), ('', 1, 'f')]

In 3.5:

>>> print([x[0:3] for x in f()])
[('', 1, ''), ('', 1, 'f'), 
('/home/antoine/35/lib/python3.5/traceback.py', 201, 'extract_stack')]

Note how the traceback module suddenly appears in the extracted stack. This 
breaks any application which uses a fixed offset into the returned stack to 
look up for information.

--
components: Library (Lib)
messages: 250649
nosy: larry, ncoghlan, pitrou, rbcollins
priority: normal
severity: normal
status: open
title: traceback.extract_stack() compatibility break in 3.5
type: behavior
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue25108] traceback.extract_stack() compatibility break in 3.5

2015-09-14 Thread Larry Hastings

Larry Hastings added the comment:

Tracebacks aren't my forte, but this does smell like a regression and something 
that should be fixed.

My worry about things like this is that it isn't as much a "bug" as a "badly 
implemented interface".  As in, that's the interface in 3.5, and people will 
depend on it, and we change it in a point release at our peril.  (That's why I 
didn't permit "fixing" warnings.warn(stacklevel=) for 3.4.)

--

___
Python tracker 

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



[issue25108] traceback.extract_stack() compatibility break in 3.5

2015-09-14 Thread Robert Collins

Robert Collins added the comment:

Hmm, I think we can fix this. Its leaking due to the use of a helper I think. 
So - we should just fix this [and add a test, since clearly the test coverage 
is insufficient]

--

___
Python tracker 

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



[issue25108] traceback.extract_stack() compatibility break in 3.5

2015-09-14 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Note the doc says "Extract the raw traceback from the current stack frame". The 
"current stack frame" may be assumed to be the caller's (as it is in previous 
Python releases).

Fortunately, this is also worked around by calling 
`extract_stack(sys._getframe())`.

--

___
Python tracker 

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



  1   2   >