[issue23591] enum: Add Flags and IntFlags

2016-08-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 39661e2ff030 by Ethan Furman in branch 'default':
issue23591: add Flags, IntFlags, and tests
https://hg.python.org/cpython/rev/39661e2ff030

--
nosy: +python-dev

___
Python tracker 

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



[issue27904] Let logging format more messages on demand

2016-08-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1340e298aa7e by Vinay Sajip in branch 'default':
Closes #27904: Improved logging statements to defer formatting until needed.
https://hg.python.org/cpython/rev/1340e298aa7e

--
nosy: +python-dev
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue27908] del _limbo[self] KeyError

2016-08-31 Thread Dima Tisnek

New submission from Dima Tisnek:

To reproduce:

```
import threading
import time


class U(threading.Thread):
def run(self):
time.sleep(1)
if not x.ident:
x.start()


x = U()
for u in [U() for i in range(1)]: u.start()

time.sleep(10)
```

Chance to reproduce ~20% in my setup.
This script has a data race (check then act on x.ident).
I expected it to occasionally hit `RuntimeError: threads can only be started 
once`

Instead, I get:
```
Unhandled exception in thread started by >
Traceback (most recent call last):
  File "/usr/lib64/python3.5/threading.py", line 882, in _bootstrap
self._bootstrap_inner()
  File "/usr/lib64/python3.5/threading.py", line 906, in _bootstrap_inner
del _limbo[self]
KeyError: 
```

--
components: Library (Lib)
messages: 274005
nosy: Dima.Tisnek
priority: normal
severity: normal
status: open
title: del _limbo[self] KeyError
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



[issue27908] del _limbo[self] KeyError

2016-08-31 Thread SilentGhost

Changes by SilentGhost :


--
components: +Extension Modules
nosy: +brett.cannon
type:  -> behavior

___
Python tracker 

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



[issue27907] Misspelled variable in test_asyncio/test_events

2016-08-31 Thread SilentGhost

Changes by SilentGhost :


--
components: +Library (Lib)
nosy: +giampaolo.rodola, gvanrossum, haypo, yselivanov
stage:  -> patch review
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



[issue27900] ctypes fails to find ncurses via ncursesw on Arch Linux

2016-08-31 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +amaury.forgeotdarc, belopolsky, meador.inge

___
Python tracker 

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



[issue27908] del _limbo[self] KeyError

2016-08-31 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +tim.peters

___
Python tracker 

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



[issue27904] Let logging format more messages on demand

2016-08-31 Thread Xiang Zhang

Xiang Zhang added the comment:

Vinay, this patch introduces regressions.

You can either revert this part:

--- a/Lib/distutils/cmd.py
+++ b/Lib/distutils/cmd.py
@@ -329,8 +329,7 @@ class Command:
 # -- External world manipulation ---

 def warn(self, msg):
-log.warn("warning: %s: %s\n" %
-(self.get_command_name(), msg))
+log.warn("warning: %s: %s\n", self.get_command_name(), msg)

 def execute(self, func, args, msg=None, level=1):
 util.execute(func, args, msg, dry_run=self.dry_run)

or change the test suites to:

diff -r 1340e298aa7e Lib/distutils/tests/test_build_py.py
--- a/Lib/distutils/tests/test_build_py.py  Wed Aug 31 08:22:29 2016 +0100
+++ b/Lib/distutils/tests/test_build_py.py  Wed Aug 31 16:59:27 2016 +0800
@@ -168,7 +168,8 @@
 finally:
 sys.dont_write_bytecode = old_dont_write_bytecode
 
-self.assertIn('byte-compiling is disabled', self.logs[0][1])
+self.assertIn('byte-compiling is disabled',
+  self.logs[0][1] % self.logs[0][2])
 
 
 def test_suite():
diff -r 1340e298aa7e Lib/distutils/tests/test_install_lib.py
--- a/Lib/distutils/tests/test_install_lib.py   Wed Aug 31 08:22:29 2016 +0100
+++ b/Lib/distutils/tests/test_install_lib.py   Wed Aug 31 16:59:27 2016 +0800
@@ -104,7 +104,8 @@
 finally:
 sys.dont_write_bytecode = old_dont_write_bytecode
 
-self.assertIn('byte-compiling is disabled', self.logs[0][1])
+self.assertIn('byte-compiling is disabled',
+  self.logs[0][1] % self.logs[0][2])
 
 
 def test_suite():

--
nosy: +xiang.zhang

___
Python tracker 

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



[issue27909] Py_INCREF(NULL) in _imp.create_builtin

2016-08-31 Thread Xiang Zhang

New submission from Xiang Zhang:

Just as the patch shows, when PyErr_Occurred() returns true mod is NULL, then 
Py_INCREF(mod) will crash. Replace it with Py_XINCREF.

--
components: Interpreter Core
files: create_builtin.patch
keywords: patch
messages: 274007
nosy: brett.cannon, eric.snow, ncoghlan, xiang.zhang
priority: normal
severity: normal
status: open
title: Py_INCREF(NULL) in _imp.create_builtin
type: crash
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file44292/create_builtin.patch

___
Python tracker 

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



[issue27904] Let logging format more messages on demand

2016-08-31 Thread SilentGhost

Changes by SilentGhost :


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

___
Python tracker 

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



[issue24139] Use sqlite3 extended error codes

2016-08-31 Thread Dima Tisnek

Dima Tisnek added the comment:

Aviv the patch makes in itself.

Are the changes in the other ticket needed to implement new tests?
Or is it possible to include tests here?

--

___
Python tracker 

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



[issue24139] Use sqlite3 extended error codes

2016-08-31 Thread Dima Tisnek

Dima Tisnek added the comment:

I meant "the patch makes sense in itself".

--

___
Python tracker 

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



[issue27910] Doc/library/traceback.rst — references to tuples should be replaced with new FrameSummary object

