[issue25720] Fix curses module compilation with ncurses6

2016-01-13 Thread Ismail Donmez

Ismail Donmez added the comment:

Any patch review/comment ?

--

___
Python tracker 

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



[issue26058] PEP 509: Add ma_version to PyDictObject

2016-01-13 Thread STINNER Victor

STINNER Victor added the comment:

I'm not a big fan of pybench (it looks unstable and so not reliable), but here 
are results with dict_version-4.patch.

I used more loops and a lower warp factor to get more reliable tests (I hope):

./python Tools/pybench/pybench.py -f pybench.orig -w 2 -C 100 -n 25
./python.patched Tools/pybench/pybench.py -f pybench.dictver -w 2 -C 100 -n 25
./python Tools/pybench/pybench.py -s pybench.dictver -c pybench.orig

---
PYBENCH 2.1
---
* using CPython 3.6.0a0 (default:77d24f51effc+, Jan 13 2016, 11:27:53) [GCC 
5.3.1 20151207 (Red Hat 5.3.1-2)]
* disabled garbage collection
* system check interval set to maximum: 2147483647
* using timer: time.perf_counter
* timer: resolution=1e-09, implementation=clock_gettime(CLOCK_MONOTONIC)

---
Benchmark: pybench.dictver
---

Rounds: 25
Warp:   2
Timer:  time.perf_counter

Machine Details:
   Platform ID:
Linux-4.2.8-300.fc23.x86_64-x86_64-with-fedora-23-Twenty_Three
   Processor:  x86_64

