[issue24921] Operator precedence table in 5.15 should be highest to lowest precedence

2015-08-24 Thread Joseph Schachner

New submission from Joseph Schachner:

We should not make people who need to read Python documentation do an extra 
transformation in their heads to correctly understand that in section 5.15 
higher precedence is at the bottom of the table and lower precedence is at the 
top. Because the documentation has this table inverted from the way it is 
usually presented in other references, one of the top hits in a Google search 
shows an instructor felt the need to make a version in the usual high to low 
precedence order to show students, see:
http://www.mathcs.emory.edu/~valerie/courses/fall10/155/resources/op_precedence.html
That version is so much more comfortable for me to read, it seems almost 
strange, but it is true. Please consider changing section 5.15 so it would not 
need the top paragraph explaining that the table order is not what the reader 
probably expects, instead just present the table as at the link above - in the 
order the reader does expect - higher precedence on top, lower on the bottom. 
That only needs two short sentences of explanation that don't make the reader 
think wait ... what?

--
assignee: docs@python
components: Documentation
messages: 249046
nosy: Joseph Schachner, docs@python
priority: normal
severity: normal
status: open
title: Operator precedence table in 5.15 should be highest to lowest precedence
versions: Python 2.7

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



[issue24907] Module location load order is not respected if pkg_resources is imported and a namespace is declared

2015-08-24 Thread Vadim Kantorov

Vadim Kantorov added the comment:

From my (novice) standpoint, it's very weird that importing pkg_resources in a 
module's __init__.py causes Python to deviate from its core module import 
rules / sequence.

Would you consider reporting this issue to pkg_resources's authors more 
appropriate?

--
status: pending - open

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



[issue24922] assertWarnsRegex doesn't allow multiple warning messages

2015-08-24 Thread Cal Leeming

New submission from Cal Leeming:

There was a discussion/patch in #9754 [1].

This allows for multiple warning types as a tuple, e.g.;

self.assertWarnsRegex((DeprecationWarning, RuntimeWarning), ^E1000:)

However, it does not allow testing for multiple warning messages, e.g.;

expect = ((UserWarning, ^W1000), (UserWarning, ^W1001))
self.assertWarnsRegex(*expect)

This is slightly unexpected, as `test.support.check_warnings` allows this 
behaviour, e.g.

expect = ((UserWarning, ^W1000), (UserWarning, ^W1001))
check_warnings(*expect)

Therefore I am proposing that `assertWarnsRegex` and `assertWarns` are modified 
to reflect the behaviour of `check_warnings`, whilst ensuring backwards 
compatibility. (e.g. if arg[0] is tuple, use new approach, otherwise use old 
approach).

[1]: http://bugs.python.org/issue9754

--
components: Interpreter Core
messages: 249048
nosy: sleepycal
priority: normal
severity: normal
status: open
title: assertWarnsRegex doesn't allow multiple warning messages
type: behavior
versions: Python 3.4

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



[issue24907] Module location load order is not respected if pkg_resources is imported and a namespace is declared

2015-08-24 Thread R. David Murray

R. David Murray added the comment:

Yes, unless you can identify a python bug yourself.  I believe pkg_resources 
does a bunch of imports when it is imported, so I'm not really surprised that 
it has an effect on the order in which things are imported.

--

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



[issue24915] Profile Guided Optimization active by-default

2015-08-24 Thread Alecsandru Patrascu

Changes by Alecsandru Patrascu alecsandru.patra...@intel.com:


Added file: http://bugs.python.org/file40238/python2.7-pgo-v02-mac.patch

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



[issue24915] Profile Guided Optimization active by-default

2015-08-24 Thread Alecsandru Patrascu

Alecsandru Patrascu added the comment:

I modified the patches after the review made by Brett (python2.7-pgo-v02.patch 
and python3.6-pgo-v02.patch):
- removed the call to pybench
- left the PGO steps as optional. To use it we run make profile-opt
- in the initial patches, I left out test_hashlib  because in our benchmarks we 
did not see any gain by applying PGO to the hash functions. It is not harmful 
and we can let it there or skip it. Nevertheless, in order not to create 
confusions about it, I removed that parameter from the patch.


I also added the patches for Mac exclusively (python2.7-pgo-v02-mac.patch and 
python3.6-pgo-v02-mac.patch). You must have llvm-profdata installed and in your 
path (in /Library/Developer/CommandLineTools/usr/bin/) to use it. I tested on 
Yosemite and it compiles fine with clang. I am working on a generic version 
(configure and Makefile patches) to merge all these platforms and will post 
them as soon as it is done.

--

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



[issue24915] Profile Guided Optimization active by-default

2015-08-24 Thread Stefan Krah

Stefan Krah added the comment:

My initial reaction is that the default should be optimized for
short build times. I would not want to type disable-profile-opt
every time I'm running the tests.

--
nosy: +skrah

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



[issue24907] Module location load order is not respected if pkg_resources is imported and a namespace is declared

2015-08-24 Thread R. David Murray

R. David Murray added the comment:

To be clear: I believe it imports things that are not in the standard library, 
based on scanning sys.path.  But I haven't studied the code in depth, so I 
could be wrong.

--

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



[issue24915] Profile Guided Optimization active by-default

2015-08-24 Thread Alecsandru Patrascu

Changes by Alecsandru Patrascu alecsandru.patra...@intel.com:


Added file: http://bugs.python.org/file40237/python3.6-pgo-v02.patch

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



[issue24921] Operator precedence table in 5.15 should be highest to lowest precedence

2015-08-24 Thread Stefan Krah

Stefan Krah added the comment:

Yacc uses low to high.

--
nosy: +skrah

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



[issue24915] Profile Guided Optimization active by-default

2015-08-24 Thread Alecsandru Patrascu

Changes by Alecsandru Patrascu alecsandru.patra...@intel.com:


Added file: http://bugs.python.org/file40236/python2.7-pgo-v02.patch

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



[issue24915] Profile Guided Optimization active by-default

2015-08-24 Thread Alecsandru Patrascu

Changes by Alecsandru Patrascu alecsandru.patra...@intel.com:


Added file: http://bugs.python.org/file40239/python3.6-pgo-v02-mac.patch

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



[issue24923] Append system paths in setup.py instead of prepending

2015-08-24 Thread Chris Hogan

New submission from Chris Hogan:

Setup.py evaluates what's given in LDFLAGS and CPPFLAGS and CFLAGS. These 
variables are the usual mechanism to communicate custom paths/libs/defs to a 
build process. However, setup.py puts system paths in front of custom paths 
which makes it impossible to use these variables for providing search paths to 
overwrite system settings.

This patch puts system paths at the end of the list to avoid this problem.  Is 
there a rationale for prepending system paths?

--
components: Build
files: append-sys-paths.patch
keywords: patch
messages: 249054
nosy: christopher.hogan
priority: normal
severity: normal
status: open
title: Append system paths in setup.py instead of prepending
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file40240/append-sys-paths.patch

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



[issue24926] Incorrect Example in HTMLParser.handle_comment(data)

2015-08-24 Thread Vineet Kumar Doshi

New submission from Vineet Kumar Doshi:

Hi,

link : 
https://docs.python.org/2/library/htmlparser.html#HTMLParser.HTMLParser.handle_comment

Incorrect Line : 

The content of Internet Explorer conditional comments (condcoms) will also be 
sent to this method, so, for !--[if IE 9]IE9-specific content![endif]--, 
this method will receive '[if IE 9]IE-specific content![endif]'.

Corrected Line :
The content of Internet Explorer conditional comments (condcoms) will also be 
sent to this method, so, for !--[if IE 9]IE9-specific content![endif]--, 
this method will receive '[if IE 9]IE9-specific content![endif]'.

Please correct this mistake in the docs.

Let me know, if it helps.

Thanks

Best Regards

--
assignee: docs@python
components: Documentation
messages: 249063
nosy: docs@python, vineetkumardoshi
priority: normal
severity: normal
status: open
title: Incorrect Example in HTMLParser.handle_comment(data)
type: behavior
versions: Python 2.7

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



[issue24924] _posixsubprocess.c: sysconf() might not be async-signal-safe

2015-08-24 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +gregory.p.smith

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



[issue24925] Allow doctest to find line number of __test__ strings if formatted as a triple quoted string.

2015-08-24 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


Removed file: http://bugs.python.org/file40241/doctest_find__test__.patch

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



[issue24925] Allow doctest to find line number of __test__ strings if formatted as a triple quoted string.

2015-08-24 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


Added file: http://bugs.python.org/file40242/doctest_find__test__.patch

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



[issue24915] Profile Guided Optimization active by-default

2015-08-24 Thread Brett Cannon

Brett Cannon added the comment:

the v02 patches LGTM. I'm fine with seeing those committed as-is knowing 
Alecsandru is actively working towards Clang support.

--
stage: patch review - commit review

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



[issue19469] Duplicate namespace package portions (but not on Windows)

2015-08-24 Thread Brett Cannon

Brett Cannon added the comment:

OK, if someone finds a way to reproduce the bug in the next week then we will 
keep this open as active, else I'm closing it as out-of-date.

--
status: open - pending

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



[issue24926] Incorrect Example in HTMLParser.handle_comment(data)

2015-08-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6eb5e59886e1 by R David Murray in branch '3.4':
#24926: Fix typo in example.
https://hg.python.org/cpython/rev/6eb5e59886e1

New changeset ae9a9f201870 by R David Murray in branch '3.5':
Merge: #24926: Fix typo in example.
https://hg.python.org/cpython/rev/ae9a9f201870

New changeset ccde4da4d0de by R David Murray in branch 'default':
Merge: #24926: Fix typo in example.
https://hg.python.org/cpython/rev/ccde4da4d0de

--

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



[issue24927] multiprocessing.Pool hangs forever on segfault

2015-08-24 Thread Jonas Obrist

Changes by Jonas Obrist ojiido...@gmail.com:


Added file: http://bugs.python.org/file40248/process_segfault.py

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



