[issue30104] Float rounding errors on AMD64 FreeBSD CURRENT Debug 3.x buildbot

2017-04-21 Thread Mark Dickinson

Mark Dickinson added the comment:

Dimitry: thank you! Indeed, that looks like the very same issue. It's a shame 
to have to use -fno-strict-aliasing here, since that might prevent legitimate 
optimisations elsewhere in the code. But if that's what we have to do to 
maintain correctness with clang, then I guess we have little choice.

--

___
Python tracker 

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



[issue30104] clang 4.0 miscompiles dtoa.c, giving broken float parsing and printing

2017-04-21 Thread Mark Dickinson

Mark Dickinson added the comment:

I seem the same issues on OS X (10.9.5) when compiling with clang 4.0 from 
MacPorts. So this doesn't seem to be FreeBSD-specific.

Changing title and raising priority: failure for repr (and marshal, JSON, etc.) 
to roundtrip seems like a critical breakage to me.

mdickinson$ CC=/opt/local/bin/clang-mp-4.0 ./configure && make && ./python.exe 
-m test test_strtod
[... log from successful build omitted ...]
Run tests sequentially
0:00:00 [1/1] test_strtod
test test_strtod failed -- multiple errors occurred; run in verbose mode for 
details
test_strtod failed

1 test failed:
test_strtod

Total duration: 65 ms
Tests result: FAILURE

--
priority: normal -> critical
title: Float rounding errors on AMD64 FreeBSD CURRENT Debug 3.x buildbot -> 
clang 4.0 miscompiles dtoa.c, giving broken float parsing and printing

___
Python tracker 

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



[issue29802] A possible null-pointer dereference in struct.s_unpack_internal()

2017-04-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 17db4b99b4d300a9b024ba0efdaa46d05d4f4cd3 by Serhiy Storchaka in 
branch '3.5':
[3.5] bpo-29802: Fix the cleaning up issue in PyUnicode_FSDecoder(). (GH-1217) 
(#1219)
https://github.com/python/cpython/commit/17db4b99b4d300a9b024ba0efdaa46d05d4f4cd3


--

___
Python tracker 

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



[issue29191] liblzma is missing from pcbuild.sln

2017-04-21 Thread Segev Finer

Segev Finer added the comment:

The PR was merged for Python 3.7. But this also affects older Python 3 versions 
that include liblzma/_lzma as far as I can tell. So I'm not closing this issue 
just yet, so that it will serve as a remainder, in case you do want to back 
port this.

Thanks for merging! :)

--

___
Python tracker 

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



[issue30104] clang 4.0 miscompiles dtoa.c, giving broken float parsing and printing

2017-04-21 Thread Mark Dickinson

Changes by Mark Dickinson :


--
components: +Build

___
Python tracker 

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



[issue30118] Adding unittest for cProfile / profile command line interface

2017-04-21 Thread Louie Lu

Changes by Louie Lu :


--
pull_requests: +1350

___
Python tracker 

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



[issue30104] clang 4.0 miscompiles dtoa.c, giving broken float parsing and printing

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 28205b203a4742c40080b4a2b4b2dcd800716edc by Victor Stinner in 
branch 'master':
bpo-30104: Use -fno-strict-aliasing on clang (#1221)
https://github.com/python/cpython/commit/28205b203a4742c40080b4a2b4b2dcd800716edc


--

___
Python tracker 

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



[issue30124] Fix C aliasing issue in Python/dtoa.c to use strict aliasing on Clang 4.0

2017-04-21 Thread STINNER Victor

New submission from STINNER Victor:

My change 28205b203a4742c40080b4a2b4b2dcd800716edc added -fno-strict-aliasing 
on clang to fix the compilation of Python/dtoa.c on clang 4.0. But it's only a 
temporary workaround until dtoa.c is fixed to respect C99 strict aliasing.

Strict aliasing allows the compiler to enable more optimization, and so should 
make Python a little bit faster. It would only fix a regression, before my 
change Python was already build with strict aliasing 

More info about the issue:

* bpo-30104
* https://bugs.llvm.org//show_bug.cgi?id=31928

--
components: Build
messages: 292018
nosy: benjamin.peterson, haypo, mark.dickinson
priority: normal
severity: normal
status: open
title: Fix C aliasing issue in Python/dtoa.c to use strict aliasing on Clang 4.0
type: performance
versions: Python 3.7

___
Python tracker 

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



[issue30104] clang 4.0 miscompiles dtoa.c, giving broken float parsing and printing

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:

Mark: "I seem the same issues on OS X (10.9.5) when compiling with clang 4.0 
from MacPorts. So this doesn't seem to be FreeBSD-specific."

I confirm, I reproduced the bug on Linux using Clang 4.0.

Mark: "But if that's what we have to do to maintain correctness with clang, 
then I guess we have little choice."

I pushed my change adding -fno-strict-aliasing compiler option to clang. I 
created the issue #30124 to fix the aliasing issue in dtoa.c.

I didn't check yet if we have to backport the -fno-strict-aliasing change, 
maybe we can wait until the aliasing issue is fixed and backport this future 
fix?

--

___
Python tracker 

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



[issue30124] Fix C aliasing issue in Python/dtoa.c to use strict aliasing on Clang 4.0

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:

I hope that you understand aliasing issues, because I don't undertand them well 
:-D So I started to create my collection of links on the topic:
https://haypo-notes.readthedocs.io/misc.html#c-aliasing

The most interesting link is:
http://cellperformance.beyond3d.com/articles/2006/06/understanding-strict-aliasing.html

--

___
Python tracker 

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



[issue30104] clang 4.0 miscompiles dtoa.c, giving broken float parsing and printing

2017-04-21 Thread Mark Dickinson

Mark Dickinson added the comment:

FWIW, I can confirm that adding `-fno-strict-aliasing` fixes all failing 
float-related tests on OS X.

--

___
Python tracker 

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



[issue30104] clang 4.0 miscompiles dtoa.c, giving broken float parsing and printing

2017-04-21 Thread Eric V. Smith

Changes by Eric V. Smith :


--
nosy: +eric.smith

___
Python tracker 

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



[issue30104] clang 4.0 miscompiles dtoa.c, giving broken float parsing and printing

2017-04-21 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1351

___
Python tracker 

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



[issue30104] clang 4.0 miscompiles dtoa.c, giving broken float parsing and printing

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:

Oh... I only tested my configure patch on Linux using ./configure CC=clang, but 
the change has no effect on FreeBSD where $CC is /usr/bin/cc and so my code 
doesn't detect clang correctly.

I proposed https://github.com/python/cpython/pull/1233 which runs "cc 
--version" to check if it contains clang. I tested this change on FreeBSD: it 
works ;-) (it adds -fno-strict-aliasing)

