[issue26630] Windows EXE extension installers not finding 32bit Python 3.5 installation

2016-03-23 Thread Eryk Sun

Changes by Eryk Sun :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> bdist_wininst created binaries fail to start and find 32bit 
Pythons

___
Python tracker 

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



[issue26616] A bug in datetime.astimezone() method

2016-03-23 Thread Brian Guo

Brian Guo added the comment:

>From the datetime documentation of astimezone(): 
https://docs.python.org/3.5/library/datetime.html#datetime.datetime.astimezone :

'If called without arguments (or with tz=None) the system local timezone is 
assumed. The tzinfo attribute of the converted datetime instance will be set to 
an instance of timezone with the zone name and offset obtained from the OS.'

You are correct in saying that there is an error in this implementation, but it 
is not that the second call should not change the timezone. Rather, the first 
call should have changed the timezone from UTC to America/New_York, or EST/EDT. 
When you made your first astimezone() call, (t = u.astimezone()), it was made 
without a tzinfo parameter, and should result in t's timzeone being EST by the 
documentation.

I have provided a patch that successfully adheres to this documentation. On 
changing the method, some of the tests failed; I have changed those tests to 
pass on the correct implementation of the method.

--
nosy: +BGuo1
Added file: http://bugs.python.org/file42267/bguo.patch

___
Python tracker 

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



[issue26634] recursive_repr forgets to override __qualname__ of wrapper

2016-03-23 Thread Raymond Hettinger

Raymond Hettinger added the comment:

FWIW, qualname was invented *after* recursive_repr, so it would be more 
accurate to say that qualname forgot recursive_repr :-)

If you don't mind, please add a test to your patch.

--
assignee:  -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue26634] recursive_repr forgets to override __qualname__ of wrapper

2016-03-23 Thread Xiang Zhang

New submission from Xiang Zhang:

In reprlib.recursive_repr, it seems __qualname__ is forgotten. Giving the 
example in reprlib document, it gives a strange result 
'recursive_repr..decorating_function..wrapper' of 
Mylist.__repr__.__qualname__.

I simply add the assignment of __qualname__. But I doubt the treatment of 
__module__, __doc__, __name__, __qualname__ will raise AttributeError when they 
don't exist in user_function. Is this the desired behaviour or we'd better 
treat them like functools.update_wrapper, catch and then ignore the error.

--
components: Library (Lib)
files: qualname_of_recursive_repr_in_reprlib.patch
keywords: patch
messages: 262326
nosy: xiang.zhang
priority: normal
severity: normal
status: open
title: recursive_repr forgets to override __qualname__ of wrapper
type: behavior
versions: Python 3.6
Added file: 
http://bugs.python.org/file42266/qualname_of_recursive_repr_in_reprlib.patch

___
Python tracker 

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



[issue26631] Unable to install Python 3.5.1 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2016-03-23 Thread Zachary Ware

Changes by Zachary Ware :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue26633] multiprocessing behavior combining daemon with non-daemon children inconsistent with threading

2016-03-23 Thread Josh Rosenberg

Josh Rosenberg added the comment:

Oops, left the info log in my replacement code for the non-daemon case outside 
the if not daemon: block; it should be inside (since it's not joining the 
daemon threads).

--

___
Python tracker 

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



[issue26633] multiprocessing behavior combining daemon with non-daemon children inconsistent with threading

2016-03-23 Thread Josh Rosenberg

New submission from Josh Rosenberg:

Unclear if this is just unclear docs, or incorrect behavior.

Per this Stack Overflow question ( 
https://stackoverflow.com/questions/36191447/why-doesnt-the-daemon-program-exit-without-join
 ), you get some rather odd behavior when you have both daemon and non-daemon 
child processes. In the case described, the following steps occur:

1. A daemon Process is launched which prints a message, waits two seconds, then 
prints a second message
2. The main process sleeps one second
3. A non-daemon process is launched which behaves the same as the daemon 
process, but sleeps six seconds before the second message.
4. The main process completes

The expected behavior (to my mind and the questioner on SO) is that since there 
is a non-daemon process running, the "process family" should stay alive until 
the non-daemon process finishes, which gives the daemon process time to wake up 
and print its second message (five seconds before the non-daemon process wakes 
to finish its "work"). But in fact, the atexit function used for cleanup in 
multiprocessing first calls .terminate() on all daemon children before join-ing 
all children. So the moment the main process completes, it immediately 
terminates the daemon child, even though the "process family" is still alive.

This seems counter-intuitive; in the threading case, which multiprocessing is 
supposed to emulate, all non-daemon threads are equivalent, so no daemon 
threads are cleaned until the last non-daemon thread exits. To match the 
threading behavior, it seems like the cleanup code should first join all the 
non-daemon children, then terminate the daemon children, then join the daemon 
children.