2016-08-31 Thread Tomas Orsava

New submission from Tomas Orsava:

In the documentation for the `traceback` module, the definitions of functions 
`extract_tb` [0], `format_list` [1] and classmethod `from_list` [2] mention the 
old style (4-)tuples that these functions used to return or accept.

Since Python 3.5, however, they return or accept a FrameSummary object instead 
of the 4-tuple, or a StackSummary object instead of a list of 4-tuples.

I'm including a patch that fixes these definitions to make them reflect the new 
reality.

[0] https://docs.python.org/3.6/library/traceback.html#traceback.extract_tb
[1] https://docs.python.org/3.6/library/traceback.html#traceback.format_list
[2] 
https://docs.python.org/3.6/library/traceback.html#traceback.StackSummary.from_list

--
assignee: docs@python
components: Documentation
files: traceback-doc.patch
keywords: patch
messages: 274010
nosy: docs@python, torsava
priority: normal
severity: normal
status: open
title: Doc/library/traceback.rst — references to tuples should be replaced with 
new FrameSummary object
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file44293/traceback-doc.patch

___
Python tracker 

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



[issue27910] Doc/library/traceback.rst — references to tuples should be replaced with new FrameSummary object

2016-08-31 Thread SilentGhost

Changes by SilentGhost :


--
stage:  -> patch review
type:  -> behavior

___
Python tracker 

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



[issue27910] Doc/library/traceback.rst — references to tuples should be replaced with new FrameSummary object

2016-08-31 Thread SilentGhost

SilentGhost added the comment:

LGTM.

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



[issue27910] Doc/library/traceback.rst — references to tuples should be replaced with new FrameSummary object

2016-08-31 Thread Berker Peksag

Berker Peksag added the comment:

I think we need to decide whether this is a documentation bug or a regression 
in traceback module.  See also issue 25573 for a similar report.

--
nosy: +berker.peksag, r.david.murray, rbcollins
stage: commit review -> patch review

___
Python tracker 

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



[issue22233] http.client splits headers on non-\r\n characters

2016-08-31 Thread R. David Murray

R. David Murray added the comment:

I'm hoping to take a look at all of these at the core sprint next week.

--

___
Python tracker 

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



[issue27895] Spelling fixes

2016-08-31 Thread R. David Murray

R. David Murray added the comment:

Good point, Martin, but I'd actually be OK with backporting that particular 
one.  It is relatively new, and I doubt anyone is using it.  Sorry for dropping 
the ball on the other issue.

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



[issue27911] Unnecessary error checks in exec_builtin_or_dynamic

2016-08-31 Thread Xiang Zhang

New submission from Xiang Zhang:

The two PyErr_Occurred check in exec_builtin_or_dynamic are unnecessary. The 
PyModule_Check at the beginning of exec_builtin_or_dynamic has eliminated the 
possibility for PyModule_GetDef/State to fail.

--
components: Interpreter Core
files: exec_built_or_dynamic.patch
keywords: patch
messages: 274015
nosy: brett.cannon, eric.snow, ncoghlan, xiang.zhang
priority: normal
severity: normal
status: open
title: Unnecessary error checks in exec_builtin_or_dynamic
type: enhancement
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file44294/exec_built_or_dynamic.patch

___
Python tracker 

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



[issue27910] Doc/library/traceback.rst — references to tuples should be replaced with new FrameSummary object

2016-08-31 Thread Tomas Orsava

Tomas Orsava added the comment:

Hi Berker: It's a bit complicated—this specific issue I opened isn't a 
regression, because it's exactly the change that was intended: Use FrameSummary 
instead of a 4-tuple to pass the frame data.

If you see the last comment for the issue 25573 you linked to, that issue has 
already been resolved by the docs being updated to reflect the new way of 
passing data.

However, that is not to say there can't be regressions connected to this, but 
they have to do with the fact that FrameSummary implements only a subset of 
methods available of tuples. E.g. that FrameSummary does not implement __len__ 
like tuple does, see issue 26502.

--

___
Python tracker 

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



[issue27904] Let logging format more messages on demand

2016-08-31 Thread koobs

Changes by koobs :


--
nosy: +koobs

___
Python tracker 

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



[issue27912] Distutils should use warehouse for index

2016-08-31 Thread Jason R. Coombs

New submission from Jason R. Coombs:

As pypi.python.org is quickly becoming deprecated and pypi.org is the new best 
recommendation for packages, I recommend that for Python 3.6, the default index 
should be pypi.org.

--
components: Distutils
messages: 274017
nosy: dstufft, eric.araujo, jason.coombs
priority: normal
severity: normal
status: open
title: Distutils should use warehouse for index
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



[issue27912] Distutils should use warehouse for index

2016-08-31 Thread Jason R. Coombs

Jason R. Coombs added the comment:

Oh, I see this was done in 539b4e7a655 (Python 2.7) and 54bfff5503d3 (Python 
3.3+).

--
resolution:  -> fixed
status: open -> closed
versions: +Python 2.7, Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue27912] Distutils should use warehouse for index

2016-08-31 Thread Jason R. Coombs

Jason R. Coombs added the comment:

539b4e7a655e

--

___
Python tracker 

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



[issue27912] Distutils should use warehouse for index

2016-08-31 Thread Jason R. Coombs

Jason R. Coombs added the comment:

I'm afraid this (slightly) backward-incompatible change may come as something 
of a surprise. The release notes should probably indicate the user actions that 
this change may require:

