[issue6532] thread.get_ident() should return unsigned value

2015-02-18 Thread STINNER Victor

STINNER Victor added the comment:

 Here is updated patch. Added few tests.

Cool. I sent a review.

--

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



[issue11245] Implementation of IMAP IDLE in imaplib?

2015-02-18 Thread F.

F. added the comment:

Imaplib2 now supports Python 3. Piers and me propose to merge imaplib2 into 
standard library as imaplib.

Excerpt from our conversation:

Piers: ...Thanks for bringing it (this thread) to my attention. I entirely 
agree with your comments.

Me: ...I found the criticism of the threads - a heavy solution? 
counterproductive. Not that I know anything about threads...

Piers: I'm not sure what the whole anti-threads thing was about all those years 
ago since I always loved using them. Maybe early implementations were
slow, or, more likely, early adopters were clumsy (giving threads to
a novice is like giving a blow torch to a baby to paraphrade a quote :-)

--

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



[issue23476] SSL cert verify fail for www.verisign.com

2015-02-18 Thread Laura Creighton

Laura Creighton added the comment:

I have this problem too.

Debian jessie/sid
 Python 2.7.8 (default, Nov 18 2014, 14:57:17)
 Python 3.4.2 (default, Nov 13 2014, 07:01:52)

--
nosy: +lac

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



[issue23478] A list arg with default value inside function got appended each time the function is called

2015-02-18 Thread P Yap

New submission from P Yap:

I have a function (test) with a list variable APP and declared its default as 
an empty list [], while APP is not a global variable, if I execute the same 
function multiple times, each time the APP will get appended.  To workaround 
this problem, I need to do APP.pop() inside the function or explicitly called 
the function with an argument (test([])). del APP or reassign APP=[] inside the 
function does not resolve the problem

same thing happens if the function is defined as an method inside a class.

Here is a little test program for testing:

def test(APP=[]):
if len(APP) == 0:
APP.append('1abc')
print APP=, APP
APP.append('2def')

class test1 (object):
def t1(self, abc=[]):
abc.append('abc')
print abc

if __name__ == '__main__':

print class test
t = test1()
i = 0
while i  3:
t.t1()
i += 1

print Test function::
i = 0
while i  3:
test()
i += 1

Here are the output:

class test
['abc']
['abc', 'abc']
['abc', 'abc', 'abc']

Test function::
APP= ['1abc']
APP= ['1abc', '2def']
APP= ['1abc', '2def', '2def']

--
components: Interpreter Core
messages: 236185
nosy: yappyta
priority: normal
severity: normal
status: open
title: A list arg with default value inside function got appended each time the 
function is called
type: behavior
versions: Python 2.7

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



[issue9913] Misc/SpecialBuilds.txt is out of date

2015-02-18 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Actually, the real improvements came in changeset 67177:01714efdc6cf.  Closing.

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

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



[issue23477] Increase coverage for wsgiref module

2015-02-18 Thread Berker Peksag

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


--
nosy: +berker.peksag
stage:  - patch review
versions: +Python 3.4

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



[issue23478] A list arg with default value inside function got appended each time the function is called

2015-02-18 Thread Benjamin Peterson

Benjamin Peterson added the comment:

http://effbot.org/zone/default-values.htm

--
nosy: +benjamin.peterson
resolution:  - not a bug
status: open - closed

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



[issue5739] Language reference is ambiguous regarding next() method lookup

2015-02-18 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Still true in the current doc
https://docs.python.org/3/reference/datamodel.html#special-method-names
object.__iter__ in listed in 3.3.6. Emulating container types
A listing for __next__ could follow that.

Both iterator special methods are documented in
https://docs.python.org/3/library/stdtypes.html#iterator-types

--

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



[issue22364] Improve some re error messages using regex for hints

2015-02-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch for regex which makes some error messages be the same as in re 
with re_errors_2.patch. You could apply it to regex if new error messages look 
better than old error messages. Otherwise we could change re error messages to 
match regex, or discuss better variants.

--
Added file: http://bugs.python.org/file38171/regex_errors.diff

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



[issue23342] run() - unified high-level interface for subprocess