This would change the code here (
https://hg.python.org/cpython/file/3.5/Lib/multiprocessing/util.py#l303 ) from:

for p in active_children():
if p.daemon:
info('calling terminate() for daemon %s', p.name)
p._popen.terminate()

for p in active_children():
info('calling join() for process %s', p.name)
p.join()

to:

# Wait on non-daemons first
for p in active_children():
info('calling join() for process %s', p.name)
if not p.daemon:
p.join()

# Terminate and clean up daemons now that non-daemons done
for p in active_children():
if p.daemon:
info('calling terminate() for daemon %s', p.name)
p._popen.terminate()
info('calling join() for process %s', p.name)
p.join()


I've attached repro code to demonstrate; using multiprocessing, the daemon 
never prints its exiting message, while switching to multiprocessing.dummy 
(backed by threading) correctly prints the exit message.

--
components: Library (Lib)
files: testmpdaemon.py
messages: 262324
nosy: josh.r
priority: normal
severity: normal
status: open
title: multiprocessing behavior combining daemon with non-daemon children 
inconsistent with threading
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file42265/testmpdaemon.py

___
Python tracker 

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



[issue9694] argparse required arguments displayed under "optional arguments"

2016-03-23 Thread paul j3

paul j3 added the comment:

I can see changing the group title from 'optional arguments' to 'options' or 
'optionals'

parser._optionals.title
'optional arguments'

But I don't think there's a need to change references in the code or its 
comments from 'optionals' to 'options'.  I like the parallelism between 
'optionals' and 'positionals'.  The terms are well defined in the code.  During 
parsing, the 'required' attribute is only used at the end to check for missing 
arguments.

In Stackoverflow questions I'm tended to talk about 'flagged arguments'.

I still favor encouraging users to define their argument group(s), and making 
it easier to modify the titles of the two predefined groups.  I don't see 
enough of a consensus on alternative titles to make more sweeping changes.

--

___
Python tracker 

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



[issue26627] IDLE incorrectly labeling error as internal

2016-03-23 Thread Tadhg McDonald-Jensen

Tadhg McDonald-Jensen added the comment:

other then bdb.py all of the excluded modules are imported into idlelib.run so 
that line could be replaced with:

import bdb
exclude = (__file__, rpc.__file__, threading.__file__, 
   queue.__file__, RemoteDebugger.__file__, bdb.__file__)

although it is really only necessary for run, rpc and RemoteDebugger since they 
are imported through `idlelib.__` so it could also use a notation like this:


exclude = ("idlelib/run.py", "idlelib/rpc.py", "threading.py", "queue.py",
   "idlelib/RemoteDebugger.py", "bdb.py")

although this would need to make use of os.path.join or equivalent to be cross 
compatible.

--

___
Python tracker 

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



[issue26632] __all__ decorator

2016-03-23 Thread Ethan Furman

Ethan Furman added the comment:

def public(thing, value=None):
if isinstance(thing, str):
mdict = sys._getframe(1).f_globals
name = thing
mdict[name] = thing  # no need for retyping! ;)
else:
mdict = sys.modules[thing.__module__].__dict__
name = thing.__name__
dunder_all = mdict.setdefault('__all__', [])
dunder_all.append(name)
return thing

@public
def baz(a, b):
return a+ b

public('CONST1', 3)

CONST2 = 4



On the down side, you know somebody is going to @public a class' method -- how 
do we check for that?

--

___
Python tracker 

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



[issue26632] __all__ decorator

2016-03-23 Thread Ethan Furman

Changes by Ethan Furman :


--
nosy: +ethan.furman

___
Python tracker 

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



[issue26632] __all__ decorator

2016-03-23 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

Oh, and it should be a built-in 

--

___
Python tracker 

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



[issue26632] __all__ decorator

2016-03-23 Thread Barry A. Warsaw

New submission from Barry A. Warsaw:

This is probably terrible, but given how difficult it is to keep __all__'s up 
to date, maybe something like this can be useful.  I literally whipped this up 
in about 5 minutes, so sit back and watch the bikeshedding!

import sys

def public(thing):
if isinstance(thing, str):
mdict = sys._getframe(1).f_globals
name = thing
else:
mdict = sys.modules[thing.__module__].__dict__
name = thing.__name__
dunder_all = mdict.setdefault('__all__', [])
dunder_all.append(name)
return thing


Then:

@public
def baz(a, b):
return a + b

@public
def buz(c, d):
return c / d

def qux(e, f):
return e * f

class zup:
pass

@public
class zap:
pass

public('CONST1')
CONST1 = 3

CONST2 = 4

public('CONST3')
CONST3 = 5

Normally for any callable with an __name__, you can just decorate it with 
@public to add it to __all__.  Of course that doesn't worth with things like 
constants, thus the str argument.  But of course that also requires 
sys._getframe() so blech.

--
messages: 262319
nosy: barry
priority: normal
severity: normal
status: open
title: __all__ decorator
versions: Python 3.6

___
Python tracker 

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



[issue22401] argparse: 'resolve' conflict handler damages the actions of the parent parser

2016-03-23 Thread paul j3

paul j3 added the comment:

Is this the kind of scenario that you have problems with?

parser = argparse.ArgumentParser()
sp = parser.add_subparsers(dest='cmd')
p1 = sp.add_parser('cmd1')
p1.add_argument('-f')

p2 = sp.add_parser('cmd2')
p2.add_argument('-b')

p3 = sp.add_parser('cmd3', parents=[p1,p2],add_help=False, 
conflict_handler='resolve')
p3.add_argument('-c')

The problem is, apparently, that 'resolve' removes the '-h' option_string from 
the 1st subparser (but does not delete the whole action).  A kludgy fix is to 
add the '-h' back in (after p3 is created):

p1._actions[0].option_strings=['-h']

'p1._actions' is the list of actions (arguments) for subparser p1.  Usually 
help is the first action (if isn't in p3 because of the parents resolve action).

I may work out a custom conflict handler function, but for now this appears to 
solve the issue.  I don't know if the patch I proposed solves your issue or not.

--

___
Python tracker 

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



[issue26612] test_ssl: use context manager (with) to fix ResourceWarning

2016-03-23 Thread Martin Panter

Martin Panter added the comment:

My point about Python 2 was that this might add an annoying difference between 
the two branches. Even if you don’t apply this to Py 2, the next person adding 
or updating a test might be inclined to do it.

Looking closer at your patch I admit that addCleanup() wouldn’t be appropriate 
except for the first change.

Maybe it would be okay to leave the “try / finally” cases as they are? Moving 
connect() inside is good though IMO.

Anyway, I’m only mildly against this. I don’t see much benefit, but I could 
tolerate the downsides. I guess it’s up to you.

--
components: +Tests
stage:  -> patch review

___
Python tracker 

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



[issue26620] Fix ResourceWarning warnings in test_urllib2_localnet

2016-03-23 Thread Martin Panter

Martin Panter added the comment:

This patch looks okay to me. I left one review suggestion.

Focussing on test_sending_headers(), the ResourceWarning seems to be only shown 
since revision 46329eec5515 (Issue 26590). In simpler cases, the warning would 
be bypassed due to Issue 19829. But in this cases it seems there is a garbage 
cycle which may be involved in the new warning.

--

___
Python tracker 

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



[issue9694] argparse required arguments displayed under "optional arguments"

2016-03-23 Thread Martin Panter

Martin Panter added the comment:

Still applicable to Python 3 AFAIK

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



[issue22401] argparse: 'resolve' conflict handler damages the actions of the parent parser

2016-03-23 Thread Jared Deckard

Jared Deckard added the comment:

This behavior is preventing me from using more than one parent parser.

My use case is a convenience subcommand that performs two existing subcommands, 
therefore logically its subparser is required to support the arguments of both 
subparsers.

The only conflict is the "help" argument, which is annoying, but setting the 
conflict handler to "resolve" on the child subparser should just ignore the 
first parent's "help" argument in favor of the second parent.

Instead the "resolve" conflict handler breaks the first parent and causes it to 
output the help info no matter what arguments are given to it.

I am forced to only include one parent and manually duplicate the arguments for 
any additional parents.

--
components:  -Documentation, Tests
nosy: +deckar01
versions: +Python 2.7 -Python 3.5

___
Python tracker 

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



[issue26631] Unable to install Python 3.5.1 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2016-03-23 Thread J Osell

New submission from J Osell:

Unable to install Python 3.5.1 on Windows 10 - Error 0x80070643: Failed to 
install MSI package.

--
components: Installation
files: Python 3.5.1 (64-bit)_20160323181333.log
messages: 262313
nosy: oselljr
priority: normal
severity: normal
status: open
title: Unable to install Python 3.5.1 on Windows 10 - Error 0x80070643: Failed 
to install MSI package.
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file42264/Python 3.5.1 
(64-bit)_20160323181333.log

___
Python tracker 

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



[issue26630] Windows EXE extension installers not finding 32bit Python 3.5 installation

2016-03-23 Thread Jason Erickson

New submission from Jason Erickson:

On both 64 and 32 bit Windows OSes, the 32bit version of Python 3.5 is unable 
to install extensions created with the command:
setup.py bdist_wininst


To reproduce, install the 32bit version of Python 3.5 and run the .exe 
installation for an extension, such as:
http://www.stickpeople.com/projects/python/win-psycopg/2.6.1/psycopg2-2.6.1.win32-py3.5.exe
https://bintray.com/artifact/download/pycurl/pycurl/pycurl-7.43.0.win32-py3.5.exe

Clicking 'Next', the message "Python version 3.5 required, which was not found 
in the registry." will be displayed.

Temporarily renaming the registry key (For 64bit Windows, under HKCU or HKLM):
SOFTWARE\WOW6432Node\Python\PythonCore\3.5-32
to:
SOFTWARE\WOW6432Node\Python\PythonCore\3.5

Allows the extensions to be installed.


This indicates this is because 32bit Python 3.5 now uses the '3.5-32' as the 
string for the registry key whereas the bdist_wininst 'stub' is still expecting 
just the version, '3.5'.

--
components: Distutils
messages: 262312
nosy: dstufft, eric.araujo, jerickso
priority: normal
severity: normal
status: open
title: Windows EXE extension installers not finding 32bit Python 3.5 
installation
type: behavior
versions: Python 3.5

___
Python tracker 

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



[issue26602] argparse doc introduction is inappropriately targeted

2016-03-23 Thread paul j3

paul j3 added the comment:

By text and location the sidebar does not apply specifically to this example.  
It applies to the whole page, 'This page contains the API reference 
information.'

Documentation for argparse is indeed a problem - both because of its complexity 
and how it is used.  Many other reference modules focus on the classes and 
their methods.  This is organized about one class, the parser object, and a 
couple of its methods.  It's really more of an advanced user's tutorial, making 
most sense to users who already have use optparse and getopt.  For them that 
initial example is appropriate, selling them on the power of this parser.

For beginners I'd focus on the tutorial and its examples.  Example or not this 
reference section can be overwhelming to beginning Python users.

--
nosy: +paul.j3

___
Python tracker 

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



[issue26628] Segfault in cffi with ctypes.union argument

2016-03-23 Thread Thomas

Thomas added the comment:

Note [http://www.atmark-techno.com/~yashi/libffi.html]

> Although ‘libffi’ has no special support for unions or bit-fields, it is 
> perfectly happy passing structures back and forth. You must first describe 
> the structure to ‘libffi’ by creating a new ffi_type object for it.

--

___
Python tracker 

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



[issue26588] _tracemalloc: add support for multiple address spaces (domains)

2016-03-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 06552275fa30 by Victor Stinner in branch 'default':
_tracemalloc: use compact key for traces
https://hg.python.org/cpython/rev/06552275fa30

--

___
Python tracker 

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



[issue26628] Segfault in cffi with ctypes.union argument

2016-03-23 Thread SilentGhost

Changes by SilentGhost :


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

___
Python tracker 

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



[issue26629] Need an ability to build standard DLLs with distutils

2016-03-23 Thread Buraddin Ibn-Karlo

New submission from Buraddin Ibn-Karlo:

I want to make a a dynamic library to run its function with ctypes.

Also I want to build the library from sources with distutils (the C++ sources 
are distributed with my Python code).

But alas! Our distutils fails, if the library doesn't have initialization 
function (something like init_). Even if the module does not need 
any initialization.

I did a quick and dirty solution: added a dummy function:
void init_(){}

It somehow works, but I don't think that it is a good idea.

Cannot you add the possibility to tell distutils, that this extention module is 
just a simple DLL, that will be used via ctypes (or somehow else) and it does 
not need any extra init script?

Also, cannot you add an extra section to ctypes documentation? With a 
description how to build such extensions via distutils?

--
assignee: docs@python
components: Build, Documentation, Extension Modules, Windows, ctypes
messages: 262308
nosy: Buraddin Ibn-Karlo, docs@python, paul.moore, steve.dower, tim.golden, 
zach.ware
priority: normal
severity: normal
status: open
title: Need an ability to build standard DLLs with distutils
type: enhancement
versions: Python 2.7

___
Python tracker 

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



[issue26628] Segfault in cffi with ctypes.union argument

2016-03-23 Thread Thomas

New submission from Thomas:

Passing ctypes.Union types as arguments crashes python.

Attached is a minimal example to reproduce. Due to undefined behavior, you may 
have to increase the union _fields_ to reproduce. I tested with 3.5.1 and 
2.7.11.

It seems that cffi treats the union as a normal struct. In classify_argument, 
it loops through the type->elements. The byte_offset increases for each union 
element until pos exceeds enum x86_64_reg_class classes[MAX_CLASSES], causing 
an invalid write here:

size_t pos = byte_offset / 8;
classes[i + pos] = merge_classes (subclasses[i], classes[i + pos]);

I am quite scared considering the lack of any index checks in this code. At 
this point I'm not yet sure whether this is a bug in ctypes or libffi.

#0  classify_argument (type=0xce41b8, classes=0x7fffb4e0, byte_offset=8) at 
Python-3.5.1/Modules/_ctypes/libffi/src/x86/ffi64.c:248
#1  0x76bc6409 in examine_argument (type=0xce41b8, 
classes=0x7fffb4e0, in_return=false, pngpr=0x7fffb4dc, 
pnsse=0x7fffb4d8)
at Python-3.5.1/Modules/_ctypes/libffi/src/x86/ffi64.c:318
#2  0x76bc68ce in ffi_call (cif=0x7fffb590, fn=0x7751d5a0, 
rvalue=0x7fffb660, avalue=0x7fffb640) at 
Python-3.5.1/Modules/_ctypes/libffi/src/x86/ffi64.c:462
#3  0x76bb589e in _call_function_pointer (flags=4353, 
pProc=0x7751d5a0, avalues=0x7fffb640, atypes=0x7fffb620, 
restype=0xcdd488, resmem=0x7fffb660, argcount=1)
at Python-3.5.1/Modules/_ctypes/callproc.c:811
#4  0x76bb6593 in _ctypes_callproc (pProc=0x7751d5a0, 
argtuple=0xc8b3e8, flags=4353, argtypes=0xcb2098, restype=0xcdcd38, checker=0x0)
at Python-3.5.1/Modules/_ctypes/callproc.c:1149
#5  0x76baf84f in PyCFuncPtr_call (self=0xcf3708, inargs=0xc8b3e8, 
kwds=0x0) at Python-3.5.1/Modules/_ctypes/_ctypes.c:3869
#6  0x0043b66a in PyObject_Call (func=0xcf3708, arg=0xc8b3e8, kw=0x0) 
at ../../Python-3.5.1/Objects/abstract.c:2165