Python:
   Implementation: CPython
   Executable: /home/haypo/prog/python/default/python
   Version:3.6.0a0
   Compiler:   GCC 5.3.1 20151207 (Red Hat 5.3.1-2)
   Bits:   64bit
   Build:  Jan 13 2016 11:27:53 (#default:77d24f51effc+)
   Unicode:UCS4


---
Comparing with: pybench.orig
---

Rounds: 25
Warp:   2
Timer:  time.perf_counter

Machine Details:
   Platform ID:
Linux-4.2.8-300.fc23.x86_64-x86_64-with-fedora-23-Twenty_Three
   Processor:  x86_64

Python:
   Implementation: CPython
   Executable: /home/haypo/prog/python/default/python
   Version:3.6.0a0
   Compiler:   GCC 5.3.1 20151207 (Red Hat 5.3.1-2)
   Bits:   64bit
   Build:  Jan 13 2016 11:14:50 (#default:77d24f51effc)
   Unicode:UCS4


Test minimum run-timeaverage  run-time
 thisother   diffthisother   diff
---
  BuiltinFunctionCalls:   230ms   229ms   +0.4%   241ms   230ms   +5.1%
   BuiltinMethodLookup:   130ms   132ms   -1.2%   135ms   134ms   +0.4%
 CompareFloats:   147ms   149ms   -1.4%   151ms   149ms   +1.2%
 CompareFloatsIntegers:   330ms   333ms   -0.8%   347ms   335ms   +3.6%
   CompareIntegers:   214ms   209ms   +2.5%   223ms   209ms   +6.5%
CompareInternedStrings:   160ms   145ms  +10.8%   170ms   145ms  +16.9%
  CompareLongs:   121ms   120ms   +0.2%   124ms   120ms   +3.4%
CompareStrings:   132ms   131ms   +0.7%   138ms   132ms   +4.8%
ComplexPythonFunctionCalls:   233ms   235ms   -0.7%   241ms   238ms   +1.1%
 ConcatStrings:   166ms   165ms   +0.3%   177ms   167ms   +6.0%
   CreateInstances:   240ms   247ms   -3.1%   253ms   249ms   +1.5%
CreateNewInstances:   178ms   186ms   -4.2%   188ms   188ms   +0.1%
   CreateStringsWithConcat:   315ms   316ms   -0.5%   331ms   318ms   +4.3%
  DictCreation:   254ms   236ms   +7.8%   262ms   237ms  +10.5%
 DictWithFloatKeys:   211ms   199ms   +6.1%   219ms   201ms   +8.9%
   DictWithIntegerKeys:   171ms   163ms   +5.4%   180ms   166ms   +9.0%
DictWithStringKeys:   163ms   142ms  +14.5%   170ms   144ms  +17.7%
  ForLoops:   121ms   121ms   -0.3%   125ms   124ms   +0.9%
IfThenElse:   179ms   178ms   +0.7%   185ms   178ms   +3.6%
   ListSlicing:   194ms   193ms   +0.4%   198ms   194ms   +2.2%
NestedForLoops:   212ms   210ms   +1.2%   220ms   210ms   +4.6%
  NestedListComprehensions:   205ms   212ms   -3.3%   218ms   215ms   +1.5%
  NormalClassAttribute:   429ms   407ms   +5.5%   446ms   408ms   +9.3%
   NormalInstanceAttribute:   212ms   206ms   +2.8%   226ms   209ms   +8.0%
   PythonFunctionCalls:   208ms   210ms   -1.4%   215ms   212ms   +1.2%
 PythonMethodCalls:   275ms   253ms   +8.7%   293ms   255ms  +14.9%
 Recursion:   333ms   328ms   +1.4%   366ms   329ms  +11.0%
  SecondImport:   190ms   188ms   +0.8%   201ms   188ms   +6.7%
   SecondPackageImport:   195ms   192ms   +1.8%   214ms   192ms  +11.7%
 SecondSubmoduleImport:   472ms   447ms   +5.7%   502ms   455ms  +10.3%
   

[issue23551] IDLE to provide menu link to PIP gui.

2016-01-13 Thread Terry J. Reedy

Terry J. Reedy added the comment:

On python-list, Chris Angelico reported 2 other problems when running something 
like "import pip; pip.main(['install','psycopg2'])" from IDLE.  Both can be 
worked around in a pipgui program.

1. pip displays a progress bar by sending to stdout a sequence of strings 
something like '#', '\r##', '\r###', ..., '\r###...###'.  When IDLE sends these 
on to the tk text widget, they are displayed as above.  '\r' displays as '\r' 
and does not cause a 'return'.

pipgui would already be monitoring and parsing pip output to display 
information in appropriate widgets, so it could look for and interpret whatever 
pip actually does send.

2. pip has a bug.  When installing a non-wheel, it may unconditionally execute 
"s.decode(sys.__stdout__.encoding)".  sys.__stdin__, etcetera, are documented 
as sometimes being None, 
https://docs.python.org/3/library/sys.html#sys.__stdin__, and None does not 
have an 'encoding' attribute.  The workaround, until this is fixed, is for 
pipgui to rebind sys.__stdout__ to an object that at least has a sensible 
.encoding.  I would grep the entire pip source other '__std.*__' uses to see if 
more is needed.

--

___
Python tracker 

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



[issue25720] Fix curses module compilation with ncurses6

2016-01-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

configure.ac directly uses w->_flags in a check. It looks that this check 
always fails with ncurses6.

--

___
Python tracker 

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



[issue23990] Callable builtin doesn't respect descriptors

2016-01-13 Thread Graham Dumpleton

Changes by Graham Dumpleton :


--
nosy: +grahamd

___
Python tracker 

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



[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2016-01-13 Thread Ionel Cristian Mărieș

Changes by Ionel Cristian Mărieș :


--
nosy: +ionelmc

___
Python tracker 

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



[issue26058] PEP 509: Add ma_version to PyDictObject

2016-01-13 Thread STINNER Victor

STINNER Victor added the comment:

Patch version 4: I forgot to include my patch to update test_sys. Now the full 
Python test suite pass.

--
Added file: http://bugs.python.org/file41599/dict_version-4.patch

___
Python tracker 

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



[issue23551] IDLE to provide menu link to PIP gui.

2016-01-13 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue26097] 2.7 documentation about TextTestRunner do not specify all the arguments

2016-01-13 Thread Nicolas Évrard

New submission from Nicolas Évrard:

Some of the arguments although specified further in the documentation do not 
appear in the signature of TextTestRunner.

Here's a simple patch to include them.

--
assignee: docs@python
components: Documentation
files: unittest_doc_bug.diff
keywords: patch
messages: 258140
nosy: docs@python, nicoe
priority: normal
severity: normal
status: open
title: 2.7 documentation about TextTestRunner do not specify all the arguments
type: enhancement
versions: Python 2.7
Added file: http://bugs.python.org/file41600/unittest_doc_bug.diff

___
Python tracker 

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



[issue25911] Regression: os.walk now using os.scandir() breaks bytes filenames on windows

2016-01-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> Did we want a deprecation warning too?

I didn't tested on Windows. If bytes paths considered deprecated on Windows, 
os.listdir() should emit a warning. Otherwise I don't think we should special 
case os.walk().

--

___
Python tracker 

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



[issue25911] Regression: os.walk now using os.scandir() breaks bytes filenames on windows

2016-01-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Fixed a typo found by Eryk Sun.

--
Added file: http://bugs.python.org/file41598/walk_bytes_2.patch

___
Python tracker 

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



[issue25720] Fix curses module compilation with ncurses6

2016-01-13 Thread Ismail Donmez

Ismail Donmez added the comment:

Thats not an issue for ncurses because Include/py_curses.h does:

  #ifdef HAVE_NCURSES_H
  /* configure was checking , but we will
 use , which has all these features. */
  #ifndef WINDOW_HAS_FLAGS
  #define WINDOW_HAS_FLAGS 1
  #endif
  #ifndef MVWDELCH_IS_EXPRESSION
  #define MVWDELCH_IS_EXPRESSION 1
  #endif
  #endif

So it overrides WINDOW_HAS_FLAGS for ncurses case.

--

___
Python tracker 

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



[issue26098] PEP 510: Specialize functions with guards

2016-01-13 Thread STINNER Victor

New submission from STINNER Victor:

Attached patch implements the PEP 510 "Specialize functions with guards".

Changes on the C API are described in the PEP:
https://www.python.org/dev/peps/pep-0510/#changes

Additions of the patch:

* Add func_specialize() and func_get_specialized() to _testcapi
* Add _testcapi.PyGuard: Python wrapper to the Guard C API
* Add Lib/test/test_pep510.py

--
files: specialize.patch
keywords: patch
messages: 258141
nosy: haypo
priority: normal
severity: normal
status: open
title: PEP 510: Specialize functions with guards
versions: Python 3.6
Added file: http://bugs.python.org/file41601/specialize.patch

___
Python tracker 

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



[issue23762] python.org page on new-style classes should be updated

2016-01-13 Thread Berker Peksag

Berker Peksag added the comment:

I've now added a warning to the document.

--
stage: needs patch -> resolved
status: pending -> closed

___
Python tracker 

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



[issue7944] Use the 'with' statement in conjunction with 'open' throughout test modules

2016-01-13 Thread Ezio Melotti

Ezio Melotti added the comment:

Thanks for the patch, however I got several errors while trying to apply it, so 
I ended up backporting d560eece0857 instead.
This can be closed now.

--
assignee:  -> ezio.melotti
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



[issue25668] Deadlock in logging caused by a possible race condition with "format"

2016-01-13 Thread R. David Murray

Changes by R. David Murray :


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



[issue22642] trace module: convert to argparse

2016-01-13 Thread Berker Peksag

Berker Peksag added the comment:

Thanks, Senthil. My comment was for Vajrasky's patch, not for the whole 
argparse switch. We need to add tests for the old getopt code first to avoid 
regressions. After 0aa46b9ffba3, if we add tests we won't be able to test the 
old interface.

My other comments:

* SilentGhost needs to fill the contributor's agreement form. We generally 
accept trivial patches without asking CA, but I think we can't accept 
0aa46b9ffba3 without one since the patch is huge.
* I don't think we add reST formatted docstring to stdlib. The javadoc style 
one in Trace.__init__() is 13 years old so we can ignore it.
* I also have some minor comments, but I don't think they are important at this 
point :)

--
nosy: +berker.peksag

___
Python tracker 

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



[issue26102] access violation in PyErrFetch if tcur==null in PyGILState_Release

2016-01-13 Thread Christian Berger

New submission from Christian Berger:

I've been messing with PyGILState_... handling for my embedded python 
interpreter and came across this issue:

code in PyGILState_Release:

PyThreadState *tcur = (PyThreadState *)PyThread_get_key_value(
autoTLSkey);
if (tcur == NULL)
Py_FatalError("auto-releasing thread-state, "
  "but no thread-state for this thread");

The Py_FatalError() call will then invoke PyErr_Fetch() which won't check if 
PyThreadState_GET() returns a valid ptr (!= NULL):

PyErr_Fetch(PyObject **p_type, PyObject **p_value, PyObject **p_traceback)
{
PyThreadState *tstate = PyThreadState_GET();
*p_type = tstate->curexc_type;

--
components: Interpreter Core
messages: 258164
nosy: cberger
priority: normal
severity: normal
status: open
title: access violation in PyErrFetch if tcur==null in PyGILState_Release
type: crash
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



[issue26103] Contradiction in definition of "data descriptor" between (dotted lookup behavior/datamodel documentation) and (inspect lib/descriptor how-to)

2016-01-13 Thread Aaron Hall

New submission from Aaron Hall:

Based on the data-model documentation 
(https://docs.python.org/2/reference/datamodel.html#invoking-descriptors) and 
the dotted lookup behavior, the follow definitions are correct:

"If the descriptor defines __set__() and/or __delete__(), it is a data 
descriptor; if it defines neither, it is a non-data descriptor."

def has_data_descriptor_attrs(obj):
return set(['__set__', '__delete__']) & set(dir(obj))

def is_data_descriptor(obj):
return bool(has_data_descriptor_attrs(obj))


However, the inspect module has the following, which is also reflected in the 
descriptor how-to 
(https://docs.python.org/2/howto/descriptor.html#descriptor-protocol):

"If an object defines both __get__() and __set__(), it is considered a data 
descriptor."

def isdatadescriptor(object):
"""Return true if the object is a data descriptor.

Data descriptors have both a __get__ and a __set__ attribute..."""
if isclass(object) or ismethod(object) or isfunction(object):
# mutual exclusion
return False
tp = type(object)
return hasattr(tp, "__set__") and hasattr(tp, "__get__")


I'm willing to sign a contributor release and fix myself.

--
messages: 258168
nosy: Aaron Hall
priority: normal
severity: normal
status: open
title: Contradiction in definition of "data descriptor" between (dotted lookup 
behavior/datamodel documentation) and (inspect lib/descriptor how-to)
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue7944] Use the 'with' statement in conjunction with 'open' throughout test modules

2016-01-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e3763d98c46e by Ezio Melotti in branch '2.7':
#7944: close files explicitly in test_tarfile (backport d560eece0857).
https://hg.python.org/cpython/rev/e3763d98c46e

--
nosy: +python-dev

___
Python tracker 

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



[issue25668] Deadlock in logging caused by a possible race condition with "format"

2016-01-13 Thread Vinay Sajip

Vinay Sajip added the comment:

Logging has been in the Python stdlib for over a dozen years, and in all that 
time, no one else has had a problem with the way handler locks and formatting 
work in logging. Your problem arises because your use case is very unusual, and 
this is why I don't propose to make changes to the stdlib to cater for it. You 
can, as I've suggested earlier, subclass the handlers you need and implement 
their emit methods as per your needs. Any changes to the stdlib code along the 
lines you've proposed could well break existing code for other people, so 
making these changes is not warranted.

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

___
Python tracker 

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



[issue25924] investigate if getaddrinfo(3) on OSX is thread-safe

2016-01-13 Thread A. Jesse Jiryu Davis

A. Jesse Jiryu Davis added the comment:

An Apple Developer Relations engineer tells me it's "reasonable to assume that 
getaddrinfo() is thread safe" on OS X 10.5 and later. (He mentioned that iOS 
inherited the OS X 10.5 DNS architecture, so Apple phones, watches, TVs, 
hairdryers, etc. can all do concurrent DNS too.)

Before OS X 10.5 the DNS system was a mix of new Mac OS X features, 
mDNSResponder and Open Directory, along with historical lookupd from NeXT and 
libresolv from an old BSD. In 10.5 the system was cleaned up to depend on OS 
X's mDNSResponder consistently; in the process getaddrinfo became thread-safe.

He cites as further evidence of its thread safety:

* The "bugs" section of getaddrinfo's man page was removed in 10.5
* 10.5 is the first OS X to be UNIX '03 certified, which includes the 
requirement that getaddrinfo be thread-safe
* The system itself uses getaddrinfo extensively as if it's thread-safe
* He hasn't seen reports of thread-safety problems with getaddrinfo

He explained how the code works. In the latest version:

http://www.opensource.apple.com/source/Libinfo/Libinfo-476/lookup.subproj/libinfo.c

getaddrinfo calls down to libinfo’s "mdns" module:

http://www.opensource.apple.com/source/Libinfo/Libinfo-476/lookup.subproj/mdns_module.c

"mdns" uses the DNS-SD API declared in dns_sd.h, which he says is "well known 
to be thread safe." The DNS-SD API is part of the mDNSResponder project:

http://www.opensource.apple.com/source/mDNSResponder/mDNSResponder-576.30.4/

The key function is DNSServiceQueryRecord:

http://www.opensource.apple.com/source/mDNSResponder/mDNSResponder-576.30.4/mDNSShared/dnssd_clientstub.c

My contact concludes, "As you can see, it does an IPC over to the mDNSResponder 
process, at which point thread safety is assured."

--

___
Python tracker 

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



[issue24203] Deprecate threading.Thread.isDaemon etc

2016-01-13 Thread Berker Peksag

Berker Peksag added the comment:

The docs for old API already say:

Old getter/setter API for name; use it directly as a property instead.

https://docs.python.org/3.5/library/threading.html#threading.Thread.getName

Users don't read the documentation every six or fifteen months so it would be 
nice to document old APIs properly as deprecated. And I don't think 
documentation-only deprecation would work. See issue 25964 for a real world 
example. Users still don't know that optparse is deprecated.

> We don't have to deprecate this for any reason other than to satisfy a 
> personal sense of neatness and compactness.

The original request came from a Python user, not from a new generation 
perfectionist core developer.

> For the sake of developers who rely on the standard library being "standard" 
> and for the mountains of existing code on PyPI, we need to have a strong 
> aversion to unnecessary deprecations.

That doesn't mean we shouldn't tell users "Hey, there is a new API which was 
added back in 2008. Use it if you want to."

> [...] and they increase the likelihood that package distributors will 
> monkey-patch or duplicate the code to restore prior behavior (for example, 
> the Hypothesis project will likely have to duplicate the code that was 
> recently taken out of the inspect module in favor of signature objects).

I'm not sure we are on the same page here. I already said that I don't want to 
remove the old API, but document it properly as deprecated. The inspect case 
you've mentioned has already been solved in issue 25486. See issue 26069 (old 
trace API) and issue 26041 (platform.dist() and platform.linux_distribution() 
deprecation) for my views on deprecation policy.

> We should put more focus on proposed new APIs and making sure that they are 
> something we want to live with for a very long time.

Agreed, but we need to advertise new APIs better. Otherwise no one is going to 
notice and use them. I think deprecating old APIs (with a clear upgrade path) 
would be a good way to promote new ones.

--

___
Python tracker 

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



[issue26104] Reference leak in functools.partial constructor in failure case

2016-01-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This bug is fixed by more comprehensive patch for issue25945.

--
nosy: +serhiy.storchaka
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Type confusion in partial_setstate and partial_call leads to 
memory corruption

___
Python tracker 

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



[issue26106] Move licences to literal blocks

2016-01-13 Thread Ezio Melotti

Ezio Melotti added the comment:

Sounds like a reasonable request to me.
Given the content of document, special care should be taken in reviewing the 
patch and making sure that nothing has gone missing.

--
nosy: +ezio.melotti
stage:  -> patch review
type:  -> enhancement

___
Python tracker 

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



[issue25791] Raise an ImportWarning when __spec__.parent/__package__ isn't defined for a relative import

2016-01-13 Thread Rose Ames

Rose Ames added the comment:

that's what I figured.

--

___
Python tracker 

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



[issue26069] Remove the Deprecated API in trace module

2016-01-13 Thread Berker Peksag

Berker Peksag added the comment:

Sorry, I don't have much time investigate this further, but here is a few 
references from my bookmarks:

* http://bugs.python.org/msg253473 (from issue 20438)
* https://hg.python.org/peps/rev/570913685f49 (this doesn't mention old APIs, 
but I think we can safely follow it for old APIs)