- upload_docs (setuptools) will no longer work unless the old repository 
(https://pypi.python.org) is indicated in setup.cfg or .pypirc or on the 
command line.
- Any passwords saved based on the repository will need to be updated (such as 
in the keyring).

--

___
Python tracker 

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



[issue27744] Add AF_ALG (Linux Kernel crypto) to socket module

2016-08-31 Thread Christian Heimes

Changes by Christian Heimes :


Added file: 
http://bugs.python.org/file44295/AF_ALG-kernel-crypto-support-for-socket-module-4.patch

___
Python tracker 

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



[issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0

2016-08-31 Thread Christian Heimes

Changes by Christian Heimes :


Added file: 
http://bugs.python.org/file44296/Port-Python-2.7-s-SSL-module-to-OpenSSL-1.1.0-4.patch

___
Python tracker 

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



[issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0

2016-08-31 Thread Christian Heimes

Changes by Christian Heimes :


Added file: 
http://bugs.python.org/file44297/Port-Python-s-SSL-module-to-OpenSSL-1.1.0-4.patch

___
Python tracker 

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



[issue27904] Let logging format more messages on demand

2016-08-31 Thread Ville Skyttä

Ville Skyttä added the comment:

Here's a patch that fixes the tests.

--
Added file: http://bugs.python.org/file44298/logging-regressions.patch

___
Python tracker 

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



[issue26513] platform.win32_ver() broken in 2.7.11

2016-08-31 Thread James Domingo

James Domingo added the comment:

Per SilentGhost's request, reposting my message from issue 27890 here --

The platform.release() function in Python 3.5.1 returns the correct value on 
Windows 2008 Server R2:

  C:\Users\jdoe\Documents\Python>python-3.5.1-embed-amd64\python.exe
  Python 3.5.1 (v3.5.1:37a07cee5969, Dec  6 2015, 01:54:25) [MSC v.1900 64 bit 
(AM
  D64)] on win32
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import platform
  >>> platform.release()
  '2008ServerR2'

However, the function in the latest release, Python 3.5.2, misidentifies the 
system as Windows 7:

  C:\Users\jdoe\Documents\Python>python-3.5.2-embed-amd64\python.exe
  Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit 
(AM
  D64)] on win32
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import platform
  >>> platform.release()
  '7'

--
nosy: +James Domingo

___
Python tracker 

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



[issue27913] Difflib.ndiff (Problem on identification of changes as Diff Style)

2016-08-31 Thread vincenzo gisondi

New submission from vincenzo gisondi:

I found an anomaly on identification of changes as Diff Style (^).

There are the tests that i done:

1) First Test (only one character is different)

>>> a = "Hello Vincenzo\n".splitlines(1)
>>> b = "Hello Vincenza\n".splitlines(1)
>>> a
['Hello Vincenzo\n']
>>> b
['Hello Vincenza\n']
>>> diff = difflib.ndiff(a,b)
>>> print(''.join(diff))
- Hello Vincenzo
?  ^
+ Hello Vincenza
?  ^


2) Second Test (two characters are differents)

>>> a = "Hello Vincenzo\n".splitlines(1)
>>> b = "Hello Vincensa\n".splitlines(1)
>>> a
['Hello Vincenzo\n']
>>> b
['Hello Vincensa\n']
>>> diff = difflib.ndiff(a,b)
>>> print(''.join(diff))
- Hello Vincenzo
? ^^
+ Hello Vincensa
? ^^

3) Third Test (three characters are differents)

>>> a = "Hello Vincenzo\n".splitlines(1)
>>> b = "Helto Bincenza\n".splitlines(1)
>>> a
['Hello Vincenzo\n']
>>> b
['Helto Bincenza\n']
>>> diff = difflib.ndiff(a,b)
>>> print(''.join(diff))
- Hello Vincenzo
?^  ^  ^
+ Helto Bincenza
?^  ^  ^

4) Fourth test (four characters are differents -> Anomaly)

>>> a = "Hello Vincenzo\n".splitlines(1)
>>> b = "Halto Bincenza\n".splitlines(1)
>>> a
['Hello Vincenzo\n']
>>> b
['Halto Bincenza\n']
>>> diff = difflib.ndiff(a,b)
>>> print(''.join(diff))
- Hello Vincenzo
+ Halto Bincenza

In this last test I expected 4 "^" characters as in previous tests, like this:

- Hello Vincenzo
?  ^ ^  ^  ^
+ Halto Bincenza
?  ^ ^  ^  ^

but I have a response completly different. This is a Bug or I did not 
understand something :)

Thank you very much for your support.

--
components: Library (Lib)
messages: 274023
nosy: vincenzo gisondi
priority: normal
severity: normal
status: open
title: Difflib.ndiff (Problem on identification of changes as Diff Style)
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



[issue27914] Incorrect comment in PyModule_ExcDef

2016-08-31 Thread Xiang Zhang

New submission from Xiang Zhang:

There is a comment in PyModule_ExcDef:

/* handled in PyModule_CreateFromSlots */

But there seems never exists PyModule_CreateFromSlots, I think 
PyModule_CreateFromSlots should be PyModule_FromDefAndSpec2.

--
files: PyModule_ExcDef_comment.patch
keywords: patch
messages: 274024
nosy: ncoghlan, xiang.zhang
priority: normal
severity: normal
status: open
title: Incorrect comment in PyModule_ExcDef
type: enhancement
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file44299/PyModule_ExcDef_comment.patch

___
Python tracker 

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



[issue27913] Difflib.ndiff (Problem on identification of changes as Diff Style)

2016-08-31 Thread SilentGhost

SilentGhost added the comment:

Since there are more than a quarter of all characters changed between two 
sequences, they are considered sufficiently different and no by-character 
comparison is shown.

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



[issue16535] json encoder unable to handle decimal

2016-08-31 Thread Mads Jensen

Mads Jensen added the comment:

Hi @cvrebert and team - do you know if this was ever implemented. It seems that 
it is still an issue for financial applications, and that the solution proposed 
would be relevant and helpful.

--
nosy: +mjensen

___
Python tracker 

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



[issue27913] Difflib.ndiff (Problem on identification of changes as Diff Style)