--
components: ctypes
files: unioncrash.py
messages: 262307
nosy: tilsche
priority: normal
severity: normal
status: open
title: Segfault in cffi with ctypes.union argument
type: crash
versions: Python 2.7, Python 3.5
Added file: http://bugs.python.org/file42263/unioncrash.py

___
Python tracker 

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



[issue26626] test_dbm_gnu

2016-03-23 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +georg.brandl
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



[issue26391] Specialized sub-classes of Generic never call __init__

2016-03-23 Thread Guido van Rossum

Guido van Rossum added the comment:

You've hit a type where PEP 484 and mypy disagree.

The PEP shows a few examples of this:
https://www.python.org/dev/peps/pep-0484/#instantiating-generic-classes-and-type-erasure

However when I feed the examples from the PEP to mypy I get an error on each of 
the last two lines:

-
from typing import TypeVar, Generic
T = TypeVar('T')
class Node(Generic[T]):
pass
x = Node[T]()
y = Node[int]()
-
b.py:5: error: Invalid type "b.T"
b.py:5: error: Generic type not valid as an expression any more (use '# type:' 
comment instead)
b.py:6: error: Generic type not valid as an expression any more (use '# type:' 
comment instead)

I suspect that mypy is right and the PEP didn't catch up to the change of mind 
in the flurry of activity right before acceptance.

Since it's provisional I'd like to change the PEP to disallow this.

At the same time at runtime I think it should either fail loudly or work, not 
silently return an uninitialized instance, so typing.py also needs to be fixed.

Thanks for the report!

--

___
Python tracker 

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



[issue20012] Re: Allow Path.relative_to() to accept non-ancestor paths

2016-03-23 Thread Antony Lee

Antony Lee added the comment:

Kindly bumping the issue.
I'd suggest overriding `PurePath.relative_to` in the `Path` class, to something 
like `PurePath.relative_to(self, other, *, allow_ancestor=False): ...`, which 
would resolve each ancestor of `self` successively to check whether it is also 
an ancestor of `other`, so that symlinks would be handled correctly.

--
nosy: +Antony.Lee

___
Python tracker 

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



[issue26621] test_decimal fails with libmpdecimal 2.4.2

2016-03-23 Thread Stefan Krah

Changes by Stefan Krah :


--
status: open -> closed

___
Python tracker 

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



[issue26621] test_decimal fails with libmpdecimal 2.4.2

2016-03-23 Thread Stefan Krah

Stefan Krah added the comment:

The roundup timeline is a lie. :)  I pushed the 3.5 patch shortly after the 3.6 
one and well before msg262302.

--

___
Python tracker 

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



[issue26621] test_decimal fails with libmpdecimal 2.4.2