Another discussions about deprecation policy: issue 24203 (old threading API), 
issue 25486 (inspect.getargspec()) and issue 26041 (platform.dist() and 
platform.linux_distribution())

If you want to keep the old API removed, it would be great to add a note in 
Doc/whatsnew/3.6.rst in addtion to the Misc/NEWS entry.

--

___
Python tracker 

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



[issue25791] Raise an ImportWarning when __spec__.parent/__package__ isn't defined for a relative import

2016-01-13 Thread Rose Ames

Rose Ames added the comment:

Patch with tests.  Not sure if importlib.h should be included?

--

___
Python tracker 

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



[issue26105] Python JSON module doesn't actually produce JSON

2016-01-13 Thread Ezio Melotti

Ezio Melotti added the comment:

This is documented at 
https://docs.python.org/3/library/json.html#standard-compliance-and-interoperability
 and https://docs.python.org/3/library/json.html#infinite-and-nan-number-values
The default could be changed if we go through a deprecation process, but I'm 
not sure it's worth it.

--
nosy: +ezio.melotti
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
versions: +Python 3.5, Python 3.6 -Python 3.4

___
Python tracker 

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



[issue25791] Raise an ImportWarning when __spec__.parent/__package__ isn't defined for a relative import

2016-01-13 Thread Rose Ames