[issue24926] Incorrect Example in HTMLParser.handle_comment(data)

2015-08-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ff53dbcdc85f by R David Murray in branch '2.7':
#24926: Fix typo in example.
https://hg.python.org/cpython/rev/ff53dbcdc85f

--
nosy: +python-dev

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



[issue24927] multiprocessing.Pool hangs forever on segfault

2015-08-24 Thread Jonas Obrist

New submission from Jonas Obrist:

When using multiprocessing.Pool, if the function run in the pool segfaults, the 
program will simply hang forever. However when using multiprocessing.Process 
directly, it runs fine, setting the exitcode to -11 as expected.

I would expect the Pool to behave similar to Process, or at the very least an 
exception to be raised instead of just silently hanging forever.

I was able to reproduce this issue both on Linux (Ubuntu 15.04) and Mac OS X.

--
files: pool_segfault.py
messages: 249068
nosy: Jonas Obrist, jnoller, sbt
priority: normal
severity: normal
status: open
title: multiprocessing.Pool hangs forever on segfault
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file40243/pool_segfault.py

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



[issue24926] Incorrect Example in HTMLParser.handle_comment(data)

2015-08-24 Thread R. David Murray

R. David Murray added the comment:

Thanks for the report.

--
nosy: +r.david.murray
resolution:  - fixed
stage:  - resolved
status: open - closed

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



[issue16123] IDLE - deprecate running without a subprocess

2015-08-24 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Torgil, thank you for the interesting feedback. I will respond to your four 
paragraphs slightly out of order.

1. Starting Idle with '-n', I verified that running 'print(a)' from the editor 
works after entering 'a=1' in the shell. The intended purpose of the editor is 
to edit files that run as is.  From this viewpoint, the carryover behavior is a 
bug.  Idle's original single process mode, now accessed with -n, only remains 
because communicating with a subprocess via sockets turns out to be a bit 
unreliable.

3. Using an editor as a extension of the shell is an alternate use.  It does 
not have to be tied to -n.  I have been thinking about alternate run modes and 
added 'run as input' to my list.  A useful version might be this: don't require 
a name for the editor buffer; don't restart; enter each statement at a prompt 
and run as if typed.  The latter would make all the code run in Shell visible 
and add each statement to the history list.

2. I am a bit puzzled by your matlab comment. When tkinter code is run from 
editor in a separate process, it successfully grabs keyboard and mouse input.  
(One of the reasons for the shift from 1 to 2 processes was to disentangle user 
tkinter guis from the Idle tkinter gui.) On the other hand, running
  import msvcrt; k = msvcrt.kbhit()
on Windows does not work with either 1 or 2 processes because the Idle gui 
retains input focus.

If you want to pursue this, please open a new issue on the tracker or post to 
the idle-sig list or its news.gmane.org mirror gmane.comp.python.idle. In 
either case, say more about what 'not work' means.

4.This issue was opened before PEP 434 and before 2.7 maintenance was extended 
from 5 years (expiring now as 3.5 is released) to 10 years.  Hence the 
deprecation notice was not added to 2.7. I do not expect this to change.

--
versions: +Python 3.6 -Python 3.5

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



[issue24928] mock.patch.dict spoils order of items in collections.OrderedDict

2015-08-24 Thread Alexander Oblovatniy

New submission from Alexander Oblovatniy:

Hi!

