[issue11736] windows installers ssl module / openssl broken for some sites

2014-06-18 Thread Martin v . Löwis

Changes by Martin v. Löwis mar...@v.loewis.de:


--
resolution:  - out of date
status: open - closed

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



[issue9727] Add callbacks to be invoked when locale changes

2014-06-18 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Closing as won't fix, then.

--
resolution:  - wont fix
status: open - closed

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



[issue21772] platform.uname() not EINTR safe

2014-06-18 Thread Charles-François Natali

Charles-François Natali added the comment:

 I'm surprised that the Python read() method doesn't handle EINTR internally.

 I'm in favor of handling EINTR internally almost everywhere, I mean in the 
 Python modules implemented in the C, not in each call using these C methods. 
 handling EINTR means calling PyErr_CheckSignals() which may raises a Python 
 exception (ex: KeyboardInterrupt).

It's good, we all agree on that.
I think the different EINTR-related reports should be closed as #18885
duplicates.
Then we need a patch for #18885: my idea was to write a pair of macros
similar to Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS that would
handle the retry logic, instead of having to check for EINTR and
calling Py_CheckPendingSignals() everywhere.

--

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



[issue21793] httplib client/server status refactor

2014-06-18 Thread Demian Brecht

Demian Brecht added the comment:

Attached new patch with changes from review and a stab at an update to the docs.

--
Added file: http://bugs.python.org/file35680/refactor_http_status_codes_1.patch

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



[issue11097] MSI: Remove win32com dependency from installer generator

2014-06-18 Thread Martin v . Löwis

Martin v. Löwis added the comment:

There is a high chance that 3.5 might use an entirely different MSI generator, 
possibly based on WiX. If that happens, this issue will be outdated.

--

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



[issue14534] Add method to mark unittest.TestCases as do not run.

2014-06-18 Thread Michael Foord

Michael Foord added the comment:

Zachary: Inheriting from TestCase in your mixin is actually an anti-pattern. 
And yes, most people seem to do it (most people seem to misunderstand how to 
use mixins, which is why I like this approach of having a way of explicitly 
marking base classes).

--

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



[issue10595] Adding a syslog.conf reader in syslog

2014-06-18 Thread Berker Peksag

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


--
versions:  -Python 2.7

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



[issue10524] Patch to add Pardus to supported dists in platform

2014-06-18 Thread Berker Peksag

Berker Peksag added the comment:

Unfortunately, Pardus is dead now. So closing this as out of date.

--
nosy: +berker.peksag
resolution:  - out of date
stage: commit review - resolved
status: open - closed

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



[issue14534] Add method to mark unittest.TestCases as do not run.

2014-06-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Class decorator approach looks less obvious to me. Looking at current standard 
mixing approach I understand what it do and why. But encountering the 
unittest.base_class decorator, I need to look in the documentation and/or 
sources to understand how it works.

IMHO this decorator adds a burden for readers (which needs to learn yet one 
thing) and adds only small benefit for whose writers which use IDE (not me).

--

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



[issue21755] test_importlib.test_locks fails --without-threads

2014-06-18 Thread Berker Peksag

Berker Peksag added the comment:

See also 
http://buildbot.python.org/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/6779/steps/test/logs/stdio

--

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



[issue14534] Add method to mark unittest.TestCases as do not run.

2014-06-18 Thread Michael Foord

Michael Foord added the comment:

To be honest, even though I understand it, I find the mixin pattern hard to 
read. You derive from object, but call methods (the assert methods for example) 
that don't exist in the class (or its inheritance chain).

My experience, with even experienced Python devs, is that they don't *properly* 
understand how to create mixins and they *much prefer* to write base classes 
that derive directly from TestCase. And then you have the problem that this 
issue is intended to resolve (and that we even have in the Python test suite).

--

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



[issue15993] Windows: 3.3.0-rc2.msi: test_buffer fails

2014-06-18 Thread Stefan Krah

Changes by Stefan Krah stefan-use...@bytereef.org:


Added file: http://bugs.python.org/file35681/ull_vctest.diff

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



[issue14534] Add method to mark unittest.TestCases as do not run.

2014-06-18 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

Just want to restate my +1 for Michael's idea.  I'm hit by this all the time 
and it is beautiful and expressive.  It also does not preclude the annoying 
mix-in way of doing it.

--

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



[issue15993] Windows: 3.3.0-rc2.msi: test_buffer fails

2014-06-18 Thread Stefan Krah

Stefan Krah added the comment:

 The two issues were unrelated - the 'invalid filter ID'
 (4611686018427387905 == 0x4000_0001) is the correct
 value but the wrong branch in the switch was taken, leading
 to the error message.

Unfortunately I don't have a Visual Studio setup right now.

It seems to me that at the time the wrong branch is taken, f-id
could be in the registers in the wrong order (same as in msg170985),
but when the error message is printed, the value is read from
memory.  This is just a guess of course.


As Martin, I'm uncomfortable that the memoryview issue no longer
appears, but this one still does.


I've attached an alternative version of PyLong_AsUnsignedLongLong()
that is just intended for testing the compiler.


If the optimizer does whole progam optimization, it might choke
on _PyLong_AsByteArray().

--

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



[issue14534] Add method to mark unittest.TestCases as do not run.

2014-06-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Note that we have to use mixin approach in the Python test suite to avoid 
discrepancies and merge conflicts between different versions.

--

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



[issue20319] concurrent.futures.wait() can block forever even if Futures have completed

2014-06-18 Thread Glenn Langford

Changes by Glenn Langford glenn.langf...@gmail.com:


--
nosy:  -glangford

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



[issue20319] concurrent.futures.wait() can block forever even if Futures have completed

2014-06-18 Thread Sebastian Kreft

Sebastian Kreft added the comment:

@glangford: Is that really your recommendation, to switch to celery? Python 
3.4.1 should be production quality and issues like this should be addressed.

Note that I've successfully run millions of tasks using the same method, the 
only difference being that in that case the tasks weren't launching 
subprocesses. So I think that may be a starting point for debugging.

--

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



[issue11191] test_search_cpp error on AIX (with xlc)

2014-06-18 Thread Sébastien Sablé

Sébastien Sablé added the comment:

I don't have any AIX environment to try to reproduce the issue, so feel free to 
close it.

--

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



[issue21801] inspect.signature doesn't always return a signature

2014-06-18 Thread Claudiu Popa

New submission from Claudiu Popa:

Hello. I noticed the following behaviour while working with xmlrpc proxy 
methods.

 import inspect, xmlrpc.client
 proxy = xmlrpc.client.ServerProxy('http://localhost:8000')
 proxy.mul
xmlrpc.client._Method object at 0x03B0C890
 inspect.signature(proxy.mul)
xmlrpc.client._Method object at 0x03B0CC90



Now, according to the documentation, inspect.signature should return a 
signature or fail, but in this case it returns the actual object, which is 
misleading at least. This happens because _Method implements a proxy 
__getattr__, any accessed attribute becoming again a _Method. At the same time, 
inspect.signature happily uses 

try:
   obj.__signature__
except AttributeError:
   ...

to obtain the signature, if present.

The attached patch checks if __signature__ is an actual Signature object. I 
searched, but couldn't find any, if __signature__ can be anything, so I hope 
that this approach works.

--
components: Library (Lib)
files: inspect_signature.patch
keywords: patch
messages: 220936
nosy: Claudiu.Popa, yselivanov
priority: normal
severity: normal
status: open
title: inspect.signature doesn't always return a signature
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file35682/inspect_signature.patch

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



[issue16136] Removal of VMS support

2014-06-18 Thread John Malmberg

John Malmberg added the comment:

Most of the issues needed to build python3 properly on VMS involve either bugs 
in the VMS C API that need to be worked around or missing libraries that 
Python3 expects to have.