Changes by Rose Ames :


--
keywords: +patch
Added file: http://bugs.python.org/file41609/issue25791.patch

___
Python tracker 

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



[issue26104] Reference leak in functools.partial constructor in failure case

2016-01-13 Thread Josh Rosenberg

New submission from Josh Rosenberg:

Minor bug introduced while implementing the fix for #7830:

In the case where functools.partial is wrapping another functools.partial 
instance, both of them providing positional arguments, the value nargs is not 
freed when the tuple concatenation fails and the constructor raises an 
Exception/returns NULL. Only nargs has the problem (it's a slice of the args 
passed to the function); pargs is a borrowed reference so there is no leak 
there. Admittedly, the odds of failure is incredibly low, but best to fix it on 
principle.

Code link: 
https://hg.python.org/cpython/file/5a2692911a43/Modules/_functoolsmodule.c#l77

The simplest fix is to add the explicit DECREF in the error path:

pto->args = PySequence_Concat(pargs, nargs);
if (pto->args == NULL) {
pto->kw = NULL;
Py_DECREF(nargs);  // <-- New
Py_DECREF(pto);
return NULL;
}

All other code paths hit a DECREF later on, no other fixes required. I'd submit 
a proper patch, but I'm on a new machine and I've got a lot of work to get the 
repos set up again.