2015-02-18 Thread R. David Murray

R. David Murray added the comment:

string vs list: see issue 6760 for some background.  Yes, I think it is an API 
bug, but there is no consensus for fixing it (it would require a deprecation 
period).

Jeff: in general your points to do not seem to be apropos to this particular 
proposed enhancement, but are instead addressing other aspects of subprocess 
and should be dealt with in other targeted issues.

--

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



[issue22623] Missing guards for some POSIX functions

2015-02-18 Thread Link Mauve

Changes by Link Mauve b...@linkmauve.fr:


Added file: http://bugs.python.org/file38172/getedig.patch

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



[issue22623] Missing guards for some POSIX functions

2015-02-18 Thread Link Mauve

Changes by Link Mauve b...@linkmauve.fr:


Added file: http://bugs.python.org/file38173/getedig.patch

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



[issue18610] wsgiref.validate expects wsgi.input read to give exactly one arg

2015-02-18 Thread PJ Eby

PJ Eby added the comment:

This area of the spec is different between 333 and  precisely to clarify 
this point, without technically changing conformance requirements.  PEP 333 was 
supposed to require the app to supply an argument, while PEP  was changed 
to encourage the server to allow the app to omit it.

It's an annoying grey area in the spec itself, but not at all a grey area for 
for the validation tool, which is supposed to validate the strictest 
interpretation of the spec.  A conformant server is allowed to not work with a 
missing argument, so it's a bad idea for your app to omit it if you want to run 
on all conformant servers.  (And this is entirely independent of whether it's a 
good idea to read the entire stream in the first place.)

--

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



[issue23400] Inconsistent behaviour of multiprocessing.Queue() if sem_open is not implemented

2015-02-18 Thread Davin Potts

Changes by Davin Potts pyt...@discontinuity.net:


Added file: http://bugs.python.org/file38175/issue23400_py27_improveddocs.patch

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



[issue23479] str.format() breaks object duck typing

2015-02-18 Thread Mahmoud Hashemi

New submission from Mahmoud Hashemi:

While porting some old code, I found some interesting misbehavior in the 
new-style string formatting. When formatting objects which support int and 
float conversion, old-style percent formatting works great, but new-style 
formatting explodes hard.

Here's a basic example:

class MyType(object):
def __init__(self, func):
self.func = func

def __float__(self):
return float(self.func())
 
 
print '%f' % MyType(lambda: 3)
 
# Output (python2 and python3): 3.00
 
 
print '{:f}'.format(MyType(lambda: 3))
 
# Output (python2):
# Traceback (most recent call last):
# File tmp.py, line 28, in module
# print '{:f}'.format(MyType(lambda: 3))
# ValueError: Unknown format code 'f' for object of type 'str'
#
# Output (python3.4):
# Traceback (most recent call last):
# File tmp.py, line 30, in module
# print('{:f}'.format(MyType(lambda: 3)))
# TypeError: non-empty format string passed to object.__format__ 


And the same holds true for int and so forth. I would expect these behaviors to 
be the same between the two formatting styles, and tangentially, expect a more 
python2-like error message for the python 3 case.

--
messages: 236192
nosy: mahmoud
priority: normal
severity: normal
status: open
title: str.format() breaks object duck typing
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

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



[issue23479] str.format() breaks object duck typing

2015-02-18 Thread Mahmoud Hashemi

Changes by Mahmoud Hashemi mahm...@hatnote.com:


--
nosy: +Mark.Williams

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



[issue23400] Inconsistent behaviour of multiprocessing.Queue() if sem_open is not implemented

2015-02-18 Thread Davin Potts

Davin Potts added the comment:

Attaching revised patches with improved phrasing in the changes to the docs.

Thanks goes to Berker for reviewing and providing helpful feedback, especially 
paying close attention to detail in the docs.

--
Added file: 
http://bugs.python.org/file38174/issue23400_py35_and_py34_improveddocs.patch

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



[issue23479] str.format() breaks object duck typing

2015-02-18 Thread Martin Panter

Martin Panter added the comment:

My guess is you could make it work by adding a __format__ method to your custom 
class.