2016-08-31 Thread vincenzo gisondi

vincenzo gisondi added the comment:

Ok now it is all clear.
Thank you very much, for your rapid and clear answer.

--

___
Python tracker 

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



[issue27915] Use 'ascii' instead of 'us-ascii' to bypass lookup machinery

2016-08-31 Thread Ville Skyttä

New submission from Ville Skyttä:

https://docs.python.org/3/library/codecs.html#standard-encodings

There are a bunch of other us-ascii occurrences in the tree; this patch covers 
the ones that are not user visible in a way that could cause problems or 
changes in behavior.

--
files: ascii.patch
keywords: patch
messages: 274028
nosy: scop
priority: normal
severity: normal
status: open
title: Use 'ascii' instead of 'us-ascii' to bypass lookup machinery
type: performance
Added file: http://bugs.python.org/file44300/ascii.patch

___
Python tracker 

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



[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2016-08-31 Thread Erik Bray

Erik Bray added the comment:

Hi,

First of all, I should be clear this is not just about CloudABI.  In fact I 
don't even know what CloudABI is.  I'm personally working toward getting a 
working/stable buildbot for Cygwin, so that I can move Python toward supporting 
it again.  Cygwin has not been officially unsupported, but support for it is 
broken due to lack of a buildbot and lack of a maintainer, both of which I'm 
willing to offer.  I can't get a stable buildbot though until some issues with 
the build are resolved, and this is a major blocker.  If you prefer I can also 
work on a more formal plan to clarify Python's support for Cygwin which is 
currently in limbo.

Not saying a solution to this needs to be merged ASAP as I can work on a 
branch, but in the meantime it's nice to have an initial fix for the issue so 
that it can be worked around--I'm sure other platforms that have this issue, 
such as the CloudABI folks, will appreciate that as well.

Second of all, the point must be made that I'm not suggesting this be changed 
just in order to support some specific platform.  The fact remains that the 
existing code is misusing the pthread API and is fragile to begin with.  "It 
works on Linux" is not an excuse--not only does it suggest a bias, but the fact 
that it even works on Linux is an accident of implementation. The 
implementation of the pthread_key_t type could change tomorrow, and it would be 
Python's fault if that breaks things (not that I think that's at all likely to 
happen, though I'd be less surprised if OSX suddenly changed :)

As for the performance I agree that PyThread_(get|set)_key_value should be 
fast.  This may be O(n) but how big, typically, is n?  In a normal run of the 
Python interpreter n=1, and the autoTLSkey is always the first in the list.  It 
is only larger if some third-party code is using the PyThread_ API for TLS (and 
in most typical uses this will only be a few keys at the most, though I 
couldn't even find any examples in the wild where third-party code is using 
these functions).

n could also grow on forks, or manual Py_Finialize/Py_Initialize.  This patch 
didn't implement PyThread_ReInitTLS but it could, in which case it would reset 
next_key_id to 0 for each child process.  Likewise, PyThread_ReInitTLS could 
also be called from Py_Initialize, which should be harmless.

So TL;DR I'm not really convinced by the performance argument.  But even if 
that were an issue other implementations are possible; this was just among the 
simplest and least wasteful.

--

___
Python tracker 

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



[issue27904] Let logging format more messages on demand

2016-08-31 Thread R. David Murray

R. David Murray added the comment:

Thanks, Ville.

--
nosy: +r.david.murray
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



[issue27909] Py_INCREF(NULL) in _imp.create_builtin

2016-08-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset caf547c9e589 by Raymond Hettinger in branch '3.5':
Issue #27909: Fix INCREF for possible NULL value
https://hg.python.org/cpython/rev/caf547c9e589

--
nosy: +python-dev

___
Python tracker 

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



[issue27904] Let logging format more messages on demand

2016-08-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5f6dac170b9b by R David Murray in branch 'default':
#27904: fix distutils tests.
https://hg.python.org/cpython/rev/5f6dac170b9b

--

___
Python tracker 

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



[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2016-08-31 Thread Ed Schouten

Ed Schouten added the comment:

I think that PEP 11 also doesn't rule out changes in this area. For example, 
consider the paragraph starting with the sentence "This policy does not 
disqualify supporting other platforms indirectly. [...]"

Attached is a patch that accomplishes the same with a constant running time for 
operations on keys by using an array. Allocation of new keys runs in expected 
constant time by using a randomised allocation pattern.

If we're not big fans of using randomised access, changing this to a linear 
scan would already be an improvement: keys are only allocated infrequently, but 
hopefully accessed quite often.

--
Added file: http://bugs.python.org/file44303/key-constant-time.diff

___
Python tracker 

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



[issue27916] Use time.monotonic instead of time.time where appropriate

2016-08-31 Thread Ville Skyttä

New submission from Ville Skyttä:

For better immunity against system clock changes.

--
files: monotonic.patch
keywords: patch
messages: 274036
nosy: scop
priority: normal
severity: normal
status: open
title: Use time.monotonic instead of time.time where appropriate
type: enhancement
Added file: http://bugs.python.org/file44304/monotonic.patch

___
Python tracker 

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



[issue27909] Py_INCREF(NULL) in _imp.create_builtin

2016-08-31 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Thanks for the patch.

--
assignee:  -> rhettinger
nosy: +rhettinger
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



[issue27909] Py_INCREF(NULL) in _imp.create_builtin

2016-08-31 Thread SilentGhost

Changes by SilentGhost :


--
stage:  -> resolved

___
Python tracker 

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



[issue27904] Let logging format more messages on demand

2016-08-31 Thread SilentGhost

Changes by SilentGhost :


--
stage: patch review -> resolved

___
Python tracker 

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



[issue27907] Misspelled variable in test_asyncio/test_events

2016-08-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2a748320616b by Guido van Rossum in branch '3.5':
Issue #27907: variable rename. (Ville Skyttä)
https://hg.python.org/cpython/rev/2a748320616b

New changeset c9592e878dfa by Guido van Rossum in branch 'default':
Issue #27907: variable rename. (Ville Skyttä) (Merge 3.5->3.6)
https://hg.python.org/cpython/rev/c9592e878dfa

--
nosy: +python-dev

___
Python tracker 

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



[issue27907] Misspelled variable in test_asyncio/test_events

2016-08-31 Thread Guido van Rossum

Guido van Rossum added the comment:

Thanks! Your attention to detail is appreciated.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue26307] no PGO for built-in modules with `make profile-opt`

2016-08-31 Thread Charalampos Stratakis

Charalampos Stratakis added the comment:

Pinging here. Christos could you test the patch?

--
nosy: +cstratak

___
Python tracker 

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



[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2016-08-31 Thread Erik Bray

Erik Bray added the comment:

Ah, I wasn't thinking clearly toward the bottom of my last message.  I see now 
that after a fork, _PyGILState_Reinit calls PyThread_delete_key followed by a 
new PyThread_create_key--in the current version of my patch that would result 
in putting the autoTLSkey at the end of the linked list, which is no good.  
That could be worked around, but...

Ed's version looks good to me.  I had the same idea as an alternative, though 
was a little concerned with the possibility that the array could grow too 
large.  But as I wrote in my last message that would be an extreme case.  And 
regardless his version will at least maintain constant time, so +1.

--

___
Python tracker 

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



[issue27917] Choose platform triplets for android builds

2016-08-31 Thread Matthias Klose

New submission from Matthias Klose:

Following up to http://bugs.python.org/issue23968, I think we should choose 
different platform triplets for the android builds than we do for the linux 
builds.  Not sure which ones.

I saw the following gnu triplets used:

 - i686-linux-android
 - arm-linux-androidabi

Looking at the two cross compilers from the Ubuntu archive, I see that the arm 
compiler defines a __ANDROID__ macro, while the i686 compiler doesn't, so it 
might be difficult to select the correct platform triplet.

Could somebody check different compilers (clang as well) to see if this macro 
is defined?

  -E -dM - < /dev/null|grep -i android

Not sure which architectures else should be defined, but aarch64 comes to my 
mind as well.

--
components: Build
messages: 274041
nosy: doko
priority: normal
severity: normal
status: open
title: Choose platform triplets for android builds

___
Python tracker 

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



[issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET)

2016-08-31 Thread Matthias Klose

Matthias Klose added the comment:

I don't see how the suggested android fix is related, and what it is supposed 
to fix. It adds the env command before setting the environment variables, which 
should be a no-op.

However I think we should introduce different platform triplets for android.  
Please follow-up in http://bugs.python.org/issue27917

--

___
Python tracker 

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



[issue27911] Unnecessary error checks in exec_builtin_or_dynamic

2016-08-31 Thread Xiang Zhang

Xiang Zhang added the comment:

It's okay. Glad that you spare some time to reply. :)

--

___
Python tracker 

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



[issue27911] Unnecessary error checks in exec_builtin_or_dynamic

2016-08-31 Thread Brett Cannon

Brett Cannon added the comment:

Patch LGTM. Thanks for catching that, Xiang! I'll commit your fix when I can 
(might not be until after 3.6b1 since feature improvements are taking priority 
on my time to make the feature freeze deadline).

--
assignee:  -> brett.cannon

___
Python tracker 

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



[issue27918] Running test suites without gui but still having windows flash

2016-08-31 Thread Xiang Zhang

New submission from Xiang Zhang:

When I run test suites I find something interesting. Even if I don't enable gui 
resource there are still windows flashing. The two tests are test_idle and 
test_tk. I think the root cause is that they both use 
test.support.import_module with no reason and then root.update(in 
_is_gui_available) is called and windows flash. Comment out root.update windows 
are gone. Is this a must or can we find some way to suppress this?

--
components: Tests
messages: 274045
nosy: ned.deily, xiang.zhang
priority: normal
severity: normal
status: open
title: Running test suites without gui but still having windows flash
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue27917] Choose platform triplets for android builds

2016-08-31 Thread Matthias Klose

Changes by Matthias Klose :


--
nosy: +Chi Hsuan Yen

___
Python tracker 

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



[issue27917] Choose platform triplets for android builds

2016-08-31 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

In changeset 46567fda0b29, Xavier defined an autotools variable 
$ANDROID_API_LEVEL. This can be used to determine whether a specific compiler 
targets Android or not.

--
nosy: +xdegaye

___
Python tracker 

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



[issue27916] Use time.monotonic instead of time.time where appropriate

2016-08-31 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Some of these look gratuitous to me, possibly a wholesale search and replace 
without detailed consideration of each change.  For example, the quick 
informational timing in random.py does not have any downside for using the 
regular time.time().  The changes to asyncio and multiprocessing may be 
warranted.

Davin, would you look at the multiprocessing portion of the patch?

Guido, can you nosy whoever the relevant maintainer is for the asyncio niggling 
details?

--
nosy: +davin, gvanrossum, rhettinger

___
Python tracker 

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



[issue23591] enum: Add Flags and IntFlags

2016-08-31 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Still needs docs.

--

___
Python tracker 

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



[issue27918] Running test suites without gui but still having windows flash

2016-08-31 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +serhiy.storchaka, terry.reedy

___
Python tracker 

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



[issue27917] Choose platform triplets for android builds

2016-08-31 Thread Matthias Klose

Matthias Klose added the comment:

hmm, should the android api level be part of the platform triplet? or are these 
not relevant for modules?

--

___
Python tracker 

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



[issue27916] Use time.monotonic instead of time.time where appropriate

2016-08-31 Thread Guido van Rossum

Guido van Rossum added the comment:

asyncio already uses monotonic. The only place patched is a test
utility and I don't care either way. But I do think this is not a good
patch to do in general.

--

___
Python tracker 

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



[issue27918] Running test suites without gui but still having windows flash

2016-08-31 Thread Xiang Zhang

Xiang Zhang added the comment:

For your reference, the root.update is introduced in issue22770.

--

___
Python tracker 

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



[issue27918] Running test suites without gui but still having windows flash

2016-08-31 Thread Xiang Zhang

Xiang Zhang added the comment:

I tried that, no help to this thread, but I think that is better.

root.update itself draws something on the screen.

--

___
Python tracker 

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



[issue27918] Running test suites without gui but still having windows flash

2016-08-31 Thread Xiang Zhang

Xiang Zhang added the comment:

Ahh, sorry. I misunderstand your message. Just ignore my last one. Really sorry 
for making noise.

Your suggestion makes sense I think.

--

___
Python tracker 

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



[issue27918] Running test suites without gui but still having windows flash

2016-08-31 Thread Zachary Ware

Zachary Ware added the comment:

The order of the checks in support.requires{,_resource} should be reversed: 
check if the resource is enabled, then check for gui availability if the 
resource in question is 'gui'.

--
nosy: +zach.ware

___
Python tracker 

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



[issue27917] Choose platform triplets for android builds

2016-08-31 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

In Android NDK, each API level comes with a different set of header files 
($ANDROID_NDK/platforms/android-$ANDROID_API_LEVEL/arch-$ARCH/usr/include). In 
a strict sense, the API level should be included in platform triplet. At least 
the plat-* directory has different contents in different API levels. In 
practical, I haven't seen such a usage.

--

___
Python tracker 

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



[issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET)

2016-08-31 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Well changes in this issue are not the root cause of my problem - it just 
exposes a broken implementation done long time ago. I'll examine more and open 
a new bug.

--

___
Python tracker 

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



[issue27916] Use time.monotonic instead of time.time where appropriate

2016-08-31 Thread Ville Skyttä

Ville Skyttä added the comment:

It is not a wholesale search and replace, I have checked each change. There are 
a lot of places in the tree where monotonic is not appropriate, and those 
should not be included in the patch. But there is always the possibility that 
I've missed something, and it's good that there are reviewers.

Granted, some of the changes in this patch might not make a big difference, but 
they should not hurt either. To me, using monotonic is the right thing to use 
when dealing with time differences/delays, unless one needs an actual 
predictable time value anchored at the epoch at the same time for some other 
purposes. I don't of course insist on that point of view, and would be 
interested to hear other opinions and if someone can point out flaws/dangers in 
mine.

--

___
Python tracker 

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



[issue27916] Use time.monotonic instead of time.time where appropriate

2016-08-31 Thread Guido van Rossum

Guido van Rossum added the comment:

I mostly adhere to the rule of thumb "if it ain't broke, don't fix
it". So I would only endorse such changes if they address actual pain,
rather than possible pain.

Note that that rule of thumb was born out of worry about another
possible pain: the observation that some fraction of well-intentioned
fixes actually break something unanticipated. An (imagined) example in
this case: if someone mocks time.time() in a unit test, your fix
*might* break their test.

--

___
Python tracker 

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



[issue27916] Use time.monotonic instead of time.time where appropriate

2016-08-31 Thread Ville Skyttä

Ville Skyttä added the comment:

Thanks for the explanation, understood. However, I don't think it would be 
terribly difficult to demonstrate that these changes do address actual pains(*) 
in the situations they're supposed to address them. And the pains in question 
might in real world occur quite rarely, unexpectedly, and take some time/cost 
to debug and reproduce, which is why it would be good to be able to 
preemptively address them.

(*) For some values of "pain" -- many of the changes here are just for 
outputting nice-to-know timing information.

--

___
Python tracker 

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



[issue27919] Deprecate and remove extra_path distribution kwarg

2016-08-31 Thread Jason R. Coombs

New submission from Jason R. Coombs:

extra_path is implicated in [this 
failure](https://github.com/jaraco/rwt/issues/7) and in general in any attempt 
to install to a path in PYTHONPATH that's not in site-packages. For example:

$ python -m pip install -t foo newrelic
Collecting newrelic
Installing collected packages: newrelic
Successfully installed newrelic
$ ls foo
newrelic-2.68.0.50  newrelic-2.68.0.50.dist-infonewrelic.pth
$ PYTHONPATH=foo python -c "import newrelic"
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named 'newrelic'


As a result, extra_path (undocumented per issue901727) causes disruption in 
tools like rwt, and gives the packager the ability to break the convention for 
installing the package, relying on .pth files which only work in select 
locations.

I suggest we deprecate extra_path.

--
components: Distutils
messages: 274060
nosy: dstufft, eric.araujo, jason.coombs
priority: normal
severity: normal
status: open
title: Deprecate and remove extra_path distribution kwarg
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue27919] Deprecate and remove extra_path distribution kwarg

2016-08-31 Thread Jason R. Coombs

Jason R. Coombs added the comment:

Nick, what's your instinct regarding this issue?

--
nosy: +ncoghlan

___
Python tracker 

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



[issue27919] Deprecate and remove extra_path distribution kwarg

2016-08-31 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue27920] Embedding python in a shared library fails to import the Python module