--
components: Extension Modules
messages: 258176
nosy: belopolsky, josh.r
priority: normal
severity: normal
status: open
title: Reference leak in functools.partial constructor in failure case
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue25668] Deadlock in logging caused by a possible race condition with "format"

2016-01-13 Thread Florent Viard

Florent Viard added the comment:

Come on, please stop trying to close the issue so fast without deeply thinking 
about it.

A lot of years without a "detailed" bug report indicating the root cause is not 
a "proof" that there is no bug. Otherwise, you can say that there is no more 
bug in python, because people used it for 15 years...

The issue looks easy with the explanation and the test case, but it took me a 
lot of hours of investigation to figure out the origin of the freeze of python 
that I was lucky to be able to reproduce because of good specific conditions. 
And so I was able to try to have stack traces to find the origin of the issue. 
But race conditions like that are hard to catch, and to investigate but can bit 
anyone.

Please tell me what is unusual for you with this testcase? The sleeps are here 
to put you in the "good"/bad condition, but you can remove it and try to run 
the testcase 1 million times to be in the standard race condition situation...

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

___
Python tracker 

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



[issue26106] Move licences to literal blocks

2016-01-13 Thread Julien

New submission from Julien:

In the context of translating the documentation:

I'd like to move the licence texts in https://docs.python.org/3.5/license.html 
to literal blocks, so they won't pollute the po files with legal 
(untranslatable) stuff, and it's visually more appealing (as far as it's 
possible for a licence text).

Here is what it gives graphically when applying the patch (it's the 
translation, don't mind the french text): 
http://www.afpy.org/doc/python/3.5/license.html

I also took the liberty to drop a dangling "ACCEPT", while reformating centered 
"titles" to real titles and building paragraphs from licence text, hope it 
wasn't legal stuff / part of the licence (a line before the licence mention an 
"accept" button ...).

--
assignee: docs@python
components: Documentation
files: literal-licence.patch
keywords: patch
messages: 258180
nosy: docs@python, sizeof
priority: normal
severity: normal
status: open
title: Move licences to literal blocks
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file41612/literal-licence.patch