def __format__(self, format_spec):
return format(float(self), format_spec)

--
nosy: +vadmium

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



[issue23479] str.format() breaks object duck typing

2015-02-18 Thread R. David Murray

R. David Murray added the comment:

This is an intentional change.  See issue 7994 for the motivation.  This was 
mentioned in the whatsnew documentation for 3.4.

--
nosy: +r.david.murray
resolution:  - not a bug
stage:  - resolved
status: open - closed

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



[issue23479] str.format() breaks object duck typing

2015-02-18 Thread Eric V. Smith

Eric V. Smith added the comment:

As David says, the change from:
ValueError: Unknown format code 'f' for object of type 'str'
to:
TypeError: non-empty format string passed to object.__format__
is quite intentional.

Let me address the differences between %-formatting and __format__-based 
formatting. In these examples, let's say you're trying to format an object 
o=MyType(whatever).

With your '%f' example, you're saying please convert o to a float, and then 
format and print the result. The %-formatting code knows a priori that the 
type must be converted to a float.

With your {:f} example, you're saying please call o.__format__('f'), and print 
the result. Nowhere is there any logic that says well, f must mean that o 
must be converted to a float. The decision on conversion (if any) is left to 
MyType.__format__, as are all other formatting decisions. You could write 
something like:

class MyType(object):
def __format__(self, fmt):
if fmt.endswith('f'):
return float(self.func()).__format__(fmt)
elif fmt.endswith('d'):
return int(self.func()).__format__(fmt)
else:
return str(self.func()).__format__(fmt)

def __init__(self, func):
self.func = func


print(format(MyType(lambda: 3), '.12f'))   # produces 3.
print(format(MyType(lambda: 3), '05d'))# produces 3
print(format(MyType(lambda: 3), '*^10s'))  # produces 3*

Note that %-formatting only supports a fixed and limited number of types: 
basically int, float, and str. It cannot support new type of objects with their 
own format strings.

With __format__-formatting, every type can specify how it wants to be 
formatted, and can specify its own format language. For example, datetime 
supports a rich formatting language (based on strftime).

--
nosy: +eric.smith

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



[issue23479] str.format() breaks object duck typing

2015-02-18 Thread Mahmoud Hashemi

Mahmoud Hashemi added the comment:

Well, thank you for the prompt and helpful replies everyone. Can't say I didn't 
wish the default behavior were more intuitive, but at least I think I have an 
idea how to work this. Thanks again!

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

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



[issue23479] str.format() breaks object duck typing

2015-02-18 Thread Eric V. Smith

Changes by Eric V. Smith e...@trueblade.com:


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

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



[issue23480] Minor typo

2015-02-18 Thread Martin Panter

Martin Panter added the comment:

It returns a string, and the print statement/function prints the contents of 
that string. Perhaps you are confused between JSON strings, which appear in the 
output, and Python strings, which hold the characters to output.

--
nosy: +vadmium

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



[issue23480] Minor typo

2015-02-18 Thread Zorigt Bazarragchaa

New submission from Zorigt Bazarragchaa:

I found a syntax type in your demo example on 
https://docs.python.org/2/library/json.html

 print json.dumps({c: 0, b: 0, a: 0}, sort_keys=True)
{a: 0, b: 0, c: 0}

The correct return should be a 'str' type not json. Therefore:

 print json.dumps({c: 0, b: 0, a: 0}, sort_keys=True)
'{a: 0, b: 0, c: 0}'

--
components: Demos and Tools
messages: 236195
nosy: zorigt
priority: normal
severity: normal
status: open
title: Minor typo

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



[issue23480] Minor typo

2015-02-18 Thread SilentGhost

SilentGhost added the comment:

If you run the command in your interpreter you'll see that the output is 
correct.

--
assignee:  - docs@python
components: +Documentation -Demos and Tools
nosy: +SilentGhost, docs@python
resolution:  - not a bug
status: open - closed

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



[issue3609] does parse_header really belong in CGI module?

2015-02-18 Thread R. David Murray

R. David Murray added the comment:

We can also add a parser for that format to headerregistry.  Is there an RFC 
that describes it?  (It should probably be a separate issue.)

The new email API will be promoted to stable in 3.5.  Mostly I just need to 
update the docs.

--

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



[issue3609] does parse_header really belong in CGI module?

2015-02-18 Thread Berker Peksag

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


--
nosy: +berker.peksag

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



[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-02-18 Thread R. David Murray

R. David Murray added the comment:

It is possible to break backward compatibility in a feature release if the 
break is fixing a bug.  In this case I think it is in fact doing so, and that 
in fact in the majority of cases the change would either not break existing 
code or would even improve it (by making debugging easier).  However, I have no 
way to prove that.

Often in the cases of compatibility breaks we will do a deprecation of the old 
behavior in a given release and make the change in the next release.  I'm not 
convinced that is necessary (or even possible) here.  It would be nice if we 
could get some data on what the actual impact would be on existing code.  For 
example: how, if at all, would this affect the requests package?  I *can* give 
one data point: in an application I wrote recently the affect would be zero, 
since every place in my application that I catch BadStatusLine I also catch 
ConnectionError.

I would want at least one other committer to sign off on a compatibility break 
before anything got committed.

--

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



[issue21257] Document parse_headers function of http.client

2015-02-18 Thread Demian Brecht

Demian Brecht added the comment:

Left a super minor comment in Rietveld, but otherwise LGTM.

--

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



[issue9913] Misc/SpecialBuilds.txt is out of date

2015-02-18 Thread Mark Lawrence

Mark Lawrence added the comment:

This file has been updated with the most recent revision being r90052.  Can we 
close this as out of date?

--
nosy: +BreamoreBoy

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



[issue17033] RPM spec file has old config_binsuffix value

2015-02-18 Thread Benjamin Peterson

Benjamin Peterson added the comment:

We just removed the spec file.

--
nosy: +benjamin.peterson
resolution:  - out of date
status: open - closed

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



[issue23169] Reflect that PreReq and BuildPreReq are deprecated in the latest RPM

2015-02-18 Thread Benjamin Peterson

Benjamin Peterson added the comment:

We just deleted the spec file.

--
nosy: +benjamin.peterson
resolution:  - out of date
status: open - closed

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



[issue22235] httplib: TypeError with file() object in ssl.py

2015-02-18 Thread R. David Murray

R. David Murray added the comment:

Verification errors that used to be ignored (ie: verification was not done by 
default) are now reported.  That was basically the whole point of 2.7.9.  So 
this is most likely a problem with the site certificate, not python.

As far as I can see there aren't any CPython bugs being reported in this issue, 
so I'm closing it as 3rd party.

--
resolution:  - third party
stage:  - resolved
status: open - closed

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



[issue23473] Allow namedtuple to be JSON encoded as dict

2015-02-18 Thread Eric V. Smith

Eric V. Smith added the comment:

Can you post a code snippet that used to work, but now does not?

--
nosy: +eric.smith

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



[issue6532] thread.get_ident() should return unsigned value

2015-02-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Victor for your review. Here is updated patch.

--
Added file: http://bugs.python.org/file38168/thread_id_unsigned_4.patch

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



[issue23473] Allow namedtuple to be JSON encoded as dict

2015-02-18 Thread Zack

Zack added the comment:

From memory, something along the lines of 

from json import JSONEncoder

class ExtendedJSONEncoder(JSONEncoder):

def _iterencode(self, o, markers=None):
if isinstance(o, tuple) and hasattr(obj, '_fields'):
gen = self._iterencode_dict(o.__dict__, markers)
else:
gen = JSONEncoder._iterencode(self, o, markers)
for chunk in gen:
yield chunk

--

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



[issue5739] Language reference is ambiguous regarding next() method lookup

2015-02-18 Thread Mark Lawrence

Mark Lawrence added the comment:

Thrown up by selecting Random Issue, if nothing else it looks to me as if 
__next__ is missing from and so should be documented in 
https://docs.python.org/3.1/reference/datamodel.html#special-method-names

--
nosy: +BreamoreBoy

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



[issue2211] Cookie.Morsel interface needs update

2015-02-18 Thread Demian Brecht

Demian Brecht added the comment:

The attached patch should cover the implementation/test aspects of this issue. 
I'll work on the documentation next.

--
keywords: +patch
versions: +Python 3.5 -Python 3.2
Added file: http://bugs.python.org/file38170/issue2211.patch

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



[issue2211] Cookie.Morsel interface needs update

2015-02-18 Thread Demian Brecht

Demian Brecht added the comment:

Never mind, Morsel /is/ documented (at least in Docs). I imagine that the OP 
was after more detailed docstrings, but I don't believe they'd add much value.

The patch should be good to go as-is.

--

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



[issue23473] Allow namedtuple to be JSON encoded as dict

2015-02-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is a duplicate of issue12657.

--
nosy: +serhiy.storchaka
resolution:  - duplicate
status: open - closed
superseder:  - Cannot override JSON encoding of basic type subclasses

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



[issue18986] Add a case-insensitive case-preserving dict

2015-02-18 Thread Demian Brecht

Demian Brecht added the comment:

 I will be interested to see those reasons.

+1. Something like what this PEP proposed would be beneficial in a few places 
throughout the library (header and cookie implementations would definitely 
benefit rather than having to deal with buggy normalization themselves). It’s 
unfortunate that this isn’t going to be approved.

--

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



[issue1559298] test_popen fails on Windows if installed to Program Files

2015-02-18 Thread Mark Lawrence

Mark Lawrence added the comment:

Do we leave this open or close it as there is a known work around for 2.7?

--
versions:  -Python 3.1, Python 3.2

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



[issue23477] Increase coverage for wsgiref module

2015-02-18 Thread Alex Shkop

New submission from Alex Shkop:

Added test for wssgiref.simple_server to check that environ argument contains 
correct headers, query string and path.

This code wasn't covered in tests previously.

--
components: Tests
files: wsgiref_test_environ.patch
keywords: patch
messages: 236176
nosy: ashkop
priority: normal
severity: normal
status: open
title: Increase coverage for wsgiref module
versions: Python 3.5
Added file: http://bugs.python.org/file38169/wsgiref_test_environ.patch

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



[issue1559298] test_popen fails on Windows if installed to Program Files

2015-02-18 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +steve.dower

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



[issue23354] Loading 2 GiLOC file which raises exception causes wrong traceback

2015-02-18 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy: +haypo

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



[issue3609] does parse_header really belong in CGI module?

2015-02-18 Thread R. David Murray

R. David Murray added the comment:

There is no reason to move this to the email package.  email can already parse 
headers just fine.  It might be useful to have a parse_header utility method, 
though, since currently the easiest way to parse a single header using the 
email package is:

   from email.policy import HTTP
   from email.parser import Parser
   m = Parser(policy=HTTP).parsestr('Content-Type: text/plain; 
filename=foo\n\n')
   m['Content-Type'].content_type
  'text/plain'
   m['Content-type'].params
  mappingproxy({'filename': 'foo'})

Which isn't as straightforward as the parse_header API when you are only 
interested in a single header.

It might also be useful to have the email MIME headers grow a 'value' attribute 
to return whatever the value is (in this case, text/plain), so it can be 
accessed regardless of the header type.

I would make parse_header be a utility method of the policy, I think.  Then the 
email API would be:

  from email.policy import HTTP
  h = HTTP.parse_header('Content-Type: ...')
  value, params = h.value, h.params

It would then be trivial to implement the backward compatibility shim for the 
CGI parse_header method using the above.

--
stage: patch review - needs patch
versions: +Python 3.5 -Python 3.4

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



[issue11717] conflicting definition of ssize_t in pyconfig.h

2015-02-18 Thread Steve Dower

Steve Dower added the comment:

Patch needs updating, and I'd expect pyport.h to start by checking if 
HAVE_PY_SSIZE_T is defined. Otherwise, we may try to re-typedef Py_ssize_t.

--

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



[issue23481] SSL module should not offer RC4 based cipher suites for clients by default

2015-02-18 Thread Alex Gaynor

New submission from Alex Gaynor:

In addition to the security concerns, it is now a violation of RFC7465 to offer 
a cipher suite with RC4 in a ClientHello: https://tools.ietf.org/html/rfc7465

--
components: Library (Lib)
files: rc4.diff
keywords: patch
messages: 236202
nosy: alex, christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou
priority: normal
severity: normal
status: open
title: SSL module should not offer RC4 based cipher suites for clients by 
default
versions: Python 2.7, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file38176/rc4.diff

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



[issue23482] sqlite3_d.dll is not included in installer

2015-02-18 Thread Steve Dower

New submission from Steve Dower:

This file is necessary for _sqlite3 to be importable with the debug binaries.

--
assignee: steve.dower
components: Installation, Windows
messages: 236204
nosy: steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: sqlite3_d.dll is not included in installer
type: behavior
versions: Python 3.5

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



[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2015-02-18 Thread Ben Hoyt

Ben Hoyt added the comment:

BTW, I replied to Victor privately, but for the thread: no worries, and apology 
accepted! :-) I'm working on updating my C patch with his feedback, and will 
update this issue hopefully in the next few days.

--

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



[issue23152] fstat64 required on Windows

2015-02-18 Thread Steve Dower

Steve Dower added the comment:

Last call before I let the buildbots be the reviewers :)

--
priority: normal - critical

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



[issue3609] does parse_header really belong in CGI module?

2015-02-18 Thread Martin Panter

Martin Panter added the comment:

HTTP policy sounds as good a place as any, especially if/when it is blessed as 
a stable API.

Another related function is the undocumented 
http.cookiejar.split_header_words(), which seems more flexible than 
cgi.parse_headers(). It accepts multiple and comma-separated header values, 
splits on spaces as well as semicolons, and retains parameters without equal 
signs. Currently I have code that abuses the Message.get_params() and 
get_param() methods, which could probably benefit from split_header_words():

# Parse RTSP Transport headers like
# Transport: RTP/AVP/TCP;interleaved=0-1, RTP/AVP;unicast;client_port=5004
for value in header_list(self.headers, Transport):  # Splits at commas
header = email.message.Message()
# Default get_params() header is Content-Type
header[Content-Type] = value
[transport, _] = header.get_params()[0]  # Gets the RTP/AVP part

mode = header.get_param(mode, PLAY)
channel = header.get_param(interleaved)
if header.get_param(unicast) is not None:
port = header.get_param(client_port)
...

--

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



[issue22364] Improve some re error messages using regex for hints

2015-02-18 Thread Matthew Barnett

Matthew Barnett added the comment:

Some error messages use the indefinite article:

expected a bytes-like object, %.200s found
cannot use a bytes pattern on a string-like object
cannot use a string pattern on a bytes-like object

but others don't:

expected string instance, %.200s found
expected str instance, %.200s found

Messages tend to be abbreviated, so I think that it would be better to just 
omit the article.

I don't think that the error message bad repeat interval is an improvement 
(Why is it bad? What is an interval?). I think that saying that the min is 
greater than the max is clearer.

--

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



[issue2211] Cookie.Morsel interface needs update

2015-02-18 Thread Berker Peksag

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


--
nosy: +berker.peksag
stage: test needed - patch review

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



[issue1559298] test_popen fails on Windows if installed to Program Files

2015-02-18 Thread Steve Dower

Steve Dower added the comment:

The docs are pretty clear about using Popen instead of os.popen, and people 
using popen have likely worked around it already, so we're more likely to break 
them by changing it now.

I vote to close.

--

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



[issue23481] SSL module should not offer RC4 based cipher suites for clients by default

2015-02-18 Thread Ian Cordasco

Ian Cordasco added the comment:

It's clearly no longer acceptable to include RC4 when the IETF has felt it 
necessary to publish an RFC prohibiting its usage.

--
nosy: +icordasc

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



[issue23482] sqlite3_d.dll is not included in installer

2015-02-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 70a55b2dee71 by Steve Dower in branch 'default':
Closes #23482: sqlite3_d.dll is not included in installer
https://hg.python.org/cpython/rev/70a55b2dee71

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

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