As none of the Python developers should need to care about this, and these 
issues are common to ports of other VMS projects, I plan to do the following 
unless someone objects:

1. Create a new issue tracker here to document what it takes to attempt build 
the in development branch of Python on VMS, and try keep it up to date with 
significant issues found.

2. Create a mercurial repository on the vms-ports sourceforge site that 
contains the additional VMS specific files that are needed to build the in 
development branch.  I will also create a VMS specific discussion there about 
the more detailed status of the port progress.

3. Where cases are actually found where the issue is in python, such as 
posixmodule.c overriding the configure files to assume fork is present when 
configure detected it was not, a ticket here will be filed.

If someone then shows up inquiring at the status of VMS, then they can be 
pointed at that new ticket.

--

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



[issue14534] Add method to mark unittest.TestCases as do not run.

2014-06-18 Thread R. David Murray

R. David Murray added the comment:

Issue 19645 is an alternative way to solve the problem of calling methods on 
the mixin that don't exist, and has other benefits.

--

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



[issue11129] logging: allow multiple entries in qualname config

2014-06-18 Thread Dariusz Suchojad

Dariusz Suchojad added the comment:

Hello friends,

@vinay.sajip - the use case for this feature is actually something I come 
across fairly often.

In an application I have dozens and hundreds of logger instances. However, they 
all fall into one of several loggers.

Most of the instances are obtained through a module-wide logger = 
getLogger(__name__).

Now I have a feature in the application split over a couple of modules, in 
different namespaces:

zato.common.scheduler
zato.server.scheduler

They are independent yet related and it would be most convenient if I could 
list both in qualname - they really should share the logging configuration, at 
no point they should have separate handlers, logging formats, anything.

As an aside, regarding dict configuration - I know you made the comment in 2011 
so it may not represent your current opinion but please keep in mind that 
logging config is something that on production is updated by administrators, 
i.e. whatever the latest trends in software development are, they aren't 
necessarily programmers.

People I work with have no problems with customizing ini-like files but Python 
dicts are an entirely different story, they are simply afraid of doing it - a 
missing apostrophe may mean a couple of hours wasted, for instance.

--
nosy: +dsuch

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



[issue16136] Removal of VMS support

2014-06-18 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

I think this is a good plan. Legacy platforms can me maintained by interested 
parties as a friendly fork.

--

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



[issue20069] Add unit test for os.chown

2014-06-18 Thread Claudiu Popa

Claudiu Popa added the comment:

os.chown is not available on Windows. But maybe pwd can't be built on any Unix 
system, so not using import_module is okay.

= I can not because assertRaisesRegex can not be used with with statement.