2016-08-31 Thread Divyansh Khattak

New submission from Divyansh Khattak:

I am having the same error as described by https://bugs.python.org/issue19153 
and http://bugs.python.org/issue4434. My shared library is unable to import the 
Python module I created. I am attaching my C file which calls the python 
function Rough.py, whose code is written as under:
import math
def WallRough(*wss):
size=len(wss)
   
result=[0 for i in range(size)]
for i in range(size):
   

wss_mag=math.sqrt(wss[i][0]*wss[i][0]+wss[i][1]*wss[i][1]+wss[i][2]*wss[i][2])
   
result[i]=1

return result

--
components: Build
files: pystack.c
messages: 274062
nosy: suzaku
priority: normal
severity: normal
status: open
title: Embedding python in a shared library fails to import the Python module
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file44305/pystack.c

___
Python tracker 

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



[issue27920] Embedding python in a shared library fails to import the Python module

2016-08-31 Thread Divyansh Khattak

Divyansh Khattak added the comment:

I am having the same error as described by https://bugs.python.org/issue19153 
and http://bugs.python.org/issue4434. My shared library is unable to import the 
Python module I created. I am attaching my C file which calls the python 
function Rough.py, whose code is written as under:
import math
def WallRough(*wss):
size=len(wss)
   
result=[0 for i in range(size)]
for i in range(size):
   