2016-03-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3ec98f352053 by Stefan Krah in branch '3.5':
Issue #26621: Remove unnecessary test.
https://hg.python.org/cpython/rev/3ec98f352053

--

___
Python tracker 

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



[issue18787] Misleading error from getspnam function of spwd module

2016-03-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c1677c8f92e1 by Victor Stinner in branch 'default':
Fix test_spwd on OpenIndiana
https://hg.python.org/cpython/rev/c1677c8f92e1

--

___
Python tracker 

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



[issue26621] test_decimal fails with libmpdecimal 2.4.2

2016-03-23 Thread Matthias Klose

Matthias Klose added the comment:

please apply this to the 3.5 branch as well

--
status: closed -> open

___
Python tracker 

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



[issue26621] test_decimal fails with libmpdecimal 2.4.2

2016-03-23 Thread Stefan Krah

Stefan Krah added the comment:

I did: Somehow roundup failed to catch it.

--

___
Python tracker 

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



[issue26621] test_decimal fails with libmpdecimal 2.4.2

2016-03-23 Thread Stefan Krah

Changes by Stefan Krah :


--
assignee:  -> skrah
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue26621] test_decimal fails with libmpdecimal 2.4.2

2016-03-23 Thread Stefan Krah

Stefan Krah added the comment:

Thanks, the test was not needed: It was more of a reminder to sync the version 
numbers.

--

___
Python tracker 

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



[issue26621] test_decimal fails with libmpdecimal 2.4.2

2016-03-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 24c8bb9421f4 by Stefan Krah in branch 'default':
Issue #26621: Update libmpdec version and remove unnecessary test case.
https://hg.python.org/cpython/rev/24c8bb9421f4

--
nosy: +python-dev

___
Python tracker 

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



[issue25729] update pure python datetime.timedelta creation

2016-03-23 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
assignee:  -> belopolsky
stage: patch review -> commit review

___
Python tracker 

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



[issue26591] datetime datetime.time to datetime.time comparison does nothing

2016-03-23 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
nosy: +belopolsky

___
Python tracker 

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



[issue9694] argparse required arguments displayed under "optional arguments"

2016-03-23 Thread paul j3

paul j3 added the comment:

This ArgumentDefaultHelpFormatter issue should probably be raised in its own 
issue.  It applies to 'required' optionals, but any patch would be independent 
of the issues discussed here.

This class defines a method that adds the '%(default)' string to the help in 
certain situations.  It already skips required positionals.  So adding a test 
for 'action.required' should be easy.

def _get_help_string(self, action):
help = action.help
if '%(default)' not in action.help:
if action.default is not SUPPRESS:
defaulting_nargs = [OPTIONAL, ZERO_OR_MORE]
if action.option_strings or action.nargs in defaulting_nargs:
help += ' (default: %(default)s)'
return help

There are 2 easy user fixes.

- a custom HelpFormatter class that implements this fix.  

- 'default=argparse.SUPPRESS' for arguments where you do not want to see the 
default.  This SUPPRESS is checked else where in the code, but for a required 
argument I don't think that matters (but it needs testing).

--

___
Python tracker 

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



[issue25824] 32-bit 2.7.11 installer creates registry keys that are incompatible with the installed python27.dll

2016-03-23 Thread Zbynek Winkler

Changes by Zbynek Winkler :


--
nosy: +Zbynek.Winkler

___
Python tracker 

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



[issue26616] A bug in datetime.astimezone() method

2016-03-23 Thread Berker Peksag

Berker Peksag added the comment:

3.3 and 3.4 are in security-fix-only mode: 
https://docs.python.org/devguide/devcycle.html#summary So this can be fixed in 
3.5 and default branches.

--
nosy: +berker.peksag

___
Python tracker 

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



[issue26616] A bug in datetime.astimezone() method

2016-03-23 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

This bug affects versions starting at 3.3.  Can someone advise to what versions 
the patch should be applied?

--
versions: +Python 3.3, Python 3.4

___
Python tracker 

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



[issue26616] A bug in datetime.astimezone() method

2016-03-23 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
assignee:  -> belopolsky
keywords: +patch
nosy: +haypo, tim.peters
stage: needs patch -> patch review
Added file: http://bugs.python.org/file42262/issue26616.diff

___
Python tracker 

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



[issue26627] IDLE incorrectly labeling error as internal

2016-03-23 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +kbk, roger.serwy, terry.reedy
versions: +Python 3.6

___
Python tracker 

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



[issue24266] raw_input + readline: Ctrl+C during search breaks readline

2016-03-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Martin.

--

___
Python tracker 

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



[issue26627] IDLE incorrectly labeling error as internal

2016-03-23 Thread Tadhg McDonald-Jensen

New submission from Tadhg McDonald-Jensen:

(I apologize if I'm doing something wrong)

When using a file named run.py in idle, any errors raised from the module makes 
IDLE show a traceback like this:

Traceback (most recent call last):
** IDLE Internal Exception: 
  File 
"/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/idlelib/run.py",
 line 351, in runcode
exec(code, self.locals)
  File "/Users/Tadhg/Documents/run.py", line 1, in 
raise ValueError
ValueError

I looked into idlelib.run and think the culprit is the way print_exception 
tries to exclude internal files, specifically line 180 in vs 2.7 and line 206 
in vs3.5

exclude = ("run.py", "rpc.py", "threading.py", "queue.py",
   "RemoteDebugger.py", "bdb.py")

this excludes paths with these names anywhere in the path (later in 
cleanup_traceback) instead of getting the absolute paths of these modules.

--
components: IDLE
files: run.py
messages: 262293
nosy: Tadhg McDonald-Jensen
priority: normal
severity: normal
status: open
title: IDLE incorrectly labeling error as internal
type: behavior
versions: Python 2.7, Python 3.5
Added file: http://bugs.python.org/file42261/run.py

___
Python tracker 

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



[issue18787] Misleading error from getspnam function of spwd module

2016-03-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 430af393d8f1 by Victor Stinner in branch 'default':
Try to fix test_spwd on OpenIndiana
https://hg.python.org/cpython/rev/430af393d8f1

--

___
Python tracker 

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



[issue26525] Documentation of ord(c) easy to misread

2016-03-23 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Agreed.  Good catch.

--
status: open -> closed

___
Python tracker 

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



[issue26525] Documentation of ord(c) easy to misread

2016-03-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f3bd94c57cd8 by Terry Jan Reedy in branch '3.5':
Issue #26525: Change chr example to match change in ord example.
https://hg.python.org/cpython/rev/f3bd94c57cd8

--

___
Python tracker 

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



[issue23848] faulthandler: setup an exception handler on Windows

2016-03-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3247f8df5514 by Victor Stinner in branch 'default':
Issue #23848: Fix usage of _Py_DumpDecimal()
https://hg.python.org/cpython/rev/3247f8df5514

--

___
Python tracker 

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



[issue26625] SELECT-initiated transactions can cause "database is locked" in sqlite

2016-03-23 Thread Berker Peksag

Changes by Berker Peksag :


--
stage:  -> resolved
superseder:  -> sqlite3 SELECT does not BEGIN a transaction, but should 
according to spec

___
Python tracker 

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



[issue26626] test_dbm_gnu

2016-03-23 Thread ink

New submission from ink:

Hello, I was running post-build tests after building 3.5.1 when test_dbm_gnu 
hanged on an error. The same happens with 3.4.4 so it's not version relevant. 
Furthermore, this happens on an NFS mounted storage but not on our Lustre 
volume. Most of the time it just hangs on OSError. We probably don't need dbm 
but the issue seems to be directory related and directories cannot be handled 
properly there could be other implications.

The build process was usual
./configure --prefix=/apps/python/3.5.1 --enable-shared --with-threads
make
make test

Thank you for any advice


By the way, on its own, the test runs fine

LD_LIBRARY_PATH=/apps/python/src/Python-3.5.1 ./python  
./Lib/test/test_dbm_gnu.py
.
--
Ran 5 tests in 0.026s

OK

but not as part of the regression tests


[114/397/2] test_dbm_gnu
Warning -- files was modified by test_dbm_gnu
Traceback (most recent call last):
  File 
"/opt/gridware/apps/python/src/Python-3.5.1/Lib/test/support/__init__.py", line 
899, in temp_dir
yield path
  File 
"/opt/gridware/apps/python/src/Python-3.5.1/Lib/test/support/__init__.py", line 
948, in temp_cwd
yield cwd_dir
  File "/opt/gridware/apps/python/src/Python-3.5.1/Lib/test/regrtest.py", line 
1591, in main_in_temp_cwd
main()
  File "/opt/gridware/apps/python/src/Python-3.5.1/Lib/test/regrtest.py", line 
554, in main
sys.exit(0)
SystemExit: 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/gridware/apps/python/src/Python-3.5.1/Lib/runpy.py", line 170, in 
_run_module_as_main
"__main__", mod_spec)
  File "/opt/gridware/apps/python/src/Python-3.5.1/Lib/runpy.py", line 85, in 