Not true (see 
https://docs.python.org/3/library/unittest.html?highlight=assertraisesregex#unittest.TestCase.assertRaisesRegex).

--

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



[issue20069] Add unit test for os.chown

2014-06-18 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Here is the patch based on Claudiu's comment and Serhiy's commit 
(http://hg.python.org/cpython/rev/4b187f5aa960).

Claudiu (Thanks!!!), I can not apply two of your suggestions:
You could use support.import_module here in order to skip the test if pwd 
can't be imported.
= It will skip the entire file if I do that which is bad for Windows.

You could use assertRaisesRegex.
= I can not because assertRaisesRegex can not be used with with statement.

--
Added file: http://bugs.python.org/file35683/add_unit_test_os_chown_v3.patch

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



[issue21798] Allow adding Path or str to Path

2014-06-18 Thread Eric V. Smith

Eric V. Smith added the comment:

I agree with David. And, it already works, but uses '/', not '+':

 b / _name.dat
PosixPath('/tmp/some_base/_name.dat')

-1 to using + to be the equivalent of:

 pathlib.Path(str(b) + _name.dat)
PosixPath('/tmp/some_base_name.dat')

--
nosy: +eric.smith

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



[issue21798] Allow adding Path or str to Path

2014-06-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Indeed, not trying to pretend to act like a string was one of the design points 
of the pathlib module, and the / operator already performs logical path 
joining. I'm therefore closing this issue as rejected.

--
resolution:  - rejected
status: open - closed

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



[issue21802] Reader of BufferedRWPair is not closed if writer's close() fails

2014-06-18 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Current implementation of BufferedRWPair.close() is:

def close(self):
self.writer.close()
self.reader.close()

When self.writer.close() raises an exception, self.reader left non-closed. This 
can cause file description leak unless GC sweep it.

Proposed patch fixes this issue. With applied patch for issue21715 it would be 
a little simpler.

--
components: IO
files: bufferedrwpair_close.patch
keywords: patch
messages: 220945
nosy: benjamin.peterson, pitrou, serhiy.storchaka, stutzbach
priority: normal
severity: normal
stage: patch review
status: open
title: Reader of BufferedRWPair is not closed if writer's close() fails
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file35684/bufferedrwpair_close.patch

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



[issue21722] teach distutils upload to exit with code != 0 when error occurs

2014-06-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thank you Martin. I will take a look soon at the patch.

--

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



[issue21803] Remove macro indirections in complexobject

2014-06-18 Thread Antoine Pitrou

New submission from Antoine Pitrou:

I thought this would make things less confusing to read.

--
components: Interpreter Core
files: complex_macros.patch
keywords: patch
messages: 220947
nosy: mark.dickinson, pitrou
priority: low
severity: normal
stage: patch review
status: open
title: Remove macro indirections in complexobject
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file35685/complex_macros.patch

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



[issue1576313] os.execvp[e] on win32 fails for current directory

2014-06-18 Thread Mark Lawrence

Mark Lawrence added the comment:

I'd intended to write a patch but got confused as msg51241 talks about 
execlp() in msvcrt but execlp is in the os module.  Please advise.

--
nosy: +BreamoreBoy

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



[issue3485] os.path.normcase documentation/behaviour unclear on Mac OS X

2014-06-18 Thread Mark Lawrence

Mark Lawrence added the comment:

Is this or could this be addressed via the new pathlib module?

--
nosy: +BreamoreBoy

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



[issue3485] os.path.normcase documentation/behaviour unclear on Mac OS X

2014-06-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a854d23305de by Ned Deily in branch '3.4':
Issue #3485: remove misleading comment
http://hg.python.org/cpython/rev/a854d23305de

New changeset 3edda677119e by Ned Deily in branch 'default':
Issue #3485: merge from 3.4
http://hg.python.org/cpython/rev/3edda677119e

--
nosy: +python-dev

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



[issue3485] os.path.normcase documentation/behaviour unclear on Mac OS X

2014-06-18 Thread Ned Deily

Ned Deily added the comment:

The misleading TODO comment has been removed.

--
resolution: accepted - fixed
stage:  - resolved
status: open - closed

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



[issue1576313] os.execvp[e] on win32 fails for current directory

2014-06-18 Thread R. David Murray

R. David Murray added the comment:

os.execlp *wraps* the interface of the same name in the platform C library.  On 
Windows, that is execlp in the msvcrt[*].  On Linux, it is usually the execlp 
in glibc.

[*] 'crt' stands for 'C runtime'.

--

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



[issue11129] logging: allow multiple entries in qualname config

2014-06-18 Thread Vinay Sajip

Vinay Sajip added the comment:

 they really should share the logging configuration

Well, that's easy enough to do - although there would be some duplication in 
the .ini file, it is not especially onerous. While I well understand the 
benefits of DRY, I still don't believe this is a very common use case, and 
there are other ways of doing this: for example, using a logger called 
zato.scheduler from both scheduler modules. I know that __name__ for naming 
loggers is a good approach in almost all cases, it's not absolutely mandatory. 
What I don't want to do is to keep adding functionality (which I will then have 
to maintain) to an older mechanism when a newer and better one is available. 
And using dictConfig() doesn't have to mean users/administrators editing Python 
source code by hand - for example, YAML could be used, or JSON. Or, use .ini 
but parse the file in your code and build a dict to pass to dictConfig(). Then 
you can use any schema you want, plus support things like Filters which 
fileConfig() doesn't do.

--

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



[issue21794] stack frame contains name of wrapper method, not that of wrapped method

2014-06-18 Thread Zachary Ware

Zachary Ware added the comment:

I agree with Josh; I don't think there's any bug here.  To confirm, I expanded 
on your example, reproduced below.  Have a look at and play around with this, 
and if you still believe something is wrong, ask on python-list and the folks 
there should be able to help.  If you determine that there really is a bug, 
please reopen the issue.


import functools
import inspect

def lineno():
return inspect.getlineno(inspect.stack()[1][0])

try: # just to make it easy to see code and output together...
with open(__file__) as file: data = file.read()
print(data[:data.rfind(# output:) + 9])
except Exception:
pass

print('#line {}: defining decorator'.format(lineno()))

def decorator(f):
print('#  line {}: decorator called'.format(lineno()))
print('#  line {}: defining inner'.format(lineno()))
@functools.wraps(f)
def inner(arg1, arg2):
print('#line {}: inner called, arg1 {} arg2 {}'.format(lineno(), 
arg1, arg2))
for i, frame in enumerate(inspect.stack()):
print(#  line {}: printed in inner, frame {}, name 
{}.format(lineno(), i, frame[3]))
f(arg1 + 1 , arg2 + 1)

print('#  line {}: printed in decorator, inner.__name__ == 
{}'.format(lineno(),inner.__name__))
print('#  line {}: printed in decorator, f.__name__ == {}'.format(lineno(), 
f.__name__))
return inner

print('#line {}: defining wrapped'.format(lineno()))

@decorator
def wrapped(warg1, warg2):
print('#  line {}: wrapped called, warg1 {} warg2 {}'.format(lineno(), 
warg1, warg2))
print(#  line {}: printed in wrapped, wrapped.__name__ == 
{}.format(lineno(), wrapped.__name__))
stack = inspect.stack()
for i, frame in enumerate(stack):
print(#line {}: printed in wrapped, frame {}, name 
{}.format(lineno(), i, frame[3]))

print('#line {}: Calling wrapped...'.format(lineno()))
wrapped(1,2)

print(#line {}: done.format(lineno()))

# output:

# expected output:
#line 13: defining decorator
#line 29: defining wrapped
#  line 16: decorator called
#  line 17: defining inner
#  line 25: printed in decorator, inner.__name__ == wrapped
#  line 26: printed in decorator, f.__name__ == wrapped
#line 39: Calling wrapped...
#line 20: inner called, arg1 1 arg2 2
#  line 22: printed in inner, frame 0, name inner
#  line 22: printed in inner, frame 1, name module
#  line 33: wrapped called, warg1 2 warg2 3
#  line 34: printed in wrapped, wrapped.__name__ == wrapped
#line 37: printed in wrapped, frame 0, name wrapped
#line 37: printed in wrapped, frame 1, name inner
#line 37: printed in wrapped, frame 2, name module
#line 42: done


--
nosy: +zach.ware
resolution:  - not a bug
stage:  - resolved
status: open - closed

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



[issue10310] signed:1 bitfields rarely make sense

2014-06-18 Thread Berker Peksag

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


--
resolution:  - fixed
stage: patch review - resolved
status: open - closed
versions: +Python 3.5 -Python 2.7, Python 3.1, Python 3.2

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



[issue1410680] Add 'surgical editing' to ConfigParser

2014-06-18 Thread R. David Murray

R. David Murray added the comment:

According to a review done at the PyCon 2014 sprints, comment and blank line 
preservation has not yet been implemented.

--
nosy: +r.david.murray

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



[issue21804] Implement thr UTF8 command (RFC 6856) in poplib.

2014-06-18 Thread Milan Oberkirch

New submission from Milan Oberkirch:

The poplib classes already use Unicode internally (for everything but 
capability names). So to implement the UTF8 part of RFC 6856 we only need to 
enable the user to switch to UTF-8 mode if supported by the server.

--
components: email
files: poputf8.patch
keywords: patch
messages: 220956
nosy: barry, jesstess, pitrou, r.david.murray, zvyn
priority: normal
severity: normal
status: open
title: Implement thr UTF8 command (RFC 6856) in poplib.
versions: Python 3.5
Added file: http://bugs.python.org/file35686/poputf8.patch

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



[issue21804] Implement thr UTF8 command (RFC 6856) in poplib.

2014-06-18 Thread Milan Oberkirch

Changes by Milan Oberkirch milan...@oberkirch.org:


Removed file: http://bugs.python.org/file35686/poputf8.patch

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



[issue21804] Implement thr UTF8 command (RFC 6856) in poplib.

2014-06-18 Thread Milan Oberkirch

Changes by Milan Oberkirch milan...@oberkirch.org:


Added file: http://bugs.python.org/file35687/poputf8.patch

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



[issue21625] help()'s more-mode is frustrating

2014-06-18 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

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



[issue21722] teach distutils upload to exit with code != 0 when error occurs

2014-06-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d86214c98a9c by Antoine Pitrou in branch '3.4':
Issue #21722: The distutils upload command now exits with a non-zero return 
code when uploading fails.
http://hg.python.org/cpython/rev/d86214c98a9c

New changeset 979aaa08c067 by Antoine Pitrou in branch 'default':
Issue #21722: The distutils upload command now exits with a non-zero return 
code when uploading fails.
http://hg.python.org/cpython/rev/979aaa08c067

--
nosy: +python-dev

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



[issue21722] teach distutils upload to exit with code != 0 when error occurs

2014-06-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I've now committed the fix. Thank you for your contribution!

--
resolution:  - fixed
stage:  - resolved
status: open - closed
type:  - behavior
versions: +Python 3.4

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



[issue21722] teach distutils upload to exit with code != 0 when error occurs

2014-06-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cf70f030a744 by Antoine Pitrou in branch '2.7':
Issue #21722: The distutils upload command now exits with a non-zero return 
code when uploading fails.
http://hg.python.org/cpython/rev/cf70f030a744

--

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



[issue21805] Argparse Revert config_file defaults

2014-06-18 Thread d0n

New submission from d0n:

Hi,

first of all I want to thank you (bethard) for your great work and efforts on 
developing argparse which is a great tool of versatile use in mostly all of my 
programs. 
I've faced a specific problem while implementing argparse which I have not been 
able to fix by the functions supplied through argparse or its functions. And 
here we are getting to it:

---
Lets assume I have a configuration file which sets the argparser argument of 
verbose to True. Further we assume I would have done that by reading a 
configuration file into an python-dictionary (maybe via ConfigParser or sth. 
like that) and passing it to the function set_defaults of the class 
ArgumentParser from argparse. 

So far so good - now I have my default set. But now my verbose switch still 
is setting the value for verbose to True (or False) regardless of the actual 
state. So, I do not want to set my value for verbose to True and neither I 
want it to set to False (or None) i want it to be set to the opposite value it 
has till now


{code}

def opposite(bool):
  if bool is True:
return False
  elif bool is False:
return True

from argparse import ArgumentParser
parser = ArgumentParser()
parser.set_defaults(**config_defaults)
parser.add_argument('-V', '--verbose', dest='vrb', action='store_const', 
const=opposite(config_defaults['verbose']), help='switch on/off verbosity')

{/code}


In that case I would be glad to just set my action to 'store_opposite' (or sth. 
like that).

I am sorry if I have missed something here or was misguiding somehow.

Best regards,
d0n

--
components: Extension Modules
messages: 220960
nosy: bethard, d0n
priority: normal
severity: normal
status: open
title: Argparse Revert config_file defaults
type: enhancement
versions: Python 3.5

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