--

___
Python tracker 

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



[issue30115] test_logging report reference leak

2017-04-21 Thread Vinay Sajip

Vinay Sajip added the comment:

Also getting values I'm not sure how to interpret:

$ ./python -m test.regrtest -R : test_logging
Run tests sequentially
0:00:00 [1/1] test_logging
beginning 9 repetitions
123456789
.
test_logging leaked [-164, 164, -164, 0] references, sum=-164
test_logging leaked [-54, 56, -54, 2] memory blocks, sum=-50
test_logging failed in 2 min 57 sec

How can you be sure the problem is here rather than in the reference leak 
checks?

--

___
Python tracker 

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



[issue30104] clang 4.0 miscompiles dtoa.c, giving broken float parsing and printing

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 35f3d240ee5f0958034bd500949b08764e36f4dc by Victor Stinner in 
branch 'master':
bpo-30104: configure now detects when cc is clang (#1233)
https://github.com/python/cpython/commit/35f3d240ee5f0958034bd500949b08764e36f4dc


--

___
Python tracker 

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



[issue28414] SSL match_hostname fails for internationalized domain names

2017-04-21 Thread Mathieu Poussin

Mathieu Poussin added the comment:

Hello Christian.

Is there any update about this issue ?
Do we have any alternative to avoid this problem ?

Thank you.

--
nosy: +kedare

___
Python tracker 

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



[issue30106] test_asyncore: test_handle_write() fails in tearDown()

2017-04-21 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1352

___
Python tracker 

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



[issue30106] test_asyncore: test_handle_write() fails in tearDown()

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:

> AssertionError: join() timed out

The following PR fixes this race condition which occurs on FreeBSD:
https://github.com/python/cpython/pull/1234 fixes

--

___
Python tracker 

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



[issue30106] test_asyncore: test_handle_write() fails in tearDown()

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:


New changeset a2c877c3985aba4adb19755e21f477e1c639cfd9 by Victor Stinner in 
branch 'master':
bpo-30106: Fix test_asyncore.test_quick_connect() (#1234)
https://github.com/python/cpython/commit/a2c877c3985aba4adb19755e21f477e1c639cfd9


--

___
Python tracker 

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



[issue30107] python.core file created when running tests on AMD64 FreeBSD CURRENT Non-Debug 3.x buildbot

2017-04-21 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1353

___
Python tracker 

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



[issue30104] clang 4.0 miscompiles dtoa.c, giving broken float parsing and printing

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:

Ok, the FreeBSD CURRENT buildbot is repaired: "AMD64 FreeBSD CURRENT
Debug 3.x is complete: Success".

--

___
Python tracker 

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



[issue30054] Expose tracemalloc C API to track/untrack memory blocks

2017-04-21 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1354

___
Python tracker 

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



[issue30054] Expose tracemalloc C API to track/untrack memory blocks

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:

@jtaylor: Ok, I created https://github.com/python/cpython/pull/1236

--

___
Python tracker 

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



[issue30125] test_SEH() of test_ctypes logs "Windows fatal exception: access violation"

2017-04-21 Thread STINNER Victor

New submission from STINNER Victor:

Attached PR removes the following scary log.

http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Non-Debug%203.x/builds/655/steps/test/logs/stdio

Windows fatal exception: access violation

Current thread 0x0b88 (most recent call first):
  File "D:\buildarea\3.x.ware-win81-release\build\lib\unittest\case.py", line 
178 in handle
  File "D:\buildarea\3.x.ware-win81-release\build\lib\unittest\case.py", line 
733 in assertRaises
  File 
"D:\buildarea\3.x.ware-win81-release\build\lib\ctypes\test\test_win32.py", line 
47 in test_SEH
  File "D:\buildarea\3.x.ware-win81-release\build\lib\unittest\case.py", line 
605 in run
  File "D:\buildarea\3.x.ware-win81-release\build\lib\unittest\case.py", line 
653 in __call__
  File "D:\buildarea\3.x.ware-win81-release\build\lib\unittest\suite.py", line 
122 in run
  File "D:\buildarea\3.x.ware-win81-release\build\lib\unittest\suite.py", line 
84 in __call__
  File "D:\buildarea\3.x.ware-win81-release\build\lib\unittest\suite.py", line 
122 in run
  File "D:\buildarea\3.x.ware-win81-release\build\lib\unittest\suite.py", line 
84 in __call__
  File "D:\buildarea\3.x.ware-win81-release\build\lib\unittest\suite.py", line 
122 in run
  File "D:\buildarea\3.x.ware-win81-release\build\lib\unittest\suite.py", line 
84 in __call__
  File "D:\buildarea\3.x.ware-win81-release\build\lib\unittest\suite.py", line 
122 in run
  File "D:\buildarea\3.x.ware-win81-release\build\lib\unittest\suite.py", line 
84 in __call__
  File "D:\buildarea\3.x.ware-win81-release\build\lib\unittest\suite.py", line 
122 in run
  File "D:\buildarea\3.x.ware-win81-release\build\lib\unittest\suite.py", line 
84 in __call__
  File "D:\buildarea\3.x.ware-win81-release\build\lib\unittest\runner.py", line 
176 in run
  File 
"D:\buildarea\3.x.ware-win81-release\build\lib\test\support\__init__.py", line 
1896 in _run_suite
  File 
"D:\buildarea\3.x.ware-win81-release\build\lib\test\support\__init__.py", line 
1930 in run_unittest
  File 
"D:\buildarea\3.x.ware-win81-release\build\lib\test\libregrtest\runtest.py", 
line 164 in test_runner
  File 
"D:\buildarea\3.x.ware-win81-release\build\lib\test\libregrtest\runtest.py", 
line 165 in runtest_inner
  File 
"D:\buildarea\3.x.ware-win81-release\build\lib\test\libregrtest\runtest.py", 
line 119 in runtest
  File 
"D:\buildarea\3.x.ware-win81-release\build\lib\test\libregrtest\runtest_mp.py", 
line 71 in run_tests_slave
  File 
"D:\buildarea\3.x.ware-win81-release\build\lib\test\libregrtest\main.py", line 
470 in _main
  File 
"D:\buildarea\3.x.ware-win81-release\build\lib\test\libregrtest\main.py", line 
463 in main
  File 
"D:\buildarea\3.x.ware-win81-release\build\lib\test\libregrtest\main.py", line 
527 in main
  File "D:\buildarea\3.x.ware-win81-release\build\lib\test\regrtest.py", line 
46 in _main
  File "D:\buildarea\3.x.ware-win81-release\build\lib\test\regrtest.py", line 
50 in 
  File "D:\buildarea\3.x.ware-win81-release\build\lib\runpy.py", line 85 in 
_run_code
  File "D:\buildarea\3.x.ware-win81-release\build\lib\runpy.py", line 193 in 
_run_module_as_main

--
components: Windows
messages: 292030
nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: test_SEH() of test_ctypes logs "Windows fatal exception: access 
violation"
versions: Python 3.7

___
Python tracker 

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



[issue30125] test_SEH() of test_ctypes logs "Windows fatal exception: access violation"

2017-04-21 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1355

___
Python tracker 

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



[issue30124] Fix C aliasing issue in Python/dtoa.c to use strict aliasing on Clang 4.0

2017-04-21 Thread Mark Dickinson

Mark Dickinson added the comment:

dtoa.c *does* (arguably) respect C99+TC3 strict aliasing. The union trick has 
long been used as a safe and supported way to do this kind of thing, though it 
appears there's still disagreement about exactly what the standard intends.

I'd strongly prefer not to modify dtoa.c here unless we really have to.

--

___
Python tracker 

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



[issue30126] CheckTraceCallbackContent of test_sqlite3 fails on OS X Tiger

2017-04-21 Thread STINNER Victor

New submission from STINNER Victor:

I suggest to skip the following test on OS X Tiger, since it fails but I'm not 
interested to fix it and it seems to be an old SQLite bug which was fixed after 
Tiger was released (I don't see this failure on any other buildbot).

http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/569/steps/test/logs/stdio

==
FAIL: CheckTraceCallbackContent (sqlite3.test.hooks.TraceCallbackTests)
--
Traceback (most recent call last):
  File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/sqlite3/test/hooks.py", 
line 270, in CheckTraceCallbackContent
self.assertEqual(traced_statements, queries)
AssertionError: Lists differ: ['cre[19 chars]'insert into foo(x) values(1)', 
'insert into foo(x) values(1)'] != ['cre[19 chars]'insert into foo(x) 
values(1)']

First list contains 1 additional elements.
First extra element 2:
'insert into foo(x) values(1)'

+ ['create table foo(x)', 'insert into foo(x) values(1)']
- ['create table foo(x)',
-  'insert into foo(x) values(1)',
-  'insert into foo(x) values(1)']

--

--
components: Tests, macOS
messages: 292032
nosy: haypo, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: CheckTraceCallbackContent of test_sqlite3 fails on OS X Tiger
versions: Python 3.7

___
Python tracker 

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



[issue30126] CheckTraceCallbackContent of test_sqlite3 fails on OS X Tiger

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:

SQLite version:

Re-running test 'test_sqlite' in verbose mode
test_sqlite: testing with version '2.6.0', sqlite_version '3.6.11'

--

___
Python tracker 

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



[issue30124] Fix C aliasing issue in Python/dtoa.c to use strict aliasing on Clang 4.0

2017-04-21 Thread Mark Dickinson

Mark Dickinson added the comment:

In case anyone wants to have a go at interpreting the standard, the most 
immediately relevant part is the footnote to C99+TC3 6.5.2.3p3:

"""
If the member used to access the contents of a union object is not the same as 
the member last used to store a value in the object, the appropriate part of 
the object representation of the value is reinterpreted as an object 
representation in the new type as described in 6.2.6 (a process sometimes 
called "type punning"). This might be a trap representation.
"""

Trap representations could potentially cause undefined behaviour, but are 
highly unlikely to occur in practice for us for this particular case, so I 
don't think they can possibly serve as the excuse for clang's behaviour.

The "reinterpreted as ..." language here strongly suggests that the union trick 
should be supported.

OTOH, this is just a footnote, so not normative ...

--

___
Python tracker 

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



[issue30124] Fix C aliasing issue in Python/dtoa.c to use strict aliasing on Clang 4.0

2017-04-21 Thread Mark Dickinson

Changes by Mark Dickinson :


--
nosy: +eric.smith

___
Python tracker 

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



[issue30126] CheckTraceCallbackContent of test_sqlite3 fails on OS X Tiger

2017-04-21 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1356

___
Python tracker 

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



[issue30126] CheckTraceCallbackContent of test_sqlite3 fails on OS X Tiger

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:

The test is already skipped on SQLite version older than 3.3.9, no idea why the 
test fails on SQLite version 3.6.11 on OS X Tiger:

@unittest.skipIf(sqlite.sqlite_version_info < (3, 3, 9),
 "sqlite3_prepare_v2 is not available") 

I proposed the PR https://github.com/python/cpython/pull/1238

--

___
Python tracker 

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



[issue30126] CheckTraceCallbackContent of test_sqlite3 fails on OS X Tiger

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:

It's even more strange. The test started to fail since this build, Sun Apr 9 
10:10:15 2017:

http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/528

test_sqlite: testing with version '2.6.0', sqlite_version '3.6.11'
...
test test_sqlite failed


Sadly, before the test passed and so the SQLite version wasn't logged:

http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/527/steps/test/logs/stdio
0:26:24 [227/404/1] test_sqlite passed


@David Bolen: Did you make a change, like an upgrade, on this buildbot slave 
around Apr 9, 2017?

--
nosy: +db3l

___
Python tracker 

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



[issue30124] Fix C aliasing issue in Python/dtoa.c to use strict aliasing on Clang 4.0

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:

> I'd strongly prefer not to modify dtoa.c here unless we really have to.

See the clang bug report:
https://bugs.llvm.org//show_bug.cgi?id=31928

--

___
Python tracker 

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



[issue30124] Fix C aliasing issue in Python/dtoa.c to use strict aliasing on Clang 4.0

2017-04-21 Thread Mark Dickinson

Mark Dickinson added the comment:

And the basic rule that bans aliasing in the first place is C99 6.5p7:
"""
An object shall have its stored value accessed only by an lvalue expression 
that has one of the following types ...
"""
But I'd argue that the "an aggregate or union type" subclause of 6.5p7 covers 
this case.

--

___
Python tracker 

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



[issue30124] Fix C aliasing issue in Python/dtoa.c to use strict aliasing on Clang 4.0

2017-04-21 Thread Mark Dickinson

Mark Dickinson added the comment:

> See the clang bug report:

Yes, I've read it. And I think the Clang folks are wrong in their 
interpretation of the standard. And even if they're not, they're going to break 
a lot of code with this change: the union trick has been widely accepted as a 
valid way to do things.

--

___
Python tracker 

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



[issue30124] Fix C aliasing issue in Python/dtoa.c to use strict aliasing on Clang 4.0

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:

> Yes, I've read it. And I think the Clang folks are wrong in their 
> interpretation of the standard. And even if they're not, they're going to 
> break a lot of code with this change: the union trick has been widely 
> accepted as a valid way to do things.

If Clang decides or not to handle union will decide if Python has or has no to 
change dtoa.c :-) (I would prefer to keep -fstrict-aliasing).

--

___
Python tracker 

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



[issue30122] Added missing archive programs and close option to Windows docs.

2017-04-21 Thread R. David Murray

R. David Murray added the comment:

Please close the redundant PRs.  I've commented on pr1228.

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



[issue30122] Added missing archive programs and close option to Windows docs.

2017-04-21 Thread R. David Murray

R. David Murray added the comment:

To be clear: backport PRs should be created only after a PR has been approved.

--

___
Python tracker 

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



[issue30122] Added missing archive programs and close option to Windows docs.

2017-04-21 Thread R. David Murray

R. David Murray added the comment:

Also, please review the (newly rewritten) section in the devguide about PRs.  I 
see now that there were changes made from the original here already, but I 
don't see the commits that made those changes.  The history of changes should 
be kept during PR development (they get squashed at the end).

--

___
Python tracker 

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



[issue30127] argparse action not correctly describing the right behavior

2017-04-21 Thread Diego Costantini

New submission from Diego Costantini:

Here https://docs.python.org/2/library/argparse.html#action we have the 
following:

>>> parser = argparse.ArgumentParser()
>>> parser.add_argument('--foo', action='store_true')
>>> parser.add_argument('--bar', action='store_false')
>>> parser.add_argument('--baz', action='store_false')
>>> parser.parse_args('--foo --bar'.split())
Namespace(bar=False, baz=True, foo=True)

baz should be False because omitted.
I also tested it.

--
assignee: docs@python
components: Documentation
messages: 292044
nosy: Diego Costantini, docs@python
priority: normal
severity: normal
status: open
title: argparse action not correctly describing the right behavior
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



[issue30127] argparse action not correctly describing the right behavior

2017-04-21 Thread Eric V. Smith

Eric V. Smith added the comment:

I think the example is correct. Because baz's action is store_false, the 
default is True. So if baz is omitted, it should have a True value. That's what 
the example shows, and what I see when I run this code.

Can you show what you tested, what you saw, and what you expected?

--
nosy: +eric.smith

___
Python tracker 

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



[issue30127] argparse action not correctly describing the right behavior

2017-04-21 Thread Diego Costantini

Diego Costantini added the comment:

You are right, I misunderstood the part where it sets defaults opposite to the 
stored value, although apparently over one year ago I did understand it 
correctly when I first went through that documentation.

Today my second pair of eyes had my same understanding of it though :)

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

___
Python tracker 

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



[issue26264] keyword module missing async and await keywords

2017-04-21 Thread Михайло Гавеля

Changes by Михайло Гавеля :


--
pull_requests: +1357

___
Python tracker 

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



[issue30124] Fix C aliasing issue in Python/dtoa.c to use strict aliasing on Clang 4.0

2017-04-21 Thread Mark Dickinson

Mark Dickinson added the comment:

> (I would prefer to keep -fstrict-aliasing).

Updating dtoa.c would be a large and error-prone task. It may be simpler to 
adjust the buildsystem so that we can specify -fno-strict-aliasing just for 
dtoa.c.

--

___
Python tracker 

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



[issue30124] Fix C aliasing issue in Python/dtoa.c to use strict aliasing on Clang 4.0

2017-04-21 Thread Mark Dickinson

Mark Dickinson added the comment:

> Updating dtoa.c would be a large and error-prone task.

It would also take us even further away from the upstream sources, making it 
harder to integrate bugfixes from upstream.

--

___
Python tracker 

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



[issue30128] xid_start definition for Unicode identifiers refers to xid_continue

2017-04-21 Thread Ralph Corderoy

New submission from Ralph Corderoy:

https://docs.python.org/3/reference/lexical_analysis.html#identifiers has a 
grammar.

identifier   ::=  xid_start xid_continue*
id_start ::=  
id_continue  ::=  
xid_start::=  
xid_continue ::=  

I struggle to make sense of it unless I remove `xid_continue*' from 
`xid_start's definition.
I suspect it ended up there due to cut and paste.

--
assignee: docs@python
components: Documentation
messages: 292049
nosy: docs@python, ralph.corderoy
priority: normal
severity: normal
status: open
title: xid_start definition for Unicode identifiers refers to xid_continue
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



[issue30129] functools.partialmethod should look more like what it's impersonating.

2017-04-21 Thread Skip Montanaro

New submission from Skip Montanaro:

I needed to create a partial method in Python 2.7, so I grabbed 
functools.partialmethod from a Python 3.5.2 install. For various reasons, one 
of the reasons I wanted this was to suck in some methods from a delegated class 
so they appeared in dir() and help() output on the primary class (the one 
containing the partialmethod objects). Suppose I have

class Something:
  def meth(self, arg1, arg2):
"meth doc"
return arg1 + arg2

then in the metaclass for another class I construct an attribute (call it 
"mymeth") which is a partialmethod object. When I (for example), run pydoc, 
that other class's attribute appears as:

mymeth = 

It would be nice if it at least included the doc string from meth, something 
like:

mymeth = 
meth doc

Even better would be a proper signature:

mymeth(self, arg1, arg2)
meth doc

In my copy of functools.partialmethod, I inserted an extra line in __get__, 
right after the call to partial():

results.__doc__ = self.func.__doc__

That helps a bit, as I can

print("mymeth doc:", inst.mymeth.__doc__)

and see

mymeth doc: meth doc

displayed. That's not enough for help()/pydoc though.

I suspect the heavy lifting will have to be done in pydoc.Doc.document(). 
inspect.isroutine() returns False for functools.partial objects. I also see 
_signature_get_partial() in inspect.py. That might be the source of the 
problem. When I create a partialmethod object in my little example, it actually 
looks like a functools.partial object, not a partialmethod object. It's not 
clear that this test:

if isinstance(partialmethod, functools.partialmethod):

in inspect._signature_from_callable() is testing for the correct type.

Apologies that I can't easily provide a detailed example. My Python 2.x 
metaclass example (where I'm smashing methods from one class into another) 
doesn't work in Python 3.x for some reason, the whole partialmethod thing isn't 
available in Python 2.x (inspect doesn't know about partialmethod or partial) 
and it's not really a "hello world"-sized example anyway. I'll beat on things a 
bit more to try and craft a workable Python 3.x example.

--
components: Library (Lib)
messages: 292050
nosy: skip.montanaro
priority: normal
severity: normal
status: open
title: functools.partialmethod should look more like what it's impersonating.
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue30129] functools.partialmethod should look more like what it's impersonating.

2017-04-21 Thread R. David Murray

R. David Murray added the comment:

Yes, please do provide an example. Your final words do not make a convincing 
case that this is a problem in python3 :)

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



[issue30126] CheckTraceCallbackContent of test_sqlite3 fails on OS X Tiger

2017-04-21 Thread Aviv Palivoda

Aviv Palivoda added the comment:

> It's even more strange. The test started to fail since this build, Sun Apr 9 
> 10:10:15 2017:

This was merged on Apr 9 (commit 0e6cb2ea624570ed08c354f1ed1f595dab4192d6).

>From a quick look in the internet some other people had a similar problem:
http://stackoverflow.com/questions/28973887/how-to-fix-sqlite3-libversion-mismatch

It seems there might be mismatch between sqlite3_libversion() and 
SQLITE_VERSION. I am not familiar with the buildbots but can you run a test 
that check that sqlite3_libversion() == SQLITE_VERSION?

--
nosy: +palaviv

___
Python tracker 

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



[issue30130] array.array is not an instance of collections.MutableSequence

2017-04-21 Thread Alexander Gosselin

New submission from Alexander Gosselin:

array.array has all of the methods required by collections.MutableSequence, but:

>>> import array
>>> import collections
>>> isinstance(array.array, collections.MutableSequence)
False

--
messages: 292053
nosy: Alexander Gosselin
priority: normal
severity: normal
status: open
title: array.array is not an instance of collections.MutableSequence
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



[issue30124] Fix C aliasing issue in Python/dtoa.c to use strict aliasing on Clang 4.0

2017-04-21 Thread Eric V. Smith

Eric V. Smith added the comment:

I agree we shouldn't do anything heroic to "fix" dtoa.c. I'd wait and see if 
Gay (or other maintainers) will chose an approach if Clang keeps this behavior.

At most, I think Mark's idea to use -fno-strict-aliasing only on dtoa.c and 
nowhere else would be the better approach.

--

___
Python tracker 

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



[issue30126] CheckTraceCallbackContent of test_sqlite3 fails on OS X Tiger

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:

> It seems there might be mismatch between sqlite3_libversion() and 
> SQLITE_VERSION. I am not familiar with the buildbots but can you run a test 
> that check that sqlite3_libversion() == SQLITE_VERSION?

The Python sqlite3 exports sqlite3_libversion() as sqlite3.sqlite_version, 
"3.6.11" on OS X Tiger.

The doc https://sqlite.org/c3ref/libversion.html says "These interfaces 
[sqlite3_libversion()] provide the same information as the SQLITE_VERSION, ..."

I don't know how to check, I don't have access to the buildbot.

--

___
Python tracker 

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



[issue30125] test_SEH() of test_ctypes logs "Windows fatal exception: access violation"

2017-04-21 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1358

___
Python tracker 

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



[issue30107] python.core file created when running tests on AMD64 FreeBSD CURRENT Non-Debug 3.x buildbot

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 2a1aed04b0943636f605543522e16cca1dc23e70 by Victor Stinner in 
branch 'master':
bpo-30107: don't dump core on expected test_io crash (#1235)
https://github.com/python/cpython/commit/2a1aed04b0943636f605543522e16cca1dc23e70


--

___
Python tracker 

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



[issue30107] python.core file created when running tests on AMD64 FreeBSD CURRENT Non-Debug 3.x buildbot

2017-04-21 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1359

___
Python tracker 

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



[issue30125] test_SEH() of test_ctypes logs "Windows fatal exception: access violation"

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 46c2b81026bbf966c0898a1fa30d98c33673aea0 by Victor Stinner in 
branch 'master':
bpo-30125: Fix faulthandler.disable() on Windows (#1240)
https://github.com/python/cpython/commit/46c2b81026bbf966c0898a1fa30d98c33673aea0


--

___
Python tracker 

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



[issue30131] test_logging leaks a "dangling" thread

2017-04-21 Thread STINNER Victor

New submission from STINNER Victor:

Example on Windows from AppVeyor:

https://ci.appveyor.com/project/python/cpython/build/3.7.0a0.1402

Warning -- threading._dangling was modified by test_logging
  Before: <_weakrefset.WeakSet object at 0x027CBE30>
  After:  <_weakrefset.WeakSet object at 0x027CBFF0>

I also saw this warning on FreeBSD buildbots.

--
components: Tests
messages: 292058
nosy: haypo
priority: normal
severity: normal
status: open
title: test_logging leaks a "dangling" thread
type: resource usage
versions: Python 3.7

___
Python tracker 

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



[issue30117] test_lib2to3.test_parser.test_all_project_files() fails

2017-04-21 Thread Eric Appelt

Changes by Eric Appelt :


--
pull_requests: +1360

___
Python tracker 

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



[issue30117] test_lib2to3.test_parser.test_all_project_files() fails

2017-04-21 Thread Eric Appelt

Eric Appelt added the comment:

I added a PR to fix these two (in my opinion) spurious failure conditions in 
the lib2to3.tests.test_parser.TestParserIdempotency test_parser test with the 
following changes to the test:

1. Use the same encoding found in the initial file to write a temp file for a 
diff. This retains the BOM if the encoding was initially utf-8-sig.

2. If the file cannot be parsed using the normal grammar, try again with no 
print statement which should succeed for valid files using future print_function

For case (1), the driver was correctly handling a BOM in a utf-8 file, but then 
the test was not writing a comparison file using 'utf-8-sig' to diff against, 
so the BOM got removed. I don't think that is the fault of the parser, and 
lib2to3 will retain the BOM.

For case (2), lib2to3 pre-detects the use of from __future__ import 
print_function or allows the user to force this interpretation with a -p flag, 
and then selects a different grammar with the print statement removed. That 
makes the test cases unfair to this test as the driver itself doesn't know 
which grammar to use. As a minimal fix, the test will try using a grammar with 
the print statement, and if that fails fall back on a grammar without it. A 
more thorough handling of the idempotency test would to be to parse all files 
using both grammars and ignore if one of the two failed but otherwise check 
both. I didn't think this was necessary but can change.

--
nosy: +Eric Appelt

___
Python tracker 

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



[issue30125] test_SEH() of test_ctypes logs "Windows fatal exception: access violation"

2017-04-21 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1361

___
Python tracker 

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



[issue30132] test_distutils leaks a vc140.pdb file

2017-04-21 Thread STINNER Victor

New submission from STINNER Victor:

http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x/builds/566/steps/test/logs/stdio

Warning -- files was modified by test_distutils
  Before: []
  After:  ['vc140.pdb']

--
components: Tests, Windows
messages: 292060
nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: test_distutils leaks a vc140.pdb file
type: resource usage
versions: Python 3.7

___
Python tracker 

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



[issue30132] [Windows] test_distutils leaks a vc140.pdb file

2017-04-21 Thread STINNER Victor

Changes by STINNER Victor :


--
title: test_distutils leaks a vc140.pdb file -> [Windows] test_distutils leaks 
a vc140.pdb file

___
Python tracker 

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



[issue17703] Trashcan mechanism segfault during interpreter finalization in Python 2.7.4

2017-04-21 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



[issue30107] python.core file created when running tests on AMD64 FreeBSD CURRENT Non-Debug 3.x buildbot

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:


New changeset b984a05d557e78b928f38098d0b6c0e95f737b9a by Victor Stinner in 
branch '3.6':
bpo-30107: don't dump core on expected test_io crash (#1235) (#1241)
https://github.com/python/cpython/commit/b984a05d557e78b928f38098d0b6c0e95f737b9a


--

___
Python tracker 

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



[issue30085] Discourage operator.__dunder__ functions

2017-04-21 Thread Sanket Dasgupta

Sanket Dasgupta added the comment:

@terry, I have updated the same, thanks!

--
nosy: +sanketdg

___
Python tracker 

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



[issue30121] Windows: subprocess debug assertion on failure to execute the process

2017-04-21 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



[issue30130] array.array is not an instance of collections.MutableSequence

2017-04-21 Thread Jim Fasarakis-Hilliard

Jim Fasarakis-Hilliard added the comment:

Thanks for the bug report, Alexander. This is related, if not a superseder, of: 
https://bugs.python.org/issue29727

--
nosy: +Jim Fasarakis-Hilliard

___
Python tracker 

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



[issue29840] Avoid raising OverflowError in bool()

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:

Hum, I dislike this change since it's non-obvious what/who is raising the 
OverflowError. If an object calls a function in __len__() and the function 
raises OverflowError, should we consider that object is "true"? In temptation 
to guess, I prefer to not guess but passthrough the exception.

If you want to support bool(range(1<<1000)), we need to get the result of 
__len__() as a Python object rather than a C Py_ssize_t.

Maybe, if __len__() raises an OverflowError: call again the len(), but using 
the "__len__" method instead of the slot?

--

___
Python tracker 

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



[issue29950] Rename SlotWrapperType to WrapperDescriptorType

2017-04-21 Thread Jim Fasarakis-Hilliard

Jim Fasarakis-Hilliard added the comment:

This was added in python/typing just a couple of days ago, so I'm bumping to 
maybe get the PR to python/cpython merged too.

--

___
Python tracker 

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



[issue29191] liblzma is missing from pcbuild.sln

2017-04-21 Thread Steve Dower

Steve Dower added the comment:

Yeah, merging into master is easy right now, but backports are still manual 
effort. It should only require 3.6, so I'll try to get to it today.

--

___
Python tracker 

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



[issue29191] liblzma is missing from pcbuild.sln

2017-04-21 Thread Steve Dower

Changes by Steve Dower :


--
pull_requests: +1362

___
Python tracker 

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



[issue23404] 'make touch' does not work with git clones of the source repository

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:

FYI 3 FreeBSD buildbots are currently broken because of this issue.

--
nosy: +haypo

___
Python tracker 

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



[issue23404] 'make touch' does not work with git clones of the source repository

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:

> Anyway my preference was to stop automatically regenerating files, and to 
> keep the build system as simple as practical without hacks like the BOOT="#" 
> flag.

In the past, this issue bite me so many times on Solaris, FreeBSD, etc. One 
because there was not "python" command, then because "python" was an old python 
2.6 and so hg touch didn't work, etc.

It's "nice" to try to keep track of build dependencies, but in pratice it is 
super painful. So I'm also in favor of removing these build dependencies based 
on file modification file, and maybe document how to force a rebuild (do you 
really need to do that? developers hacking special files know how to rebuild 
generated files, no?).

--

___
Python tracker 

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



[issue30060] Crash on Py_Finalize if Py_NoSiteFlag is used

2017-04-21 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



[issue30130] array.array is not an instance of collections.MutableSequence

2017-04-21 Thread Alexander Gosselin

Alexander Gosselin added the comment:

Thanks for taking a look at this. I think array is little used, so registering 
it as a member of some of the abstract base classes in collections could easily 
have been overlooked.

One of the prerequisites for membership in MutableSequence is a .clear() 
method, and array doesn't have one, though there is no reason why it shouldn't. 
Here's the workaround that I'm using:

import array
import collections

class array(array.array,
collections.MutableSequence):
__slots__ = ()

def __reversed__(self):
# this is a bit hacky
return reversed(self.tolist())

def clear(self):
self.__setitem__(slice(None), self.__class__(self.typecode))

Here are some results:

>>> a = array('f', [1,2,3,4])
>>> list(reversed(a))
[4.0, 3.0, 2.0, 1.0]
>>> a.clear()
>>> a
array('f')

--

___
Python tracker 

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



[issue30129] functools.partialmethod should look more like what it's impersonating.

2017-04-21 Thread Skip Montanaro

Skip Montanaro added the comment:

Yeah, sorry about that. I work in an environment where I can't "eject" any
code from my work computer. I've come up with a simple Python3 example, but
it will have to wait until I can recreate it from scratch on my home
computer.

--

___
Python tracker 

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



[issue29077] build failure when enabling dtrace on FreeBSD

2017-04-21 Thread cburroughs

Changes by cburroughs :


--
nosy: +cburroughs

___
Python tracker 

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



[issue30122] Added missing archive programs.

2017-04-21 Thread Decorater

Decorater added the comment:

Oh

--
title: Added missing archive programs and close option to Windows docs. -> 
Added missing archive programs.

___
Python tracker 

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



[issue28787] Out of tree --with--dtrace builds fail with a traceback

2017-04-21 Thread cburroughs

Changes by cburroughs :


--
nosy: +cburroughs

___
Python tracker 

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



[issue28909] Adding LTTng-UST tracing support

2017-04-21 Thread cburroughs

Changes by cburroughs :


--
nosy: +cburroughs

___
Python tracker 

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



[issue29191] liblzma is missing from pcbuild.sln

2017-04-21 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 1ccbe6007e5569ab25170f8ecddd5fbbc2ef36b0 by Mariatta (Steve 
Dower) in branch '3.6':
bpo-29191: Add liblzma.vcxproj to pcbuild.sln and other missing entries 
(GH-1222) (GH-1244)
https://github.com/python/cpython/commit/1ccbe6007e5569ab25170f8ecddd5fbbc2ef36b0


--
nosy: +Mariatta

___
Python tracker 

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



[issue29191] liblzma is missing from pcbuild.sln

2017-04-21 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Thanks everyone :) I merged the backport PR, so I'm closing this issue.

While backporting is still a manual effort, this utility script automates some 
part of it. https://github.com/python/core-workflow/tree/master/cherry_picker

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



[issue28909] Adding LTTng-UST tracing support

2017-04-21 Thread Charalampos Stratakis

Charalampos Stratakis added the comment:

Just a small note here for the documentation patch.

yum is deprecated in Fedora, and dnf is now the default package manager, so the 
respective instructions for Fedora should reflect that.

--
nosy: +cstratak

___
Python tracker 

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



[issue30126] CheckTraceCallbackContent of test_sqlite3 fails on OS X Tiger

2017-04-21 Thread David Bolen

David Bolen added the comment:

No recent changes to the buildbot (I think the last was in September to bump 
the local python used to run the slave/build installer to 2.7).

The default system sqlite (/usr/lib) is 3.0.8.6, so extremely old, but 3.6.11 
is in /usr/local/{lib,include} from early days of setting up the slave, so only 
marginally less old.  As long as the python build process finds that (which it 
appears to) it should be consistent.

I configured and built a local 3.x branch version of python on the slave and 
modified it to dump the version info during module initialization:

> ./python.exe
Python 3.7.0a0 (heads/master:d1ae24e, Apr 21 2017, 15:06:29) 
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
SQLITE_VERSION: 3.6.11
SQLITE_VERSION_NUMBER: 3006011
sqlite3_libversion: 3.6.11

so it appears to be in line.  This local build still fails the test.

Maybe whatever feature is needed for this test is broken with 3.6.11.

One thing I did notice, though I suspect it's not an issue, but the 3.6.11 this 
slave is using seems to fall into the gap in the original bpo-9303 _v2 support 
patch where a _v2 prepare with a plain close (versions >= 3.3.9 and <3.7.14).  
Both plain and _v2 close methods have the same signature, but I wonder if there 
might be an issue mixing and matching?

I don't think anything else has a hard dependency on my /usr/local libraries on 
the slave at this point (the dmg installer builds its own local copies), so I 
could try updating that to a more current sqlite3 if we wanted to see if that 
resolved the issue.

--

___
Python tracker 

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



[issue30126] CheckTraceCallbackContent of test_sqlite3 fails on OS X Tiger

2017-04-21 Thread David Bolen

David Bolen added the comment:

The test appears to pass against a local test build of sqlite3 3.18.0, so I'll 
probably just plan on updating the slave to that later tonight.  Unless anyone 
is interested in figuring out why it fails with 3.6.11 and not 3.18.0 (e.g., 
does the test have a higher minimum version than it currently declares).

--

___
Python tracker 

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



[issue30098] Verbose TypeError for asyncio.ensure_future

2017-04-21 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
stage:  -> backport needed
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



[issue30098] Verbose TypeError for asyncio.ensure_future

2017-04-21 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset ae5b3260dd459845aad8a30491b76d471577785d by Mariatta (Charles 
Renwick) in branch 'master':
bpo-30098: Clarify that run_coroutine_threadsafe expects asyncio.Future   
(GH-1170)
https://github.com/python/cpython/commit/ae5b3260dd459845aad8a30491b76d471577785d


--
nosy: +Mariatta

___
Python tracker 

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



[issue30125] test_SEH() of test_ctypes logs "Windows fatal exception: access violation"

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 3a8f8ea2aca46f9ef1e715f2c924357b6719525f by Victor Stinner in 
branch '3.6':
bpo-30125: Fix faulthandler.disable() on Windows (#1243)
https://github.com/python/cpython/commit/3a8f8ea2aca46f9ef1e715f2c924357b6719525f


--

___
Python tracker 

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



[issue30133] Strings that end with properly escaped backslashes cause error to be thrown in re.search/sub/etc. functions.

2017-04-21 Thread Patrick Foley

New submission from Patrick Foley:

The following code demonstrates:

import re
text = 'ab\\'
exp = re.compile('a')
print(re.sub(exp, text, ''))

If you remove the backslash(es), the code runs fine.

This appears to be specific to the re module and only to strings that end in 
(even properly escaped) backslashes. You could easily receive raw data like 
this from freehand input sources so it would be nice not to have to remove 
trailing backslashes before running a regular expression.

--
components: Regular Expressions
files: sample.py
messages: 292079
nosy: Patrick Foley, ezio.melotti, mrabarnett
priority: normal
severity: normal
status: open
title: Strings that end with properly escaped backslashes cause error to be 
thrown in re.search/sub/etc. functions.
versions: Python 2.7, Python 3.4
Added file: http://bugs.python.org/file46822/sample.py

___
Python tracker 

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



[issue30133] Strings that end with properly escaped backslashes cause error to be thrown in re.search/sub/etc. functions.

2017-04-21 Thread R. David Murray

R. David Murray added the comment:

I think you are missing a re.escape around text.  Text is otherwise not a valid 
replacement pattern.

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



[issue30125] test_SEH() of test_ctypes logs "Windows fatal exception: access violation"

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:


New changeset a36e939aeb3b5a2c56561eb24f0e339eee9f3f9d by Victor Stinner in 
branch 'master':
bpo-30125: disable faulthandler in ctypes test_SEH (#1237)
https://github.com/python/cpython/commit/a36e939aeb3b5a2c56561eb24f0e339eee9f3f9d


--

___
Python tracker 

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



[issue29903] struct.Struct Addition

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:

I dislike this feature. I reject it: Serhiy, Raymond and me dislike it.

I never needed this feature and a correct implementation can be very complex if 
you have to take care of endian, alignement, etc. It's trivial to implement you 
own add using the format attribute if you want the simple implementation 
format1+format2.

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



[issue30075] Printing ANSI Escape Sequences on Windows 10

2017-04-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This is a (duplicate) enhancement request, not a bug report.  The superseder 
field is for when an issue is closed as a duplicate; I decided that this should 
be.  Further discussion should be on python-ideas.

--
nosy: +terry.reedy
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
type: behavior -> enhancement
versions: +Python 3.7 -Python 2.7, Python 3.6

___
Python tracker 

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



[issue30129] functools.partialmethod should look more like what it's impersonating.

2017-04-21 Thread Skip Montanaro

Changes by Skip Montanaro :


Added file: http://bugs.python.org/file46823/partial3.py

___
Python tracker 

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



[issue30129] functools.partialmethod should look more like what it's impersonating.

2017-04-21 Thread Skip Montanaro

Changes by Skip Montanaro :


--
keywords: +patch
Added file: http://bugs.python.org/file46824/ft.diff

___
Python tracker 

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



[issue29059] Windows: Python not using ANSI compatible console

2017-04-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

In #30075, Tithen Firion reports that "subprocess.call('', shell=True)" leaves 
the console in ANSI mode.  In Eryk Sun says that this is likely a bug in 
cmd.exe and gives improved code for putting the console in VT mode, when this 
is possible.  I closed that issue as a duplicate of this.

--
nosy: +terry.reedy
stage:  -> resolved

___
Python tracker 

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



[issue28041] Inconsistent behavior: Get st_nlink from os.stat() and os.scandir()

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:

scandir () is designed for effiency, not for portability or correctness. The 
API has deliberate limitations which are well documented, as the one you 
spotted:
https://docs.python.org/dev/library/os.html#os.DirEntry.stat

Your PR would defeat the whole purpose of scandir.

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

___
Python tracker 

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



[issue29867] Add asserts in PyXXX_GET_SIZE macros

2017-04-21 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 1a5856bf9295fa73995898d576e0bedf016aee1f by Victor Stinner 
(Serhiy Storchaka) in branch 'master':
bpo-29867: Add asserts in PyTuple_GET_SIZE, PyList_GET_SIZE and PySet_GET_SIZE. 
(#751)
https://github.com/python/cpython/commit/1a5856bf9295fa73995898d576e0bedf016aee1f


--

___
Python tracker 

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



  1   2   >