_run_code
exec(code, run_globals)
  File "/opt/gridware/apps/python/src/Python-3.5.1/Lib/test/regrtest.py", line 
1616, in 
main_in_temp_cwd()
  File "/opt/gridware/apps/python/src/Python-3.5.1/Lib/test/regrtest.py", line 
1591, in main_in_temp_cwd
main()
  File "/opt/gridware/apps/python/src/Python-3.5.1/Lib/contextlib.py", line 77, 
in __exit__
self.gen.throw(type, value, traceback)
  File 
"/opt/gridware/apps/python/src/Python-3.5.1/Lib/test/support/__init__.py", line 
948, in temp_cwd
yield cwd_dir
  File "/opt/gridware/apps/python/src/Python-3.5.1/Lib/contextlib.py", line 77, 
in __exit__
self.gen.throw(type, value, traceback)
  File 
"/opt/gridware/apps/python/src/Python-3.5.1/Lib/test/support/__init__.py", line 
902, in temp_dir
shutil.rmtree(path)
  File "/opt/gridware/apps/python/src/Python-3.5.1/Lib/shutil.py", line 474, in 
rmtree
_rmtree_safe_fd(fd, path, onerror)
  File "/opt/gridware/apps/python/src/Python-3.5.1/Lib/shutil.py", line 432, in 
_rmtree_safe_fd
onerror(os.unlink, fullname, sys.exc_info())
  File "/opt/gridware/apps/python/src/Python-3.5.1/Lib/shutil.py", line 430, in 
_rmtree_safe_fd
os.unlink(name, dir_fd=topfd)
OSError: [Errno 16] Device or resource busy: '.nfs027813d7000c'

Traceback (most recent call last):
  File "/opt/gridware/apps/python/src/Python-3.5.1/Lib/runpy.py", line 170, in 
_run_module_as_main
"__main__", mod_spec)
  File "/opt/gridware/apps/python/src/Python-3.5.1/Lib/runpy.py", line 85, in 
_run_code
exec(code, run_globals)
  File "/opt/gridware/apps/python/src/Python-3.5.1/Lib/test/__main__.py", line 
3, in 
regrtest.main_in_temp_cwd()
  File "/opt/gridware/apps/python/src/Python-3.5.1/Lib/test/regrtest.py", line 
1591, in main_in_temp_cwd
main()
  File "/opt/gridware/apps/python/src/Python-3.5.1/Lib/test/regrtest.py", line 
756, in main
raise Exception("Child error on {}: {}".format(test, result[1]))
Exception: Child error on test_dbm_gnu: Exit code 1

^CException ignored in: 
Traceback (most recent call last):
  File "/opt/gridware/apps/python/src/Python-3.5.1/Lib/threading.py", line 
1288, in _shutdown
t.join()
  File "/opt/gridware/apps/python/src/Python-3.5.1/Lib/threading.py", line 
1054, in join
self._wait_for_tstate_lock()
  File "/opt/gridware/apps/python/src/Python-3.5.1/Lib/threading.py", line 
1070, in _wait_for_tstate_lock
elif lock.acquire(block, timeout):
KeyboardInterrupt

--
components: Tests
messages: 262288
nosy: ink
priority: normal
severity: normal
status: open
title: test_dbm_gnu
type: crash
versions: Python 3.4, Python 3.5

___
Python tracker 

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



[issue26624] Windows hangs in call to CRT setlocale()

2016-03-23 Thread Jeremy Kloth

Jeremy Kloth added the comment:

>From the UCRT sources:

// Deadlock Avoidance:  When a new thread is created in the process, we
// create a new PTD for the thread.  The PTD initialization function is
// called under the loader lock.  This initialization function will also
// acquire the locale lock in order to acquire a reference to the current
// global locale for the new thread.
//
// Some of the locale APIs are not available on all supported target OSes.
// We dynamically obtain these libraries via LoadLibrary/GetProcAddress.
// We must ensure that no call to LoadLibrary is made while we hold the
// locale lock, lest we deadlock due to lock order inversion between the
// loader lock and the locale lock.

--

___
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-03-23 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Upendra and Eric: I look through and successfully ran both your files as they 
are, without change.  You both show a basic ability to write a simple tkinter 
app.

Upendra's is more complete as a demo because a) it has two tabs that I can 
switch between, even though the second is blank, and b) the first tab shows 
real data -- the list of installed packages on my system.  Eric, if you submit 
a proposal for this project, I would like to see these upgrades (without 
copying, of course).

Style nit: I don't like 'import *' and prefer 'as tk' or 'import Tk, Frame, 
...'.  This choice partly depends on whether one prefers to use for options the 
named constants like EXTENDED or literal strings like 'extended'.  You don't 
need to rewrite now as long as you are *willing* to change, perhaps after 
discussing which alternative to use, if selected.  Eric: classes should be 
capitalized, but not all caps.  'Pip' would be fine.  In general, I want to 
follow PEP8 for new code.

 At least as important as style is structuring for testability, which IDLE is 