wss_mag=math.sqrt(wss[i][0]*wss[i][0]+wss[i][1]*wss[i][1]+wss[i][2]*wss[i][2])
   
result[i]=1

return result

I am using the following for compilation and linking:
gcc -fPIC *.c -I-I/usr/local/include -I/usr/local/include 
-I/usr/local/include/python3.4m -I/usr/local/include/python3.4m  -DNDEBUG -g 
-fwrapv -O3 -Wall -Wstrict-prototypes -DDOUBLE_PRECISION -L/usr/local/lib  
-lpthread -ldl  -lutil -lm -lpython3.4m -Xlinker -export-dynamic 
/usr/local/lib/libpython3.4m.so /usr/local/lib/libpython3.4m.a -shared -o 
librough30.so

--

___
Python tracker 

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



[issue16379] SQLite error code not exposed to python

2016-08-31 Thread Aviv Palivoda

Aviv Palivoda added the comment:

Attached is a new patch with the encoding problem fixed.

--
Added file: http://bugs.python.org/file44306/16379-2.patch

___
Python tracker 

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



[issue27866] ssl: get list of enabled ciphers

2016-08-31 Thread Christian Heimes

Changes by Christian Heimes :


--
dependencies: +Make OpenSSL module compatible with OpenSSL 1.1.0
keywords: +patch
Added file: http://bugs.python.org/file44307/Add-SSLContext.get_ciphers.patch