___
Python tracker 

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



[issue25791] Raise an ImportWarning when __spec__.parent/__package__ isn't defined for a relative import

2016-01-13 Thread Rose Ames

Rose Ames added the comment:

Thanks for the quick review, new patch uploaded.

--
Added file: http://bugs.python.org/file41611/issue25791_2.patch

___
Python tracker 

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



[issue26105] Python JSON module doesn't actually produce JSON

2016-01-13 Thread Connor Wolf

New submission from Connor Wolf:

The Python library JSON library doesn't emit JSON by default.

Basically, `json.dumps(float('nan'))` produces something that kind of looks 
like json, but isn't (specifically, `'NaN'`). Valid JSON must be `null`.

JSON *does not allow `NaN`, `infinity`, or `-infinity`. 

`json.dump[s]` has the parameter `allow_nan`, but it's `False` by default, so 
basically it's not actually JSON by default.

The default for emitting JSON should actually emit JSON. `allow_nan` must be 
`True` by default.

--
components: Library (Lib)
messages: 258179
nosy: Connor.Wolf
priority: normal
severity: normal
status: open
title: Python JSON module doesn't actually produce JSON
versions: Python 3.4

___
Python tracker 

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



[issue25791] Raise an ImportWarning when __spec__.parent/__package__ isn't defined for a relative import

2016-01-13 Thread Brett Cannon

Brett Cannon added the comment:

Including importlib.h doesn't hurt.

--

___
Python tracker 

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



[issue25591] refactor imaplib tests

2016-01-13 Thread Maciej Szulik

Maciej Szulik added the comment:

David can you please take a look once more, I've applied all the changes you've 
asked for. I'm currently working on adding the existing tests rewritten to use 
the new framework so it's easy to compare. It's still in progress but the 
general idea should maintain.

--
keywords: +patch
Added file: http://bugs.python.org/file41610/new_imap_tests_v2.diff

___
Python tracker 

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



[issue26105] Python JSON module doesn't actually produce JSON

2016-01-13 Thread Connor Wolf

Connor Wolf added the comment:

The problem here is that JSON is *everywhere*, and I only ran into this 
particular issue after a whole bunch of digging as to why my "JSON" messages 
were disappearing in some javascript. 

Basically, with the default the way it is, you have interoperability bombs in 
every project that uses it to interface with other languages. In my case, I'm 
using Flask-SocketIO ( https://github.com/miguelgrinberg/Flask-SocketIO ), 
which uses JSON as it's transport, and it works fine until you have a NaN or 
infinity in your data, at which point the socket.io in the browser starts 
*silently* eating messages.

Basically, if I call json.dumps, the principle of least astonishment dictated 
that you actually get, you know, JSON.

If you have a module called something like `pyson`, and it's partially JSON 
compatible, that makes sense. For the JSON module to fail at the very thing 
it's named after is kind of ludicrous.

--

___
Python tracker 

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



[issue25791] Raise an ImportWarning when __spec__.parent/__package__ isn't defined for a relative import

2016-01-13 Thread Brett Cannon

Changes by Brett Cannon :


--
assignee:  -> brett.cannon

___
Python tracker 

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



[issue26059] Integer Overflow in strop.replace()

2016-01-13 Thread STINNER Victor

STINNER Victor added the comment:

> Do you have any idea how to fix it?

strop is a deprecated module, you can write ("\x100"  *0xEAAA).replace("\x100", 
"AA"*0x). Does this instruction also crash?

--
nosy: +haypo

___
Python tracker 

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



[issue25822] Add docstrings to fields of urllib.parse results

2016-01-13 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
assignee:  -> orsenthil

___
Python tracker 

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



[issue22642] trace module: convert to argparse

2016-01-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0aa46b9ffba3 by Senthil Kumaran in branch 'default':
Issue22642 - Convert trace module's option handling mechanism from getopt to 
argparse.
https://hg.python.org/cpython/rev/0aa46b9ffba3

--
nosy: +python-dev

___
Python tracker 

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



[issue22642] trace module: convert to argparse

2016-01-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 69aa17b1f894 by Senthil Kumaran in branch 'default':
Add a NEWS entry for Issue #22642.
https://hg.python.org/cpython/rev/69aa17b1f894

--

___
Python tracker 

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



[issue22642] trace module: convert to argparse

2016-01-13 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Thanks for the contribution. The option handling of trace module is modernized 
now.

As berker suggested in one of the review comments, this module could see an 
increase in test coverage and we could deal with this as separate ticket.

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



[issue26099] site ignores ImportError when running sitecustomize and usercustomize

2016-01-13 Thread STINNER Victor

New submission from STINNER Victor:

If the code of sitecustomize raises an ImportError because the requested module 
doesn't exist, sitecustomize exception is silently ignored because site.py uses 
"try: import sitecustomize except ImportError: pass".

It's possible to log a warning since ImportError now has a name attribute since 
Python 3.3.

There is a similar issue on usercustomize.

Attached patch fixes the issue.

--
files: site.patch
keywords: patch
messages: 258144
nosy: haypo
priority: normal
severity: normal
status: open
title: site ignores ImportError when running sitecustomize and usercustomize
type: enhancement
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file41603/site.patch

___
Python tracker 

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



[issue26099] site ignores ImportError when running sitecustomize and usercustomize

2016-01-13 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue26098] PEP 510: Specialize functions with guards