not :-(. Collecting data and displaying data should literally be separate 
functions: a get_data and a display_data.  (An extra reason to do this in the 
stdlib context is that only a small subset of CPython buildbots have graphic 
screens and run gui tests.)  Another change would be to replace

Get_data sends a request to pip and parses the output strings into a Python 
data object.  Its unittests would use a mock-pip that returns output copied and 
adapted from real pip request.  The unittest would then check that the data 
object equals the expected object.

Display_data receives the data object and changes the display.  Testing this is 
trickier.  It requires the 'gui' resource.  An initial test is that it run 
without raising an exception.  Some other checks can be automated.  Checking 
that the display 'looks right' has to be done by a human.

--

___
Python tracker 

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



[issue26624] Windows hangs in call to CRT setlocale()

2016-03-23 Thread STINNER Victor

STINNER Victor added the comment:

Random links from Google:

* http://stackoverflow.com/questions/35572792/setlocale-stuck-on-windows 
"Sometimes it works but sometimes it never returns from it. I can not identify 
the reason. I use Visual Studio 2015 and Windows 7."

* https://bugs.chromium.org/p/webrtc/issues/detail?id=5507 " Summary: Dr Memory 
errors in MSVCP140D.dll when switching to VS2015"

--

___
Python tracker 

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



[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2016-03-23 Thread Rian Hunter

Changes by Rian Hunter :


--
nosy:  -rhunter

___
Python tracker 

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



[issue9924] sqlite3 SELECT does not BEGIN a transaction, but should according to spec

2016-03-23 Thread Rian Hunter

Rian Hunter added the comment:

This bug can also lead to subtle and unintuitive "database is locked" bugs, 
even when a large timeout is set on the connection. Many, many people are 
affected by this bug (search the web for "python sqlite database is locked"). 
I've attached code that demonstrates this issue.

I disagree that the current behavior cuts down on SQLite file locking. As soon 
as any SELECT statement is opened, an implicit lock is held by SQLite (whether 
it resides within a BEGIN block or not): https://www.sqlite.org/lockingv3.html

SQLite has been designed to do its own "late locking." Pysqlite does not need 
to duplicate this behavior.

This is a clear-as-day bug and should be fixed.

--
nosy: +rhunter
Added file: http://bugs.python.org/file42260/unintuitive_sqlite_behavior.py

___
Python tracker 

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



[issue9924] sqlite3 SELECT does not BEGIN a transaction, but should according to spec

2016-03-23 Thread Rian Hunter

Changes by Rian Hunter :


--
versions: +Python 3.2, 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



[issue26625] SELECT-initiated transactions can cause "database is locked" in sqlite

2016-03-23 Thread Rian Hunter

Rian Hunter added the comment:

duplicate of #9924

--
resolution:  -> duplicate
status: open -> closed

___
Python tracker 

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



[issue26625] SELECT-initiated transactions can cause "database is locked" in sqlite

2016-03-23 Thread Rian Hunter

New submission from Rian Hunter:

When a transaction starts with a SELECT statement this can invoke a "database 
is locked" error if the SELECT statement is not exhausted or explicitly closed.

This can lead to subtle "database is locked" bugs, even when a large timeout is 
set on the connection. Many, many people are affected by this bug (search the 
web for "python sqlite database is locked").

The attached code demonstrates this bug and possible (unintuitive) fixes. The 
best workaround is to "explicitly" start a transaction in these cases by 
issuing a dummy DML statement. This seems very clumsy.

My proposed fix is to implicitly open a transaction before all non-DDL 
statements (including SELECT statements), not just DML statements.

If there won't be a fix soon, then at least the documentation should note this 
quirky behavior.

--
components: Library (Lib)
files: unintuitive_sqlite_behavior.py
messages: 262282
nosy: rhunter
priority: normal
severity: normal
status: open
title: SELECT-initiated transactions can cause "database is locked" in sqlite
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file42259/unintuitive_sqlite_behavior.py

___
Python tracker 

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



[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2016-03-23 Thread mike bayer

mike bayer added the comment:

@rian - your issue for this is http://bugs.python.org/issue9924.

The implicit BEGIN in all cases will probably never be the default but we do 
need an option for this to be the case, in order to support SERIALIZABLE 
isolation.

--

___
Python tracker 

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



[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2016-03-23 Thread Rian Hunter

Rian Hunter added the comment:

@mike Yes you're right, This bug report is different, my mistake.

DB-API may require implicit transactions but pysqlite should open a transaction 
before *any* non-DDL statement, including "SELECT", not just DML statements. 
Currently one must issue a dummy DML statement just to open a transaction that 
otherwise would start with a SELECT statement.

I see nothing in DB-API (https://www.python.org/dev/peps/pep-0249/) that says 
transactions should implicitly open before DML statements and not SELECT 
statements.

--

___
Python tracker 

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



[issue26624] Windows hangs in call to CRT setlocale()

2016-03-23 Thread STINNER Victor

STINNER Victor added the comment:

The bug occurs in test_strptime and test__locale according to Jeremy.

> - Tests run using '-j4'

With this option, each test file is run in a new fresh process, so it's more 
likely a race condition which depends on the system load (on exact timing) than 
the interaction with other tests running in parallel.

--

___
Python tracker 

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



[issue26624] Windows hangs in call to CRT setlocale()

2016-03-23 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



[issue26624] Windows hangs in call to CRT setlocale()

2016-03-23 Thread Jeremy Kloth

Jeremy Kloth added the comment:

Oh, yes.  It even occasionally happens on 2.7.  The oldest occurrence I  can 
dig up is May/June of 2013 (for 2.7).

--

___
Python tracker 

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



[issue26624] Windows hangs in call to CRT setlocale()

2016-03-23 Thread Steve Dower

Steve Dower added the comment:

Have you actually seen this occurring back to 3.3? I'd expect something like 
this to either be pre-3.5 or post-3.5, but not both.

--

___
Python tracker 

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



[issue26624] Windows hangs in call to CRT setlocale()

2016-03-23 Thread Jeremy Kloth

New submission from Jeremy Kloth:

My Windows BuildBot (http://buildbot.python.org/all/buildslaves/kloth-win64) is 
hanging in calls to the CRT function setlocale() as determined by attaching to 
the hung test process in Visual Studio.

This has been happening occasionally (every tenth+ build) for quite some time, 
but not to the frequency as of late (every fourth build or so).

I would debug further, however my Visual Studio debugging-fu is not up to this 
challenge it seems.

Pertinent details of the buildbot:
- Windows 7 SP1 64-bit on a quad-core processor
- Running buildbot as a service
- Tests run using '-j4'
- SSD used for storage

Order of the tests do not seem to matter as re-running the test suite using the 
random seed that hung will pass when run from a console on the buildbot.

Locale-using functions in the CRT have internally locking which is what I 
believe is the cause of the deadlock, but cannot determine exactly as this is 
where my debugging knowledge runs out.

Help to diagnose further is greatly appreciated!

--
components: Interpreter Core, Windows
messages: 262276
nosy: eryksun, jkloth, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Windows hangs in call to CRT setlocale()
versions: 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



[issue26525] Documentation of ord(c) easy to misread

2016-03-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Reversed to ord() function chr() still uses 'ν' as an example. I think both 
functions should use the same example.

--
status: closed -> open

___
Python tracker 

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



[issue26623] JSON encode: more informative error

2016-03-23 Thread Mahmoud Lababidi

Changes by Mahmoud Lababidi :


--
keywords: +patch
Added file: http://bugs.python.org/file42258/json_encode.patch

___
Python tracker 

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



[issue26623] JSON encode: more informative error

2016-03-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I think it is better to remove the representation of the object at all. It can 
be too long and less informative that the type of the object.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue26623] JSON encode: more informative error

2016-03-23 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +ezio.melotti, pitrou, rhettinger

___
Python tracker 

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



[issue9694] argparse required arguments displayed under "optional arguments"

2016-03-23 Thread Shahar Golan

Shahar Golan added the comment:

This is not just a section issue. Please note that using the 
ArgumentDefaultHelpFormatter:

  argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultHelpFormatter)

The help will also show (default=None) for these required arguments.

--
components:  -Documentation
nosy: +shaharg
versions:  -Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue26623] JSON encode: more informative error

2016-03-23 Thread Mahmoud Lababidi

New submission from Mahmoud Lababidi:

The json.dumps()/encode functionality will raise an Error when an object that 
cannot be json-encoded is encountered. The current Error message only shows the 
Object itself. I would like to enhance the error message by also providing the 
Type. This is useful when numpy.int objects are passed in, but not clear that 
they are numpy objects.

--
components: Library (Lib)
messages: 262272
nosy: Mahmoud Lababidi
priority: normal
severity: normal
status: open
title: JSON encode: more informative error
type: enhancement
versions: Python 3.6

___
Python tracker 

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



[issue23848] faulthandler: setup an exception handler on Windows

2016-03-23 Thread STINNER Victor

STINNER Victor added the comment:

Pass succeeded again on ARM, I close the issue.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue23848] faulthandler: setup an exception handler on Windows

2016-03-23 Thread STINNER Victor

STINNER Victor added the comment:

The change b114dbbe2d31 introduced a regression on the ARM buildbot. I hope 
that it's fixed by the change e6f00778d61f.

http://buildbot.python.org/all/builders/ARMv7%20Ubuntu%203.x/builds/3800/steps/test/logs/stdio

1:06:35 [400/400/1] test_faulthandler
Timeout (1:00:00)!
Thread 0x40102110 (most recent call first):
  File 
"/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/subprocess.py",
 line 1608 in _try_wait
  File 
"/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/subprocess.py",
 line 1658 in wait
  File 
"/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/subprocess.py",
 line 1002 in __exit__
  File 
"/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test_faulthandler.py",
 line 64 in get_output
  File 
"/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test_faulthandler.py",
 line 108 in check_error
  File 
"/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test_faulthandler.py",
 line 115 in check_fatal_error
  File 
"/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test_faulthandler.py",
 line 241 in test_stack_overflow
...

--

___
Python tracker 

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



[issue23848] faulthandler: setup an exception handler on Windows

2016-03-23 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue23848] faulthandler: setup an exception handler on Windows

2016-03-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e6f00778d61f by Victor Stinner in branch 'default':
Issue #23848: Try to fix test_faulthandler on ARM
https://hg.python.org/cpython/rev/e6f00778d61f

--

___
Python tracker 

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



[issue23848] faulthandler: setup an exception handler on Windows

2016-03-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset efcc48cd5bfb by Victor Stinner in branch 'default':
faulthandler: only log fatal exceptions
https://hg.python.org/cpython/rev/efcc48cd5bfb

--

___
Python tracker 

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



[issue26622] test_winreg now logs "Windows exception: code 0x06ba" on Python 3.6

2016-03-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset efcc48cd5bfb by Victor Stinner in branch 'default':
faulthandler: only log fatal exceptions
https://hg.python.org/cpython/rev/efcc48cd5bfb

--
nosy: +python-dev

___
Python tracker 

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



[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2016-03-23 Thread mike bayer

mike bayer added the comment:

@Rian - implicit transactions are part of the DBAPI spec. Looking at the 
original description, the purpose of this bug is to not *end* the transaction 
when DDL is received.   So there's no solution for "database is locked" here, 
other than pysqlite's usual behavior of not emitting BEGIN until DML is 
encountered (which works well).

--

___
Python tracker 

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



[issue26622] test_winreg now logs "Windows exception: code 0x06ba" on Python 3.6

2016-03-23 Thread STINNER Victor

STINNER Victor added the comment:

Ok, I added a check on the EXCEPTION_NONCONTINUABLE flag. test_winreg doesn't 
log exceptions anymore, but test_faulthandler still pass.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue23848] faulthandler: setup an exception handler on Windows

2016-03-23 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue26622] test_winreg now logs "Windows exception: code 0x06ba" on Python 3.6