Current implementation of `patch.dict` spoils order of items in 
`collections.OrderedDict`, because it explicitly converts passed `values` to 
`dict` 
(https://github.com/python/cpython/blob/923527f560acd43d4cc11293060900e56c7cb39b/Lib/unittest/mock.py#L1559-L1560):

```python

# support any argument supported by dict(...) constructor
self.values = dict(values)
```

Most obvious way is to check if `values` is an instance of `dict`. If it's not, 
then we need to convert it to dict:

```python

if not isinstance(values, dict):
values = dict(values)

self.values = values
```

This will work for `OrderedDict`, because it's a subclass of `dict`. But this 
will not work for `UserDict.UserDict`, `UserDict.DictMixin`, 
`collections.MutableMapping`, etc., because they do not subclass `dict`. So, 
better way is to less strict check and look if `values` implements `dict`-like 
interface, e.g.:

```python

if not hasattr(values, 'update'):
values = dict(values)

self.values = values
```

Here is a question existence of what attrs to check.

Any ideas?

Thanks!

--
components: Library (Lib)
messages: 249069
nosy: Alexander Oblovatniy
priority: normal
severity: normal
status: open
title: mock.patch.dict spoils order of items in collections.OrderedDict
type: behavior
versions: Python 2.7, Python 3.4

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



[issue24928] mock.patch.dict spoils order of items in collections.OrderedDict

2015-08-24 Thread Alexander Oblovatniy

Alexander Oblovatniy added the comment:

Hi!

Current implementation of `patch.dict` spoils order of items in 
`collections.OrderedDict`, because it explicitly converts passed `values` to 
`dict` 
(https://github.com/python/cpython/blob/923527f560acd43d4cc11293060900e56c7cb39b/Lib/unittest/mock.py#L1559-L1560):

# support any argument supported by dict(...) constructor
self.values = dict(values)


Most obvious way is to check if `values` is an instance of `dict`. If it's not, 
then we need to convert it to dict:

if not isinstance(values, dict):
values = dict(values)

self.values = values


This will work for `OrderedDict`, because it's a subclass of `dict`. But this 
will not work for `UserDict.UserDict`, `UserDict.DictMixin`, 
`collections.MutableMapping`, etc., because they do not subclass `dict`. So, 
better way is to less strict check and look if `values` implements `dict`-like 
interface, e.g.:

if not hasattr(values, 'update'):
values = dict(values)

self.values = values


Here is a question existence of what attrs to check.

Any ideas?

Thanks!

--

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



[issue24872] Add /NODEFAULTLIB:MSVCRT to _msvccompiler

2015-08-24 Thread Christoph Gohlke

Christoph Gohlke added the comment:

Two findings regarding the new semi-static linking options:

Distutils now creates libraries (.lib) that may not be readable by subsequent 
versions of Visual C++ 
https://msdn.microsoft.com/en-us/library/0zza0de8.aspx.

Build times and static library sizes significantly increase to a point where it 
becomes impractical in some cases. For example, on my system, the zeromq 
package builds in 90 s on Python 3.4.3, while on Python 3.5rc1 it takes 470 s. 
Building HDF5 static libs with the new options takes 30 minutes (close to 100% 
CPU usage on 8 logical processors) compared to less than 5 minutes for the 
default options.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24872
___
___
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

2015-08-24 Thread Daniel Shahaf

Daniel Shahaf added the comment:

 What's the reasoning behind offering a error code to name mapping?

Allowing code that runs into an error to print the error name rather than its
numeric value.  This saves whoever reads the error message having to look it up
himself.

 his seem problematic to me. In case a newer SQLite version introduces a new
 error code, this error code cannot be found in the mapping. I propose to
 leave this out in order to not have this problem.
 
 Otherwise we will have people depending on any error code being able to be
 found in this mapping.

Then people shouldn't depend on the mapping being complete.  Let's keep the
mapping and document that people should only use it as
`sqlite3.errorcode.get(...)`, never as `sqlite3.errorcode[...]`.

Or if that's not a good API, we could encapsulate the incompleteness of the
mapping into a small wrapper function:

   def something(errorcode):
   return sqlite3.errorcode.get(errorcode,
sqlite3 error {!d}.format(errorcode))

--

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



[issue24193] Make LOGGING_FORMAT of assertLogs configurable

2015-08-24 Thread Robert Collins

Robert Collins added the comment:

I don't know if or when it was moved, but right now:

./python -m pydoc unittest.case.TestCase.assertLogs
... the docs for it.

--

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



[issue24193] Make LOGGING_FORMAT of assertLogs configurable

2015-08-24 Thread Michael Foord

Michael Foord added the comment:

assertLogs is on a Python test suite helper, not TestCase itself.

--

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



[issue16123] IDLE - deprecate running without a subprocess

2015-08-24 Thread Torgil Svensson

Torgil Svensson added the comment:

I frequently use IDLE as an interactive shell to Python with the Editor 
attached. It's very nice for this purpose as it's lightweight and embedded in 
Python delivery. This is only possible with -n flag as without it each press on 
F5 will restart the interpreter and I lose all variables, graphs etc.

Under 2.7 (not related to this thread) I'm also unable to use interactive 
graphs [ ion()] in matplotlib without the -n flag.

Is there another way to run the module without restarting interpreter without 
the -n option?

Will 2.7 be affected by this change in the future?

--
nosy: +Torgil Svensson

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



[issue24492] using custom objects as modules: AttributeErrors new in 3.5

2015-08-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5a9ac801f9b4 by larry in branch '3.5':
Merged in brettcannon/cpython350/3.5 (pull request #2)
https://hg.python.org/cpython/rev/5a9ac801f9b4

--

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



[issue24928] mock.patch.dict spoils order of items in collections.OrderedDict

2015-08-24 Thread R. David Murray

R. David Murray added the comment:

Based on reading the patch.dict doct, I'm guessing that that dict call is 
making a copy in order to do a restore later.  Perhaps replacing the dict call 
with a copy call would be sufficient? (I haven't looked at the dict.patch code).

--
nosy: +r.david.murray, rbcollins

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



[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-08-24 Thread Robert Collins

Robert Collins added the comment:

Hi, just to say - I'm happy to help steer this through. I think its an 
important ecosystem fixup.

--
nosy: +rbcollins

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



[issue24927] multiprocessing.Pool hangs forever on segfault

2015-08-24 Thread Jonas Obrist

Jonas Obrist added the comment:

So the reason this is happening is very simple:

When using Pool.apply, the task (function) is sent to the task queue, which is 
consumed by the worker. At this point the task is in progress. However, the 
worker dies without being able to finish the task or in any other way tell the 
Pool that it can't finish the task. The actual process is then ended by the 
Pool but the task is still in limbo, so any attempt at getting a result will 
hang forever.

I'm not sure there's a straight forward way to solve this (the ways I can think 
of from the top of my head involve adding quite a bit of overhead to the Pool 
so it keeps track of which process/worker is handling which task at a given 
time, so if it exits prematurely this task can be finished), but at the very 
least this case should be documented I think.

--

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



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

2015-08-24 Thread Gregory P. Smith

Gregory P. Smith added the comment:

i'm updating the title to be more accurate.

turning it on by default is likely not desirable as the makefile is primarily 
used by developers who are iterating on changes.

but having it use a good workload (regrtest) and work with llvm and os x are 
good. :)

--
nosy: +gregory.p.smith
title: Profile Guided Optimization active by-default - Profile Guided 
Optimization improvements (better training, llvm support, etc)

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



[issue24929] _strptime.TimeRE should not enforce range in regex

2015-08-24 Thread Steve Yeung

New submission from Steve Yeung:

Currently, the regex in TimeRE enforces the numeric ranges. For example:
'm': r(?Pm1[0-2]|0[1-9]|[1-9]),

As a result, an invalid month will cause an generic regex error:
ValueError: time data '2015/16/5' does not match format '%Y/%m/%d'

However, if we relax the regex to not check the range and allow datetime to 
handle it:
'm': r(?Pm\d{1,2})

The error will be handle in datetime instead and the error will be much more 
helpful:
ValueError: month must be in 1..12

Please consider relaxing the regex for numeric ranges in _strptime.TimeRE.

--
components: Library (Lib)
messages: 249074
nosy: Steve Yeung
priority: normal
severity: normal
status: open
title: _strptime.TimeRE should not enforce range in regex
type: behavior
versions: Python 2.7

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



[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2015-08-24 Thread Robert Collins

Robert Collins added the comment:

On testing this - I don't think subprocess tests are necessarily needed.

The scenarios are these (from Nick's comment):
Test frameworks.
 - there are two in the standard library. unittest and doctest.
 - unittest's code paths end up going through 'TestProgram'.
 - doctest via 'testmod'.
 - so alter the warning configuration in those APIs to enable both 
DeprecationWarning and PendingDeprecationWarning. I don't think (right now 
anyhow :)) that we need a 'do not do this' flag in them..

Interactive REPL. This includes IDLE in my opinion.
 - there are three here IIRC - IDLE and the cPython and a helper module (which 
may or may not be the REPL for ./python - I haven't climbed through that code 
in ---ages---).
 - Again here I'd just enable DW in those code paths. Don't worry about whether 
its a tty or not: thats irrelevant. If the REPL enters, its the REPL and we 
should treat it like a user. If someone is driving the REPL programattically 
its likely one of: a remote session - so they should see it - or its a test 
harness - so they should see it.


Everything else.
Don't change anything here.

On docs: yes, we should update the docs for:
 - each changed module
 - the warnings module itself.

--

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



[issue24305] The new import system makes it impossible to correctly issue a deprecation warning for a module

2015-08-24 Thread Larry Hastings

Larry Hastings added the comment:

If this has been broken since 3.3, I don't think it's a release blocker for 
3.5.  I'm willing to consider it a bug and accept a fix, but I'd prefer it to 
be as low-risk as possible (aka the Python version).  Can someone fix the 
regressions?

And, if the C fix is better somehow, let's definitely get that into 3.6.

--
priority: release blocker - deferred blocker

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



[issue24930] test_ssl broker was fixed

2015-08-24 Thread R. David Murray

R. David Murray added the comment:

Most likely you ran the test using a different version of python from the one 
the test is from.  All the tests in that file pass on our buildbots when run by 
the python version they are for.

--
nosy: +r.david.murray

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



[issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4

2015-08-24 Thread Larry Hastings

Larry Hastings added the comment:

Please either mark as wontfix or send me a pull request.

--

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



[issue24305] The new import system makes it impossible to correctly issue a deprecation warning for a module

2015-08-24 Thread Larry Hastings

Larry Hastings added the comment:

The C implementation is making me nervous.  My gut feeling is the Python 
implementation would be easier to get right.

I still don't quite understand: what is the user-perceived result of this 
change?  Module authors issuing a DeprecationWarning can now use stacklevel=2 
instead of stacklevel=10?

--

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



[issue24305] The new import system makes it inconvenient to correctly issue a deprecation warning for a module

2015-08-24 Thread Larry Hastings

Changes by Larry Hastings la...@hastings.org:


--
title: The new import system makes it impossible to correctly issue a 
deprecation warning for a module - The new import system makes it inconvenient 
to correctly issue a deprecation warning for a module

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



[issue24931] _asdict breaks when inheriting from a namedtuple

2015-08-24 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


--
assignee:  - rhettinger

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



[issue24911] Context manager of socket.socket is not documented

2015-08-24 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
keywords: +easy
stage:  - needs patch
type:  - enhancement
versions: +Python 3.5, Python 3.6

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



[issue24931] _asdict breaks when inheriting from a namedtuple

2015-08-24 Thread Yury Selivanov

Changes by Yury Selivanov yseliva...@gmail.com:


--
nosy: +rhettinger

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



[issue2786] Names in traceback should have class names, if they're methods

2015-08-24 Thread Robert Collins

Robert Collins added the comment:

Forgot docs - I'll do before committing, but not worried about review of them 
so much.

--

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



[issue24305] The new import system makes it impossible to correctly issue a deprecation warning for a module

2015-08-24 Thread Nathaniel Smith

Nathaniel Smith added the comment:

 I still don't quite understand: what is the user-perceived result of this 
 change?  Module authors issuing a DeprecationWarning can now use stacklevel=2 
 instead of stacklevel=10?

Exactly. There are a lot of deprecated modules in the wild, and the correct way 
to mark a module as deprecated is by writing

warnings.warn(This module is deprecated!, stacklevel=2)

at the top-level of your module. Except that in Python 3.3 you have to use 
stacklevel=10, and in Python 3.4 you have to use stacklevel=8, and I haven't 
checked what you need in Python 3.5 but it may well be different again, because 
it depends on internal implementation details of the import system. Fortunately 
AFAICT from some code searches no-one is actually depending on this though; 
instead everyone just writes stacklevel=2 and gets the wrong result.

(This is made more urgent b/c people are increasingly relying on the stacklevel 
information to filter whether they even see the DeprecationWarning. E.g. I've 
seen multiple test suites which register a warnings filter that displays 
DeprecationWarnings iff they are attributed to the package-under-test, and 
IPython now shows deprecation warnings by default if the warning is attributed 
to interactive code -- see issue 24294. So there's a good chance that users 
will only find out that the module they are using is deprecated if the 
stacklevel= is set correctly.)

--

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



[issue21167] float('nan') returns 0.0 on Python compiled with icc

2015-08-24 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
status: open - closed

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



[issue24930] test_ssl broker was fixed

2015-08-24 Thread marcos paulo

Changes by marcos paulo marcos...@yahoo.com.br:


--
title: fix - test_ssl broker was fixed

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



[issue24931] _asdict breaks when inheriting from a namedtuple

2015-08-24 Thread Samuel Isaacson

New submission from Samuel Isaacson:

When inheriting from namedtuples, _asdict and __dict__ return empty 
dictionaries:

from collections import namedtuple

class Point(namedtuple('_Point', ['x', 'y'])):
pass

a = Point(3, 4)
print(a._asdict() == {})

gives False; it is True on Python 2.7.6

--
components: Library (Lib)
messages: 249082
nosy: Samuel Isaacson
priority: normal
severity: normal
status: open
title: _asdict breaks when inheriting from a namedtuple
type: behavior
versions: Python 3.4

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



[issue24931] _asdict breaks when inheriting from a namedtuple

2015-08-24 Thread Samuel Isaacson

Samuel Isaacson added the comment:

Sorry; it returns True on Python 3.4, False on Python 2.7.6.

--

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



[issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4

2015-08-24 Thread Ned Deily

Ned Deily added the comment:

I don't think we should hold 3.5.0 for a patch for this.  I recommend lowering 
the priority and targeting a patch for 3.5.1.

--
priority: release blocker - normal

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



[issue24930] test_ssl broker was fixed

2015-08-24 Thread marcos paulo

marcos paulo added the comment:

the version that i ran the test, is python 2.7.10

--

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



[issue24930] test_ssl broker was fixed

2015-08-24 Thread marcos paulo

marcos paulo added the comment:

anyway, this changes that i did, make this test more resilent!
this test now is more complete than before!

:-)

--

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



[issue24305] The new import system makes it impossible to correctly issue a deprecation warning for a module

2015-08-24 Thread Nathaniel Smith

Nathaniel Smith added the comment:

You're right, impossible is a slight exaggeration :-). As an alternative, 
every package could indeed carry around a table containing the details of 
importlib's call stack in every version of Python.

(I also haven't checked whether it's consistent within a single stable release 
series. I guess we could add a rule that 3.5.x - 3.5.(x+1) cannot change the 
number of function calls inside the importlib callstack, because that is part 
of the public API, but I have less than perfect confidence that this rule has 
been enforced strictly in the past, and I don't think I'd want to be the one in 
charge of enforcing it in the future.)

--

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



[issue24930] fix

2015-08-24 Thread marcos paulo

New submission from marcos paulo:

Hello to everyone!!!

This test https://hg.python.org/cpython/file/2.7/Lib/test/test_ssl.py on method
ContextTests.test_options, is broker becouse has a error between lines 717 ~ 
719;

On 717 line, has a comment about # OP_ALL | OP_NO_SSLv2 is the default value, 
but
it's not true, becouse this method is fail when i run it = 
py.test Lib/test/test_ssl.py -k ContextTests 
results ===
https://hg.python.org/cpython/file/2.7/Lib/test/test_ssl.py#l717
*** AssertionError: 2164261887 != 2197816319L

I fixed this method and i wrote new cases about test_options using a lot of 
options 
from ssl.PROTOCOL, for example:
ssl.PROTOCOL_TLSv1 
ssl.PROTOCOL_TLSv1_1
ssl.PROTOCOL_TLSv1_2
ssl.PROTOCOL_SSLv2
ssl.PROTOCOL_SSLv23
ssl.PROTOCOL_SSLv3  


on this test_options.patch, is the test fixed!

thanks
Att

:-)
marcosptf

--
components: Library (Lib)
files: test_options.patch
keywords: patch
messages: 249078
nosy: marcosptf
priority: normal
severity: normal
status: open
title: fix
type: crash
versions: Python 2.7
Added file: http://bugs.python.org/file40249/test_options.patch

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



[issue2786] Names in traceback should have class names, if they're methods

2015-08-24 Thread Robert Collins

Robert Collins added the comment:

Ok, so this is an API and ABI change. I'm going to do a variant without that 
downside.

--

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



[issue24847] Can't import tkinter in Python 3.5.0rc1

2015-08-24 Thread Larry Hastings

Larry Hastings added the comment:

Pull request accepted and merged.

--

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



[issue21167] float('nan') returns 0.0 on Python compiled with icc

2015-08-24 Thread Larry Hastings

Larry Hastings added the comment:

Pull request accepted and merged.

--

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



[issue2786] Names in traceback should have class names, if they're methods

2015-08-24 Thread Robert Collins

Robert Collins added the comment:

And herewith.

--
Added file: http://bugs.python.org/file40250/issue-2786-1.patch

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



[issue24867] Asyncio Task.get_stack fails with native coroutines

2015-08-24 Thread Larry Hastings

Larry Hastings added the comment:

Pull request accepted and merged.

--

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



[issue24769] Interpreter doesn't start when dynamic loading is disabled

2015-08-24 Thread Larry Hastings

Larry Hastings added the comment:

Yes, I'll accept this into 3.5.0, please send a pull request.

--

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



[issue24305] The new import system makes it impossible to correctly issue a deprecation warning for a module

2015-08-24 Thread Larry Hastings

Larry Hastings added the comment:

Is it really *impossible* to correctly issue a deprecation warning for a 
module, as the title asserts?  Or does the new import system simply make it 
*tiresome*?

if sys.version_info.major == 3 and sys.version_info.minor == 4:
  stacklevel = 8
elif  sys.version_info.major == 3 and sys.version_info.minor == 4:
  stacklevel = 10
else:
  stacklevel = 2 # I bet they fixed it in 3.6!

warnings.warn({} is deprecated.format(__name__), DeprecationWarning,
  stacklevel=stacklevel)


That's Python for you, doing six impossible things before breakfast.

--

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



[issue24847] Can't import tkinter in Python 3.5.0rc1

2015-08-24 Thread Larry Hastings

Changes by Larry Hastings la...@hastings.org:


--
resolution:  - fixed
stage: commit review - resolved
status: open - closed

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



[issue24789] ctypes doc string

2015-08-24 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
keywords: +easy
nosy: +berker.peksag
stage:  - needs patch
type:  - behavior

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



[issue24829] Use interactive input even if stdout is redirected

2015-08-24 Thread Martin Panter

Martin Panter added the comment:

I think Gnu Readline uses standard output for echoing input, prompts, 
controlling the cursor, etc. You can already see this by redirecting to a 
separate terminal. In Linux:

$ python  /dev/pts/2

So I think your assumption is not valid. Perhaps you can redirect standard 
error instead? (python -i . . . 2 output.txt, at least in Linux.) Or maybe use 
some terminal logging program, like the “script” Unix command. But I’m not sure 
there is a good use case for enabling Readline without a terminal to output to.

--
nosy: +martin.panter

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



[issue24850] syslog.syslog() does not return error when unable to send the log

2015-08-24 Thread Martin Panter

Martin Panter added the comment:

I’ve never used syslog() in Python, but I thought I should point out that the 
standard Posix API does not do any error reporting either. See 
http://pubs.opengroup.org/onlinepubs/9699919799/functions/syslog.html: “The . 
. . functions shall not return a value. / No errors are defined.”

--
nosy: +martin.panter

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



[issue24931] _asdict breaks when inheriting from a namedtuple

2015-08-24 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


--
keywords: +patch
Added file: http://bugs.python.org/file40251/nt_fix1.diff

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



[issue24932] Migrate _testembed to a C unit testing library

2015-08-24 Thread Nick Coghlan

New submission from Nick Coghlan:

Programs/_testembed (invoked by test_capi to test CPython's embedding support) 
is currently a very simple application with only two different embedding tests: 
https://hg.python.org/cpython/file/tip/Programs/_testembed.c

In light of proposals like PEP 432 to change the interpreter startup sequence 
and make it more configurable, it seems desirable to be better able to test 
more configuration options directly, without relying on the abstraction layer 
provided by the main CPython executable.

The specific unit testing library that prompted this idea was cmocka, which is 
used by libssh, sssd and cwrap: https://cmocka.org/

cwrap in turn is used by the Samba team to mock out network interfaces and 
other operations using LD_PRELOAD: https://cwrap.org/

We don't necessarily have to use those particular libraries, I'm just filing 
this issue to capture the idea of improving our C level unit testing 
capabilities, and then updating regrtest to better capture and report those 
results (currently there are just a couple of tests in test_capi that call the 
_testembed executable)

--
components: Tests
messages: 249106
nosy: encukou, eric.snow, ncoghlan
priority: normal
severity: normal
status: open
title: Migrate _testembed to a C unit testing library
type: enhancement

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



[issue24808] PyTypeObject fields have incorrectly documented types

2015-08-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 54a9c649281d by Martin Panter vadmium in branch '3.4':
Issue #24808: Update the documentation of some PyTypeObject fields
https://hg.python.org/cpython/rev/54a9c649281d

New changeset e81d692a00b1 by Martin Panter vadmium in branch '3.5':
Issue #24808: Merge 3.4 into 3.5; adjust new tp_as_async field
https://hg.python.org/cpython/rev/e81d692a00b1

New changeset 2637e2593f01 by Martin Panter vadmium in branch 'default':
Issue #24808: Merge 3.5 into 3.6
https://hg.python.org/cpython/rev/2637e2593f01

--
nosy: +python-dev

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



[issue17781] optimize compilation options

2015-08-24 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I would like the see LTO enabled.  The intermodule calls to code in abstract.c 
would become less expensive.

--
nosy: +rhettinger

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



[issue24928] mock.patch.dict spoils order of items in collections.OrderedDict

2015-08-24 Thread Raymond Hettinger

Raymond Hettinger added the comment:

 Perhaps replacing the dict call with a copy call would be sufficient?

I think that would do it.

--
nosy: +rhettinger

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



[issue24769] Interpreter doesn't start when dynamic loading is disabled

2015-08-24 Thread Larry Hastings

Larry Hastings added the comment:

I wanted to get this in to Python 3.5.0rc2, so I checked it in myself.  Petr, I 
gave you credit in the checkin comment and Misc/NEWS.  Hope that's okay!

--
resolution:  - fixed
stage: commit review - resolved
status: open - closed
versions: +Python 3.6

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



[issue24931] _asdict breaks when inheriting from a namedtuple

2015-08-24 Thread Raymond Hettinger

Raymond Hettinger added the comment:

For __dict__, I'm not sure what the right behavior should by for subclasses 
that don't define __slots__.  In Python 3, the __dict__ is returning the dict 
for the subclass.  This might be the correct and most desirable behavior:

 class Point(namedtuple('_Point', ['x', 'y'])):
pass
 a = Point(3, 4)
 a.w = 5
 a.__dict__
{'w': 5}

If we leave the __dict__ behavior as is in Py3, then we still need to get 
_asdict() back to its documented behavior.  For that, we would need to 
disconnect it from __dict__ by restoring the Py2.7 code for _asdict():

def _asdict(self):
'Return a new OrderedDict which maps field names to their values'
return OrderedDict(zip(self._fields, self))

All this needs to be thought-out carefully.  Putting in __dict__ support 
originally looked like a bugfix to get vars() working correctly, but it caused 
problems with pickling which then led to the addition of __getnewargs__.  It 
seems that defining __dict__ leads to problems no matter how you do it.

My inclination is to remove __dict__ and __getewargs__ from the namedtuple 
definition entirely and return to a simpler state of affairs that is easier to 
reason about and less likely to lead to unexpected behaviors like the one in 
this bug report.

One note:  using the Py2.7 namedtuple code in Python3 still doesn't restore the 
old behavior.  Something else in the language appears to have changed (causing 
the subclasses' __dict__ to take precedence over the inherited __dict__ 
property).

--
priority: normal - high
versions: +Python 3.5, Python 3.6

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



[issue24808] PyTypeObject fields have incorrectly documented types

2015-08-24 Thread Martin Panter

Martin Panter added the comment:

Most of this looks good. For the record, tp_flags was changed to unsigned in 
3.4 (Issue 16086). The const and Py_ssize_t changes were done before 3.0.

The only bits I would hesitate about are adding back the two comments saying 
“Assigned meaning in release 2”. These comments seem to have been removed from 
the Python 3 documentation in r67578, and I don’t see much point adding them 
back.

I will have a go at committing the rest of the patch. (This is my first time 
making a commit.)

--
assignee: docs@python - martin.panter
nosy: +berker.peksag, martin.panter
stage:  - commit review
versions:  -Python 3.2, Python 3.3

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



[issue10708] Misc/porting should be folded into the development FAQ or the devguide

2015-08-24 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5b43ee3df43e by Berker Peksag in branch '3.5':
Issue #10708: Add a link to devguide in Misc/Porting.
https://hg.python.org/cpython/rev/5b43ee3df43e

New changeset 23f4d8bf4f83 by Berker Peksag in branch 'default':
Issue #10708: Add a link to devguide in Misc/Porting.
https://hg.python.org/cpython/rev/23f4d8bf4f83

--

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