2016-01-13 Thread STINNER Victor

STINNER Victor added the comment:

An unit test is needed on pickle serialization to ensure that the specialize 
code and guards are ignored.

--

___
Python tracker 

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



[issue26058] PEP 509: Add ma_version to PyDictObject

2016-01-13 Thread STINNER Victor

Changes by STINNER Victor :


Added file: http://bugs.python.org/file41605/guard_benchmark.py

___
Python tracker 

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



[issue26058] PEP 509: Add ma_version to PyDictObject

2016-01-13 Thread STINNER Victor

STINNER Victor added the comment:

guard_benchmark.patch: patch adding a _testcapi.guard_benchmark(), a 
microbenchmark on dictionary guard. The benchmark measures the cost of checking 
if a dictionary key was modified.

Run the benchmark with attached guard_benchmark.py. Result on my PC:

* PyObject_GetItem(): 10.2 ns
* PyDict_GetItem(): 9.1 ns
* guard->check(): 2.9 ns

python3 -m platform:
Linux-4.2.8-300.fc23.x86_64-x86_64-with-fedora-23-Twenty_Three

You have to modify manually _testcapi.c to choose between the 3 implementations.

guard_benchmark.patch requires the issue #26098 patch and the fat module which 
implements fat.GuardDict. The fat module can be found at:
https://github.com/haypo/fat

--
Added file: http://bugs.python.org/file41604/guard_benchmark.patch

___
Python tracker 

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



[issue25668] Deadlock in logging caused by a possible race condition with "format"

2016-01-13 Thread Florent Viard

Florent Viard added the comment:

Sorry to reply after a so long time.

Please don't close this issue too fast, there is really a big issue that is not 
related to my specific case.
(Note that the attached test case is not the real case, but a small piece of 
code that is able to reproduce the issue consistently)

Also, I don't pretend that my fix proposal is the solution, but the issue 
definitively exists.

To reply to your comment:
<<<
handle() and emit() are high level methods of a handler, and format() is at a 
lower level. Not all emit() methods will call format(). For example, 
socket-based and queue-based handlers don't. So it is not in general possible 
to separate format() out - you will need to have a customised handler to deal 
with your somewhat unusual use case, and do whatever you need in there.
>>>
That is not true even if it is a little hidden in the code:
- SocketHandler: emit first calls makePickle that almost starts with 
"record.getMessages()" that does the interesting thing.
(self.format mainly does getMessages(), that is the function that gets the 
messages arguments, eventually from properties)
- QueueHandler: emit first calls "prepare(record)", that starts by calling 
self.format(record).

But after having looked deeper at the code, maybe my fix proposal could be 
modified to be something like:
new function in "LogRecord" class:
 def stringifyMessage(self):
 # CODE THAT WAS IN getMessages()
 self.processed_msg = str(self.msg)
 if self.args:
 self.processed_msg = self.processed_msg % self.args

modify the getMessages function to:
 def getMessages(self):
 if not self.processed_msg:
 self.stringifyMessage()
 return self.processed_msg

Then, in the "__init__.py" handle function, add the following before 
"self.acquire()":
record.stringifyMessage()

Thus, no need to change anything, any handler, but the "message" arguments will 
be processed before getting the lock of "logging".

Regarding the second part of your comment, just saying that "generally" 
threading locks are a complex topic, doesn't remove the fact that in this 
specific logging case, there is a real bug regarding how python works. Here, 
you assume that an user of "logging" is supposed to know how the inside thread 
locking of "logging" works because the section under locking of logging leaks 
into "user space code". I'm pretty sure that almost everyone using logging 
today would not think that such an issue could arise.

I could agree with your point if the problem that was solvable, but i'm pretty 
sure that there is at least a solution that is working with backward 
compatibility and at worst minor disturbance to some very specific users of 
some specific handlers.

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

___
Python tracker 

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



[issue25668] Deadlock in logging caused by a possible race condition with "format"

2016-01-13 Thread Florent Viard

Florent Viard added the comment:

Sorry, typo in my last sentence:
"I would have agreed with your point if the problem was NOT solvable,..."

--

___
Python tracker 

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



[issue26098] PEP 510: Specialize functions with guards

2016-01-13 Thread STINNER Victor

STINNER Victor added the comment:

Patch version 2 fixes some bugs and add more tests.

More notes about the patch:

* RuntimeError is raised if guard check() result is greater than 2
* RuntimeError is raised if guard init() result is greater than 1
* (hum, maybe 'res < 0' check must be replaced with 'res == -1', but I'm not 
sure that that it's worth it.)
* If PyFunction_Specialize() is called with a code object or a Python code, it 
creates a new code object and copies the code name and first line number in the 
new code object to ease debugging

TODO: keywords are currently not supported in PyGuard.__call__().

--
Added file: http://bugs.python.org/file41602/specialize-2.patch

___
Python tracker 

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



[issue26100] Add test.support.optim_args_from_interpreter_flags()

2016-01-13 Thread STINNER Victor

New submission from STINNER Victor:

Attached patch adds a new optim_args_from_interpreter_flags() function to the 
test.support module, similar to the existing args_from_interpreter_flags() 
function. The function creates command line arguments related to optimization. 
The function is required by test_compileall.py and test_inspect.py.

The patch enables test_details() test of test_inspect when -O or -OO command 
line options are used.

--
files: optim_args.patch
keywords: patch
messages: 258152
nosy: haypo
priority: normal
severity: normal
status: open
title: Add test.support.optim_args_from_interpreter_flags()
versions: Python 3.6
Added file: http://bugs.python.org/file41606/optim_args.patch

___
Python tracker 

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



[issue26100] Add test.support.optim_args_from_interpreter_flags()

2016-01-13 Thread STINNER Victor

Changes by STINNER Victor :


--
components: +Tests

___
Python tracker 

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



[issue26100] Add test.support.optim_args_from_interpreter_flags()

2016-01-13 Thread STINNER Victor

STINNER Victor added the comment:

Do you want that the change should be applied to Python 3.5 too?

--

___
Python tracker 

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



[issue26101] Lib/test/test_compileall.py fails when run directly

2016-01-13 Thread STINNER Victor

New submission from STINNER Victor:

"./python Lib/test/test_compileall.py" fails on test_compile_path() because the 
Lib/test/ directory is in sys.path and this directory contains invalid Python 
scripts like Lib/test/badsyntax_pep3120.py

Attached patch fixes the issue by removing temporarely Lib/test/ from sys.path.

Note: Python 3.5 doesn't test compileall.compile_path() which fails. The new 
test was added by the changeset 71f071f2e074 of the issue #25768.

--
files: test_compileall.patch
keywords: patch
messages: 258154
nosy: brett.cannon, haypo
priority: normal
severity: normal
status: open
title: Lib/test/test_compileall.py fails when run directly
versions: Python 3.6
Added file: http://bugs.python.org/file41607/test_compileall.patch

___
Python tracker 

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



[issue26100] Add test.support.optim_args_from_interpreter_flags()

2016-01-13 Thread STINNER Victor

STINNER Victor added the comment:

Note: running directly "./python Lib/test/test_compileall.py" fails because of 
the issue #26101.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue26100] Add test.support.optim_args_from_interpreter_flags()

2016-01-13 Thread STINNER Victor

STINNER Victor added the comment:

Patch version 2: I forgot Lib/test/test_cmd_line_script.py.

--
Added file: http://bugs.python.org/file41608/optim_args-2.patch

___
Python tracker 

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



[issue25752] asyncio.readline - add customizable line separator

2016-01-13 Thread Марк Коренберг

Марк Коренберг added the comment:

During development, we decide not to change readline() function. So, yes, this 
issue is closed.

--

___
Python tracker 

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



[issue25752] asyncio.readline - add customizable line separator

2016-01-13 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy:  -haypo

___
Python tracker 

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



[issue3824] test_tarfile fails on cygwin (unicode decode error)

2016-01-13 Thread Ezio Melotti

Changes by Ezio Melotti :


--
resolution:  -> out of date
stage:  -> resolved
status: pending -> closed
type:  -> behavior

___
Python tracker 

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



[issue26093] __qualname__ different when calling generator object w/ functions.partial

2016-01-13 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue26101] Lib/test/test_compileall.py fails when run directly

2016-01-13 Thread Brett Cannon

Brett Cannon added the comment:

A cleaner way to do what you're after is to use 
test_importlib.util.import_state() where you can pass in an explicit value for 
sys.path to be temporarily set.

Otherwise I'm fine with the idea of the proposed change.

--

___
Python tracker 

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



[issue26101] Lib/test/test_compileall.py fails when run directly

2016-01-13 Thread STINNER Victor

STINNER Victor added the comment:

> A cleaner way to do what you're after is to use 
> test_importlib.util.import_state() where you can pass in an explicit value 
> for sys.path to be temporarily set.

I would prefer to not couple test_importlib and test_compileall to keep tests 
independent. If you consider that it's worth, import_state() must be moved to 
test.support.

--

___
Python tracker 

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



[issue26099] site ignores ImportError when running sitecustomize and usercustomize

2016-01-13 Thread Brett Cannon

Brett Cannon added the comment:

This is a change in semantics. It might be better to log an ImportWarning when 
the import fails and keep the current semantics (and be careful about importing 
warnings).

--

___
Python tracker 

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



[issue26101] Lib/test/test_compileall.py fails when run directly

2016-01-13 Thread Brett Cannon

Brett Cannon added the comment:

Don't care enough to do the work to separate it out, so if you don't want to 
bother either then LGTM.

--

___
Python tracker 

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



[issue26101] Lib/test/test_compileall.py fails when run directly

2016-01-13 Thread Brett Cannon

Changes by Brett Cannon :


--
assignee:  -> haypo

___
Python tracker 

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