2016-03-23 Thread STINNER Victor

STINNER Victor added the comment:

Ah, it looks like an exception contains flag, especially the 
EXCEPTION_NONCONTINUABLE flag. Maybe we can use this one to decide if we must 
log or not the exception?

By the way, is it better to log the exception code as hexadecimal (0x06ba) or 
decimal (1722)? Windows doc looks to prefer decimal.

--

___
Python tracker 

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



[issue26622] test_winreg now logs "Windows exception: code 0x06ba" on Python 3.6

2016-03-23 Thread STINNER Victor

New submission from STINNER Victor:

The issue #23848 (change b114dbbe2d31) enhanced the faulthandler module to log 
Windows exceptions with the Python traceback. It uses 
AddVectoredExceptionHandler(1, callback) to register the callback.

Problem: test_winreg now logs a lot of "Windows exception: code 0x06ba" 
messages followed by traceback. It's error RPC_S_SERVER_UNAVAILABLE (1722): 
"The RPC server is unavailable". It doesn't seem like a fatal error, so I'm not 
sure that it's worth to log it.

Is it possible to check if an exception is a fatal error or not?

Or should we explicitly ignore *this* specific error?

Note: faulthandler must be enabled manually.

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

Windows exception: code 0x06ba

Current thread 0x0500 (most recent call first):
  File "D:\buildarea\3.x.bolen-windows8\build\lib\test\test_winreg.py", line 
305 in test_dynamic_key
  File "D:\buildarea\3.x.bolen-windows8\build\lib\unittest\case.py", line 600 
in run
  File "D:\buildarea\3.x.bolen-windows8\build\lib\unittest\case.py", line 648 
in __call__
  File "D:\buildarea\3.x.bolen-windows8\build\lib\unittest\suite.py", line 122 
in run
  File "D:\buildarea\3.x.bolen-windows8\build\lib\unittest\suite.py", line 84 
in __call__
  File "D:\buildarea\3.x.bolen-windows8\build\lib\unittest\suite.py", line 122 
in run
  File "D:\buildarea\3.x.bolen-windows8\build\lib\unittest\suite.py", line 84 
in __call__
  File "D:\buildarea\3.x.bolen-windows8\build\lib\unittest\runner.py", line 176 
in run
  File "D:\buildarea\3.x.bolen-windows8\build\lib\test\support\__init__.py", 
line 1802 in _run_suite
  File "D:\buildarea\3.x.bolen-windows8\build\lib\test\support\__init__.py", 
line 1836 in run_unittest
  File "D:\buildarea\3.x.bolen-windows8\build\lib\test\test_winreg.py", line 
479 in test_main
  File "D:\buildarea\3.x.bolen-windows8\build\lib\test\libregrtest\runtest.py", 
line 162 in runtest_inner
  File "D:\buildarea\3.x.bolen-windows8\build\lib\test\libregrtest\runtest.py", 
line 115 in runtest
  File "D:\buildarea\3.x.bolen-windows8\build\lib\test\libregrtest\main.py", 
line 306 in run_tests_sequential
  File "D:\buildarea\3.x.bolen-windows8\build\lib\test\libregrtest\main.py", 
line 367 in run_tests
  File "D:\buildarea\3.x.bolen-windows8\build\lib\test\libregrtest\main.py", 
line 405 in main
  File "D:\buildarea\3.x.bolen-windows8\build\lib\test\libregrtest\main.py", 
line 446 in main
  File "D:\buildarea\3.x.bolen-windows8\build\lib\test\libregrtest\main.py", 
line 468 in main_in_temp_cwd
  File "D:\buildarea\3.x.bolen-windows8\build\PCbuild\..\lib\test\regrtest.py", 
line 39 in 


--
components: Tests, Windows
messages: 262263
nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: test_winreg now logs "Windows exception: code 0x06ba" on Python 3.6
versions: Python 3.6

___
Python tracker 

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



[issue26613] Descriptor HowTo Guide - Typo

2016-03-23 Thread Stubz

Stubz added the comment:

Thanx mate, I am sorted ...

Q tho ...

It turns out my issue was with the class Dict and what I called a typo in the 
call to dict.fromkeys ...

In order to make it 'go', I had to use the lower case letter, how is that not a 
typo ¿

The part that hung me up was the naming of class Dict and the call to 
dict.fromkeys, with no variable assigned to it ... 

It makes better sense now, but ... a class Dict used as a example of 
dictobject, to demonstrate the descriptors use of the dictobject methods, from 
a call to Dictobject, that returns error object not iterable ...

I don't care what Lvl you are, that's just confusing ...

--

___
Python tracker 

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



[issue26619] 3.5.1 install fails on Windows Server 2008 R2 64-bit

2016-03-23 Thread Steve Dower

Steve Dower added the comment:

Apparently the version detection needs to be changed, and I'll need to figure 
out what the WS prerequisites are for installing the UCRT update.