___
Python tracker 

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



[issue27866] ssl: get list of enabled ciphers

2016-08-31 Thread Christian Heimes

Changes by Christian Heimes :


--
stage:  -> patch review

___
Python tracker 

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



[issue24139] Use sqlite3 extended error codes

2016-08-31 Thread Aviv Palivoda

Aviv Palivoda added the comment:

> Are the changes in the other ticket needed to implement new tests?
> Or is it possible to include tests here?

It is not possible to add any tests to this issue before exposing the error 
code. I will implement new tests when issue 16379 will be resolved.

> Aviv the patch makes in itself.

I think that this issue should be dependent on issue 16379 as the behavior of 
the sqlite module will no be changed after this patch until issue 16379 is 
resolved. In addition there will be some "rebase" issues that will need to be 
solved.

--

___
Python tracker 

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



[issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization

2016-08-31 Thread Nofar Schnider

Nofar Schnider added the comment:

Adding the patch with seed fix for version=1 and tests (test_random).

--
components: +Tests
keywords: +patch
versions: +Python 3.5 -Python 2.7
Added file: http://bugs.python.org/file44308/issue27706.patch

___
Python tracker 

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



[issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization

2016-08-31 Thread STINNER Victor

STINNER Victor added the comment:

Nofar Schnider: "versions: + Python 3.5, - Python 2.7"

I don't get it. This issue is specific to Python 2.7, no?

> issue27706.patch 

If you want to backport this feature from Python 3, I suggest to reuse the same 
code (so SHA 512). You might get the same random sequences on Python 2 and 
Python 3, but I don't think that it's matter :-) It's just that I expect that 
SHA-512 keeps more bits of entropy, than Python 2 hash function.

--

___
Python tracker 

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



[issue27881] Fix possible bugs when setting sqlite3.Connection.isolation_level

2016-08-31 Thread Aviv Palivoda

Aviv Palivoda added the comment:

Xiang what do you think about changing the isolation_levels list to 
begin_statements list:
static const char * const begin_statements[] = {"BEGIN", "BEGIN DEFERRED", 
"BEGIN IMMEDIATE", "BEGIN EXCLUSIVE", NULL};

This change will allow you to remove all the strings concatenations and the 
malloc/free.

--
nosy: +palaviv

___
Python tracker 

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



[issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization

2016-08-31 Thread Raymond Hettinger

Raymond Hettinger added the comment:

For 2.7, we're going to add a note to the docs.  For 3.5 and 3.6, we're 
adjusting the version==1 logic to meet the documented guarantee.

--
versions: +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



[issue27918] Running test suites without gui but still having windows flash

2016-08-31 Thread Terry J. Reedy

Terry J. Reedy added the comment:

To my surprise, "python -m test test_idle" gives a single flash in Windows.  
#22770 modified /Lib/test/support/__init__.py and added the creation and 
packing of a Label.  Those two lines are gone in repository 3.6 but the flash 
is still there, I added root.withdraw() at line 469 and the flash is gone.

try:
from tkinter import Tk
root = Tk()
root.withdraw()
root.update()
root.destroy()

I added a Label packing back and the flash is still gone here.

> "use test.support.import_module with no reason " ???
I used import_module in test_idle because I was told to and had to to prevent 
inappropriate test failures.  Please explain what you mean.

--

___
Python tracker 

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



[issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183)

2016-08-31 Thread Steve Dower

Steve Dower added the comment:

How can I test that the ciphers are available? Our Windows build of OpenSSL 
(managed by us) does not necessarily include everything and I honestly don't 
know an easy way to ensure that ChaCha20 has actually been built in. It doesn't 
look like there are any link-time references.

Everything built fine for me against 3.6, so I'm assuming there's some Python 
code I can run to make sure it's actually there?

--
nosy: +steve.dower

___
Python tracker 

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



[issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183)

2016-08-31 Thread Christian Heimes

Christian Heimes added the comment:

My time machine strikes again: #27866 introduces a new method to get all 
enabled ciphers. ChaCha20 needs either LibreSSL, OpenSSL 1.1.0 or OpenSSL 1.0.2 
with an extra patch.

--

___
Python tracker 

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



[issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183)

2016-08-31 Thread Steve Dower

Steve Dower added the comment:

Just found and added that :)

Guessing one of the 'name' fields will show it? If so, looks like all the 
Windows builds will be missing it.

I'm assuming that doesn't block this change. We should have a separate task to 
change the Windows build to use 1.1.0 I guess (currently it's 1.0.2).

--

___
Python tracker 

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



[issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization

2016-08-31 Thread Nofar Schnider

Nofar Schnider added the comment:

fixed indentation

--
versions:  -Python 2.7
Added file: http://bugs.python.org/file44309/issue27706.patch

___
Python tracker 

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



[issue26051] Non-data descriptors in pydoc

2016-08-31 Thread Ethan Furman

Changes by Ethan Furman :


--
nosy: +ethan.furman

___
Python tracker 

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



[issue26971] python v3.5.1: sys.paths not respecting DESTDIRS and DESTSHARED

2016-08-31 Thread Johannes S.

Johannes S. added the comment:

Sorry that I haven't answered for a long time. I would like to get an email 
notification but I don't know whether/how I can enable it.

On "my instance of Linux SuSE", the lines are locking like this:

CONFIG_ARGS=' '\''--prefix=/some/dir'\'''
libdir='${exec_prefix}/lib64'

--

___
Python tracker 

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



[issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization

2016-08-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1f37903e6040 by Raymond Hettinger in branch '2.7':
Issue #27706:  Document that random.seed() is non-deterministic when 
PYTHONHASHSEED is enabled
https://hg.python.org/cpython/rev/1f37903e6040

--
nosy: +python-dev

___
Python tracker 

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



[issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization

2016-08-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5ae941fef3be by Raymond Hettinger in branch '3.5':
Issue #27706: Fix regression in random.seed(somestr, version=1)
https://hg.python.org/cpython/rev/5ae941fef3be

--

___
Python tracker 

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



[issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization

2016-08-31 Thread Raymond Hettinger

Changes by Raymond Hettinger :


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



[issue27891] Consistently group and sort imports within idlelib modules.

2016-08-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 28ce37a2d888 by Terry Jan Reedy in branch 'default':
Issue #27891: Tweak new idlelib README entry.
https://hg.python.org/cpython/rev/28ce37a2d888

--

___
Python tracker 

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



[issue27921] f-strings: do not allow backslashes

2016-08-31 Thread Eric V. Smith

New submission from Eric V. Smith:

See https://mail.python.org/pipermail/python-dev/2016-August/145979.html for 
details.

PEP 498 is going to be changed to disallow backslashes inside braces (the 
expression portions of an f-string).

However, I can't get that change done in time for 3.6 beta 1. So, this bug will 
disallow any backslashes in f-strings. Before the next beta, I'll implement the 
correct behavior.

This is a breaking change: f-strings like f'\\t{3}' which worked in 3.6 alphas 
will not work in 3.6 beta 1, but will work in beta 2. f-strings like f'{\'x\'}' 
which worked in 3.6 alphas, will not work in any beta or release version of 3.6.

--
assignee: eric.smith
components: Interpreter Core
messages: 274079
nosy: eric.smith, ned.deily
priority: release blocker
severity: normal
status: open
title: f-strings: do not allow backslashes
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue26051] Non-data descriptors in pydoc

2016-08-31 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
nosy: +rhettinger
priority: normal -> low
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



[issue27922] Make IDLE tests less flashy

2016-08-31 Thread Terry J. Reedy

New submission from Terry J. Reedy:

This issue follows-up on #27732, which suppressed beeps during IDLE tests, I 
want to also suppress the flashing of tk widget boxes, which has become 
visually obnoxious with the increasing number of tests.

Adding root.withdraw() after root = Tk() solves the problem for all current 
tests.  For test_textview, this requires the fix of a bad cleanup call and 
addition of another.  It appears that the textview toplevels must be destroyed 
before the cleanup call to root.update_idletasks() or else they are made 
visible.  The idletasks call is needed to avoid '''can't invoke "event" 
command''' (even with all toplevels gone).

The backports will have fewer changes because there are fewer tests.

--
assignee: terry.reedy
components: IDLE
files: flashy.diff
keywords: patch
messages: 274080
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Make IDLE tests less flashy
type: enhancement
versions: Python 2.7, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file44310/flashy.diff

___
Python tracker 

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



[issue27921] f-strings: do not allow backslashes

2016-08-31 Thread Eric V. Smith

Changes by Eric V. Smith :


--
stage:  -> patch review

___
Python tracker 

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



[issue27921] f-strings: do not allow backslashes

2016-08-31 Thread Eric V. Smith

Changes by Eric V. Smith :


--
keywords: +patch
Added file: http://bugs.python.org/file44311/27921.patch

___
Python tracker 

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



[issue27922] Make IDLE tests less flashy

2016-08-31 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This is also a follow-up to #27918.  Importing test.support causes a flash in 
the process of testing whether tkinter/tk work.  So I was never able to get 
IDLE tests to completely stop flashing. Adding 'root.withdraw' to 
test.support.__init__ solves the import flash, and with that fix, individual 
IDLE tests and test_idle no longer flash.

--

___
Python tracker 

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



  1   2   >