It's entirely possible that there's an update you genuinely need to install 
3.5, as there would be on a Windows client machine with that version, but I 
don't know what it is for Windows Server.

--
assignee:  -> steve.dower
versions: +Python 3.6

___
Python tracker 

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



[issue26621] test_decimal fails with libmpdecimal 2.4.2

2016-03-23 Thread Matthias Klose

New submission from Matthias Klose:

test_decimal fails with libmpdecimal 2.4.2

that's because Lib/_pydecimal.py hardcodes

__libmpdec_version__ = "2.4.1" # compatible libmpdec version

--
components: Extension Modules
messages: 262260
nosy: doko, skrah
priority: normal
severity: normal
status: open
title: test_decimal fails with libmpdecimal 2.4.2
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



[issue26619] 3.5.1 install fails on Windows Server 2008 R2 64-bit

2016-03-23 Thread Steve Morris

Steve Morris added the comment:

I just tried the 3.4.4 installer (Windows x86-64 MSI) and it works correctly

--

___
Python tracker 

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



[issue26391] Specialized sub-classes of Generic never call __init__

2016-03-23 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +gvanrossum

___
Python tracker 

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



[issue26619] 3.5.1 install fails on Windows Server 2008 R2 64-bit

2016-03-23 Thread SilentGhost

Changes by SilentGhost :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue26620] Fix ResourceWarning warnings in test_urllib2_localnet

2016-03-23 Thread STINNER Victor

New submission from STINNER Victor:

Attached patch fixes 3 ResourceWarning warnings in 
Lib/test/test_urllib2_localnet.py.

See also issue #26612 (test_ssl).

Example of warning logged by "./python -X tracemalloc=25  -m test -v 
test_urllib2_localnet ":
---
/home/haypo/prog/python/default/Lib/test/support/__init__.py:1444: 
ResourceWarning: unclosed 
  gc.collect()
Object allocated at (most recent call first):
  File "/home/haypo/prog/python/default/Lib/socket.py", lineno 697
sock = socket(af, socktype, proto)
  File "/home/haypo/prog/python/default/Lib/http/client.py", lineno 898
(self.host,self.port), self.timeout, self.source_address)
  File "/home/haypo/prog/python/default/Lib/http/client.py", lineno 926
self.connect()
  File "/home/haypo/prog/python/default/Lib/http/client.py", lineno 983
self.send(msg)
  File "/home/haypo/prog/python/default/Lib/http/client.py", lineno 1151
self._send_output(message_body)
  File "/home/haypo/prog/python/default/Lib/http/client.py", lineno 1200
self.endheaders(body)
  File "/home/haypo/prog/python/default/Lib/http/client.py", lineno 1155
self._send_request(method, url, body, headers)
  File "/home/haypo/prog/python/default/Lib/urllib/request.py", lineno 1303
h.request(req.get_method(), req.selector, req.data, headers)
  File "/home/haypo/prog/python/default/Lib/urllib/request.py", lineno 1331
return self.do_open(http.client.HTTPConnection, req)
  File "/home/haypo/prog/python/default/Lib/urllib/request.py", lineno 503
result = func(*args)
  File "/home/haypo/prog/python/default/Lib/urllib/request.py", lineno 543
'_open', req)
  File "/home/haypo/prog/python/default/Lib/urllib/request.py", lineno 525
response = self._open(req, data)
  File "/home/haypo/prog/python/default/Lib/urllib/request.py", lineno 222
return opener.open(url, data, timeout)
  File "/home/haypo/prog/python/default/Lib/test/test_urllib2_localnet.py", 
lineno 595
urllib.request.urlopen(req)
  (...)
---

--
components: Tests
messages: 262258
nosy: haypo, martin.panter
priority: normal
severity: normal
status: open
title: Fix ResourceWarning warnings in test_urllib2_localnet
type: resource usage
versions: Python 3.6

___
Python tracker 

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



[issue26620] Fix ResourceWarning warnings in test_urllib2_localnet

2016-03-23 Thread STINNER Victor

Changes by STINNER Victor :


--
keywords: +patch
Added file: http://bugs.python.org/file42257/test_urllib2_localnet.patch

___
Python tracker 

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



[issue26619] 3.5.1 install fails on Windows Server 2008 R2 64-bit

2016-03-23 Thread Steve Morris

New submission from Steve Morris:

Setup fails with "Windows 7 Service Pack 1 required"

--
components: Installation
files: Python 3.5.1 (64-bit)_20160323125008.log
messages: 262257
nosy: sdmorris
priority: normal
severity: normal
status: open
title: 3.5.1 install fails on Windows Server 2008 R2 64-bit
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file42256/Python 3.5.1 
(64-bit)_20160323125008.log

___
Python tracker 

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



[issue26618] _overlapped extension module of asyncio uses deprecated WSAStringToAddressA() function

2016-03-23 Thread STINNER Victor

New submission from STINNER Victor:

The code should be updated to use WSAStringToAddressW().

https://msdn.microsoft.com/en-us/library/windows/desktop/ms742214%28v=vs.85%29.aspx

Compilation warnings:

20>..\Modules\overlapped.c(980): warning C4996: 'WSAStringToAddressA': Use 
WSAStringToAddressW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to 
disable deprecated API warnings 
[D:\buildarea\3.x.bolen-windows8\build\PCbuild\_overlapped.vcxproj]
20>..\Modules\overlapped.c(991): warning C4996: 'WSAStringToAddressA': Use 
WSAStringToAddressW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to 
disable deprecated API warnings 
[D:\buildarea\3.x.bolen-windows8\build\PCbuild\_overlapped.vcxproj]

--
components: Windows, asyncio
messages: 262256
nosy: gvanrossum, haypo, paul.moore, steve.dower, tim.golden, yselivanov, 
zach.ware
priority: normal
severity: normal
status: open
title: _overlapped extension module of asyncio uses deprecated 
WSAStringToAddressA() function
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



[issue24887] Sqlite3 has no option to provide open flags

2016-03-23 Thread Berker Peksag

Changes by Berker Peksag :


--
dependencies: +Migrate sqlite3 module to _v2 API to enhance performance
stage:  -> needs patch
type:  -> enhancement

___
Python tracker 

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



[issue23848] faulthandler: setup an exception handler on Windows

2016-03-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b2f7bb63377b by Victor Stinner in branch 'default':
Issue #23848: Expose _Py_DumpHexadecimal()
https://hg.python.org/cpython/rev/b2f7bb63377b

New changeset b114dbbe2d31 by Victor Stinner in branch 'default':
faulthandler: add Windows exception handler
https://hg.python.org/cpython/rev/b114dbbe2d31

--
nosy: +python-dev

___
Python tracker 

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



[issue10740] sqlite3 module breaks transactions and potentially corrupts data

2016-03-23 Thread Gerhard Häring

Gerhard Häring added the comment:

Isn't this issue at least partly about the statement parsing code in the sqlite 
module?

I've fixed this upstream a while ago in 
https://github.com/ghaering/pysqlite/commit/94eae5002967a51782f36ce9b7b81bba5b4379db

Could somebody perhaps bring this to the Python repository.

Here's a documentation update that's also required then:
https://github.com/ghaering/pysqlite/commit/cae87ee68613697a5f4947b4a0941f59a28da1b6

--

___
Python tracker 

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



[issue23886] faulthandler_user should use _PyThreadState_Current

2016-03-23 Thread Albert Zeyer

Albert Zeyer added the comment:

PyGILState_GetThisThreadState might not be the same Python thread as 
_PyThreadState_Current, even in the case that both are not NULL. That is 
because SIGUSR1/2 will get delivered to any running thread. In the output by 
faulthandler, I want that it marks the current Python thread correctly, and not 
the current sighandler thread.

--

___
Python tracker 

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



  1   2   >