[issue9338] argparse optionals with nargs='?', '*' or '+' can't be followed by positionals

2014-04-22 Thread paul j3

paul j3 added the comment:

http://bugs.python.org/issue15112
breaks one test that I added to issue

+class TestPositionalsAfterOptionalsPlus(ParserTestCase):
+Tests specifying a positional that follows an arg with nargs=+
+http://bugs.python.org/issue9338#msg111270
+prototypical problem
+
+argument_signatures = [
+Sig('-w'),
+Sig('-x', nargs='+'),
+Sig('y', type=int),
+Sig('z', nargs='*', type=int)]
+failures = ['1 -x 2 3 -w 4 5 6' # error: unrecognized arguments: 5 6
+# z consumed in 1st argument group '1'
+]

This no longer fails.  Due to 15112, z=[5,6].  That is, it is no longer 
consumed by the 1st argument group.

--

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



[issue6305] islice doesn't accept large stop values

2014-04-22 Thread Raymond Hettinger

Raymond Hettinger added the comment:

The first patch was cleaner.  I don't think it is necessary to start-fast and 
switch-to-slow in the case where not all of the arguments are in the normal 
range.

--

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



[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

2014-04-22 Thread Raymond Hettinger

Raymond Hettinger added the comment:

The ref-counts in the islice_reduce code don't look to be correct at first 
glance.

--
assignee:  - rhettinger

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



[issue21320] dict() allows keyword expansion with integer keys, e.g. dict(**{5:'v'})

2014-04-22 Thread Raymond Hettinger

Raymond Hettinger added the comment:

IIRC, we've only created -3 warnings for things that would be incorrectly 
accepted by Python 3 (such as floor division using /).   

I don't think that applies here and isn't worth monkeying with Py2.7.  It goes 
in the harmless nuisance category, something that affects almost no one.

--
nosy: +rhettinger

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



[issue21326] asyncio: request clearer error message when event loop closed

2014-04-22 Thread Mark Dickinson

New submission from Mark Dickinson:

In the new asyncio library, it's easy for newbies (like me) to accidentally try 
to run a coroutine on a closed event loop.  Doing so leads to a rather 
inscrutable exception and traceback:

 loop.run_until_complete(compute())
Traceback (most recent call last):
  File stdin, line 1, in module
  File 
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/asyncio/base_events.py,
 line 203, in run_until_complete
self.run_forever()
  File 
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/asyncio/base_events.py,
 line 184, in run_forever
self._run_once()
  File 
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/asyncio/base_events.py,
 line 778, in _run_once
event_list = self._selector.select(timeout)
AttributeError: 'NoneType' object has no attribute 'select'

Is it possible to replace this with something clearer?  For example, something 
like: RuntimeError(Can't schedule coroutine on closed event loop.)


Here's the full code snippet:


Python 3.4.0 (default, Mar 25 2014, 11:07:05) 
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.38)] on darwin
Type help, copyright, credits or license for more information.
 import asyncio
 @asyncio.coroutine
... def compute():
... print(Starting computation)
... yield from asyncio.sleep(2.0)
... print(Complete)
... 
 loop = asyncio.get_event_loop()
 loop.run_until_complete(compute())
Starting computation
Complete
 loop.close()  # whoops
 # some time later
... 
 loop = asyncio.get_event_loop()
 loop.run_until_complete(compute())
Traceback (most recent call last):
  File stdin, line 1, in module
  File 
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/asyncio/base_events.py,
 line 203, in run_until_complete
self.run_forever()
  File 
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/asyncio/base_events.py,
 line 184, in run_forever
self._run_once()
  File 
/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/asyncio/base_events.py,
 line 778, in _run_once
event_list = self._selector.select(timeout)
AttributeError: 'NoneType' object has no attribute 'select'

--
components: Library (Lib)
messages: 216994
nosy: gvanrossum, mark.dickinson
priority: normal
severity: normal
stage: needs patch
status: open
title: asyncio: request clearer error message when event loop closed
type: enhancement
versions: Python 3.5

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



[issue21322] Pathlib .owner() and .group() methods fail on broken links

2014-04-22 Thread Iñigo Serna

Iñigo Serna added the comment:

Mainly, 2 reasons:

- It can make programs crash *unexpectedly*

- Pathlib should provide a complete and uniform API for dealing with all types 
of files. If not, users would need to use Pathlib for some kind of files and go 
to os and os.path for others, then why the reason to use Pathlib?

--

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



[issue21322] Pathlib .owner() and .group() methods fail on broken links

2014-04-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 - It can make programs crash *unexpectedly*

A broken link is an error, so it's normal to have an exception raised
here. An exception can always be caught if you were expecting the error.

 - Pathlib should provide a complete and uniform API for dealing with
 all types of files. If not, users would need to use Pathlib for some
 kind of files and go to os and os.path for others, then why the reason
 to use Pathlib?

I sympathize with this. But you can already use Path.lstat() and inspect
the st_uid and st_gid fields if you are really interested in the link's
owner and group (rather than the target's).

The fact that most Path methods dereference symlinks reflects the
semantics of other common filesystem calls (such as those in the os
module, or the underlying functions of the POSIX API).

--

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



[issue18967] Find a less conflict prone approach to Misc/NEWS

2014-04-22 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

FWIW: I don't think we need to manage the news entries in the NEWS
file. Instead, we could simply add a field to the bug tracker
called news entry and populate that as necessary.

During release, this information can then be used to create a
NEWS file per release. This file would not be touched by anyone
other then the release manager.

As a result, there would not longer be any merge conflicts, and
the news entries can still be changed before the release
if necessary, and, of course, the generated NEWS file can also
be edited as the release manager sees fit.

Tickets which do not need a news entry simply leave the news entry
field blank.

We really don't need a file system database for these things.

(PS: eGenix has been using such a system internally for several
years and it works great.)

--

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



[issue21256] Sort keyword arguments in mock _format_call_signature

2014-04-22 Thread Michael Foord

Michael Foord added the comment:

I agree with Antoine's review comments. With those changes in place, ok to 
commit.

--

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



[issue21327] socket.type value changes after using settimeout()

2014-04-22 Thread Giampaolo Rodola'

New submission from Giampaolo Rodola':

 s = socket.socket()
 s.type
SocketType.SOCK_STREAM: 1
 s.settimeout(2)
 s.type
2049
 

I can reproduce this with Python 3.5, 3.4 and 3.3.
2.7 is not affected.

--
messages: 216999
nosy: giampaolo.rodola
priority: normal
severity: normal
status: open
title: socket.type value changes after using settimeout()
versions: Python 3.3, Python 3.4, Python 3.5

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



[issue21327] socket.type value changes after using settimeout()

2014-04-22 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

It seems this was introduced in issue 7523 / revision 12442ac3f7dd.

--
nosy: +pitrou

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



[issue21327] socket.type value changes after using settimeout()

2014-04-22 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


--
Removed message: http://bugs.python.org/msg217001

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



[issue21327] socket.type value changes after using settimeout()

2014-04-22 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

Generally speaking I think it's fine to have this behavior only if the socket 
object is instantiated like this:

 s = socket.socket(type=socket.SOCK_STREAM | socket.SOCK_NONBLOCK)
 s.type
2049

...but when it comes to using setblocking() I would not expect that to happen 
(it's not cross platform).
Sounds reasonable?

--
nosy: +BreamoreBoy, exarkun, lekma, nvetoshkin, r.david.murray

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



[issue21327] socket.type value changes after using settimeout()

2014-04-22 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

Generally speaking I think it's fine to have this behavior only if the socket 
object is instantiated like this:

 s = socket.socket(type=socket.SOCK_STREAM | socket.SOCK_NONBLOCK)
 s.type
2049

...but when it comes to using settimeout() I would not expect that to happen 
(it's not cross platform).
Sounds reasonable?

--

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



[issue6305] islice doesn't accept large stop values

2014-04-22 Thread Alok Singhal

Alok Singhal added the comment:

OK.  Here is the first patch with a couple of bug fixes for slow mode.

--
Added file: http://bugs.python.org/file34999/islice_large_values-3.patch

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



[issue20147] multiprocessing.Queue.get() raises queue.Empty exception if even if an item is available

2014-04-22 Thread Alexei Mozhaev

Alexei Mozhaev added the comment:

We have a similar bug with Queue.get().

Queue.get(False) raises an exception Queue.Empty in the case when the queue is 
actually not empty!

An example of the code is attached and is listed below just in case:

--
import multiprocessing
import Queue

class TestWorker(multiprocessing.Process):

def __init__(self, inQueue):
multiprocessing.Process.__init__(self)
self.inQueue = inQueue

def run(self):
while True:
try:
task = self.inQueue.get(False)
except Queue.Empty:
# I suppose that Queue.Empty exception is about empty queue 
# and self.inQueue.empty() must be true in this case
# try to check it using assert
assert self.inQueue.empty()
break


def runTest():
queue = multiprocessing.Queue()
for _ in xrange(10**5):
queue.put(1)
workers = [TestWorker(queue) for _ in xrange(4)]
map(lambda w: w.start(), workers)
map(lambda w: w.join(), workers)


if __name__ == __main__:
runTest()
--

--
nosy: +Alexei.Mozhaev
versions:  -Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file35000/py_mult_queue_bug.py

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



[issue21328] Resize doesn't change reported length on create_string_buffer()

2014-04-22 Thread Dustin Oprea

New submission from Dustin Oprea:

The memory is resized, but the value returned by len() doesn't change:

 b = ctypes.create_string_buffer(23)
 len(b)
23
 b.raw = '0' * 23
 b.raw = '0' * 24
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: string too long

 ctypes.resize(b, 28)
 len(b)
23
 b.raw = '0' * 28
 b.raw = '0' * 29
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: string too long

--
components: ctypes
messages: 217005
nosy: Dustin.Oprea
priority: normal
severity: normal
status: open
title: Resize doesn't change reported length on create_string_buffer()
versions: Python 2.7

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



[issue21255] Attaching a PropertyMock records calls

2014-04-22 Thread Michael Foord

Michael Foord added the comment:

Not sure, but I guess it would be easy to find out. It will need some digging 
into to find out where the actual bug is. It shouldn't be hard to find though.

--

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



[issue21326] asyncio: request clearer error message when event loop closed

2014-04-22 Thread Guido van Rossum

Guido van Rossum added the comment:

Hm, I've never hear from someone who did this before. It might be easy to fix, 
but it would be ugly too (every EventLoop method would have to check this), and 
not very useful (you'll only make this mistake once in your life).

How much time did you waste debugging this?

Maybe we can just change repr(loop) to make it clear that it's closed?

--
priority: normal - low

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



[issue21326] asyncio: request clearer error message when event loop closed

2014-04-22 Thread Mark Dickinson

Mark Dickinson added the comment:

 Maybe we can just change repr(loop) to make it clear that it's closed?

That sounds good to me.

--

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



[issue21326] asyncio: request clearer error message when event loop closed

2014-04-22 Thread Mark Dickinson

Mark Dickinson added the comment:

 How much time did you waste debugging this?

Not much: less than 5 minutes.  While I *probably* won't make this mistake 
again (though I'm not going to make any promises on that front), it would be 
nice to prevent other people from doing so.

More info: I got to the issue by randomly pasting examples from the asyncio 
docs, one of which had a `.close` call in, without taking the time to read and 
understand those docs properly first - I was keen to get to the coroutine part 
of it and didn't want to spend time on the event loop details.  Without having 
thought about it, I wasn't expecting the result of `get_event_loop` to be a 
singleton; once I figured that bit out it was clear what was going on.

So yes, stupidity on my part.  I'd like to bet that I won't be the only person 
who runs into this, though.

--

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



[issue21138] mimetypes.MimeType UnicodeDecodeError

2014-04-22 Thread Tim Golden

Tim Golden added the comment:

This looks like a duplicate of issue9291; could you test the latest patch over 
there, please?

--
assignee:  - tim.golden
nosy: +tim.golden

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



[issue21325] Missing Generic EXIF library for images in the standard library

2014-04-22 Thread Brett Cannon

Brett Cannon added the comment:

A guide on how to get a module added to the stdlib can be found at 
https://docs.python.org/devguide/stdlibchanges.html#adding-a-new-module , 
although I think an EXIF module is going to be too niche to ever be accepted.

--
nosy: +brett.cannon

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



[issue21329] configparser can't parse MySQL style config

2014-04-22 Thread Daniël van Eeden

New submission from Daniël van Eeden:

With Python 2.7 the ConfigParser was enriched with the allow_no_value option 
which resulted in a much more usable configparser for MySQL configs.

It can now parse configs like this:
[mysqld]
log_bin
innodb_file_per_table
innodb_io_capacity=800

However it can't parse this config:
[mysqld]
log_bin
innodb_file_per_table
innodb_io_capacity=800
replicate-do-db=test1
replicate-do-db=test2

A comma separated config might have been better, but that's not the case with 
many MySQL config (and probably doesn't even work for this option).

From 
http://dev.mysql.com/doc/refman/5.6/en/replication-options-slave.html#option_mysqld_replicate-do-db
To specify more than one database, use this option multiple times, once for 
each database


The dict/orderedDict which is used by configparser doesn't easlily allow to 
store a config like this.

The MySQL config file is used as an example in the documentation:
https://docs.python.org/3/library/configparser.html#customizing-parser-behaviour

This could be solved by having a list of values if the key exists more than 
once.

Python 3 improves this a bit by giving a DuplicateOptionError by default.

--
components: Library (Lib)
files: demo.py
messages: 217012
nosy: dveeden
priority: normal
severity: normal
status: open
title: configparser can't parse MySQL style config
versions: Python 3.4
Added file: http://bugs.python.org/file35001/demo.py

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



[issue21303] Python 2.7 Spinbox Format Behaves Differently On Windows Versus Linux

2014-04-22 Thread Zachary Ware

Zachary Ware added the comment:

8.5.15 sounds good to me; here's the patch to 2.7 once the 8.5.15 sources are 
on svn.python.org as tcl-8.5.15.0 and tk-8.5.15.0, no modifications necessary.

--
keywords: +patch
Added file: http://bugs.python.org/file35002/issue21303-2.7-tcl-upgrade.diff

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



[issue21328] Resize doesn't change reported length on create_string_buffer()

2014-04-22 Thread Berker Peksag

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


--
nosy: +meador.inge

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



[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

2014-04-22 Thread Anton Afanasyev

Anton Afanasyev added the comment:

Hi Raymond,
do you mean allocation exceptions handling should be more accurate?
Attaching fixed version for 3.4 branch.

--
Added file: http://bugs.python.org/file35003/issue21321_3.4_8c8315bac6a8_2.diff

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



[issue20147] multiprocessing.Queue.get() raises queue.Empty exception if even if an item is available

2014-04-22 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +sbt

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



[issue17552] socket.sendfile()

2014-04-22 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

Yet another patch fixing some problems on Windows.
Hopefully this should be the last one as for what concerns the POSIX systems. 
As such I would kindly ask for a review and/or further suggestions.

--
Added file: http://bugs.python.org/file35004/sendfile5.patch

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



[issue21329] configparser can't parse MySQL style config

2014-04-22 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +lukasz.langa

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



[issue21330] Typo in Unicode HOWTO documentation

2014-04-22 Thread Jayanth Raman

New submission from Jayanth Raman:

It should be 128 such characters in the following sentence:

For example, you can’t fit both the accented characters used in Western Europe 
and the Cyrillic alphabet used for Russian into the 128-255 range because there 
are more than 127 such characters.

--
assignee: docs@python
components: Documentation
messages: 217016
nosy: docs@python, jayanth
priority: normal
severity: normal
status: open
title: Typo in Unicode HOWTO documentation
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5

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



[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express

2014-04-22 Thread Mike Mazurek

Mike Mazurek added the comment:

In building pycrypto for python 3.4 I applied patch msvccompiler9_33.diff. 
After applying the patch there is an unassigned variable: KEY_BASE on line 67 
of the patched file. 
After setting
KEY_BASE = Software\\Wow6432Node\\Microsoft\\
before its first use I was able to successfully build pycrypto.

--
nosy: +mike.mazurek

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



[issue6721] Locks in python standard library should be sanitized on fork

2014-04-22 Thread Forest Bond

Changes by Forest Bond for...@alittletooquiet.net:


--
nosy: +forest_atq

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



[issue20565] Update Tcl/Tk version for buildbots

2014-04-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2b8d9276ad5b by Zachary Ware in branch '2.7':
Issue #21303, #20565: Updated the version of Tcl/Tk used on Windows
http://hg.python.org/cpython/rev/2b8d9276ad5b

--
nosy: +python-dev

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



[issue21303] Python 2.7 Spinbox Format Behaves Differently On Windows Versus Linux

2014-04-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2b8d9276ad5b by Zachary Ware in branch '2.7':
Issue #21303, #20565: Updated the version of Tcl/Tk used on Windows
http://hg.python.org/cpython/rev/2b8d9276ad5b

--
nosy: +python-dev

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



[issue21327] socket.type value changes after using settimeout()

2014-04-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I think distinguishing between the two situations would make the code yet more 
complicated (and fragile). It's a bit unfortunate that the `type` attribute has 
become a kitchen sink for disparate pieces of configuration.

The fact that you are the first to complain though it was introduced in 3.2 
does not make it very compelling to change the current behaviour, IMHO.

--
nosy: +haypo, neologix

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



[issue21331] Reversing an encoding with unicode-escape returns a different result

2014-04-22 Thread Sworddragon

New submission from Sworddragon:

I have made some tests with encoding/decoding in conjunction with 
unicode-escape and got some strange results:

 print('ä')
ä
 print('ä'.encode('utf-8'))
b'\xc3\xa4'
 print('ä'.encode('utf-8').decode('unicode-escape'))
ä
 print('ä'.encode('utf-8').decode('unicode-escape').encode('unicode-escape'))
b'\\xc3\\xa4'
 print('ä'.encode('utf-8').decode('unicode-escape').encode('unicode-escape').decode('utf-8'))
\xc3\xa4


Shouldn't .decode('unicode-escape').encode('unicode-escape') nullify itself and 
so 'ä'.encode('utf-8').decode('unicode-escape').encode('unicode-escape') 
return the same result as 'ä'.encode('utf-8')?

--
components: Unicode
messages: 217021
nosy: Sworddragon, ezio.melotti, haypo
priority: normal
severity: normal
status: open
title: Reversing an encoding with unicode-escape returns a different result
type: behavior
versions: Python 3.4

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



[issue21303] Python 2.7 Spinbox Format Behaves Differently On Windows Versus Linux

2014-04-22 Thread Zachary Ware

Zachary Ware added the comment:

Done.  Michael, thanks for the report!

--
assignee:  - zach.ware
resolution:  - fixed
stage:  - resolved
status: open - closed

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



[issue20565] Update Tcl/Tk version for buildbots

2014-04-22 Thread Zachary Ware

Zachary Ware added the comment:

2.7 is now updated to 8.5.15, 3.3 is in security mode, and 3.4+ are on 8.6.1.

--
nosy: +zach.ware
resolution:  - fixed
stage:  - resolved
status: open - closed
versions: +Python 3.5 -Python 3.3

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



[issue21331] Reversing an encoding with unicode-escape returns a different result

2014-04-22 Thread R. David Murray

R. David Murray added the comment:

No.  x.encode('unicode-escape').decode('unicode-escape') should return the same 
result, and it does.

The bug, I think, is that bytes.decode('unicode-escape') is not objecting to 
the non-ascii characters.  It appears to be treating them as latin1, and that 
strikes me as broken.

--
nosy: +lemburg, ncoghlan, r.david.murray

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



[issue20560] tkFileFilter.c: ostypeCount not initialized?

2014-04-22 Thread Zachary Ware

Zachary Ware added the comment:

Terry, could you try this again with a fresh build of Tcl/Tk 8.5.15?  Update 
your 2.7 to 2b8d9276ad5b or beyond and run Tools/buildbot/external.bat again, 
it should take care of it.

--
nosy: +zach.ware

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



[issue21306] PEP 466: backport hmac.compare_digest

2014-04-22 Thread Alex Gaynor

Alex Gaynor added the comment:

Design question here: compare_digest on Python 3 supports comparing str (text) 
objects, if they're both ascii-only. This feature is provided, primarily, so 
you can compare hexdigests or similar.

Should the Python 2 version support comparing unicodes? Arguments in favor: 
some amount of consistency. Against: it's not necessary because hexdigest is 
still a str (binary), further it's not actually posisble to replicate the ascii 
only semantic.

--

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



[issue21306] PEP 466: backport hmac.compare_digest

2014-04-22 Thread Donald Stufft

Donald Stufft added the comment:

try:
data = data.encode(ascii)
except UnicodeEncodeError:
raise TypeError(comparing unicode with non-ASCII characters is not 
supported)

?

--

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



[issue21306] PEP 466: backport hmac.compare_digest

2014-04-22 Thread Nick Coghlan

Nick Coghlan added the comment:

8-bit str only makes more sense to me. The wishy-washiness of some APIs in
Py3 is mostly to work around porting issues where stuff that should have
become bytes was left as str.

--

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



[issue21306] PEP 466: backport hmac.compare_digest

2014-04-22 Thread Alex Gaynor

Alex Gaynor added the comment:

encode(ascii) has data dependent branches, so it's to be avoided.

--

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



[issue21306] PEP 466: backport hmac.compare_digest

2014-04-22 Thread Alex Gaynor

Alex Gaynor added the comment:

Thanks Nick. I'll get a patch up for str (bytes) only this afternoon.

--

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



[issue21306] PEP 466: backport hmac.compare_digest

2014-04-22 Thread Donald Stufft

Donald Stufft added the comment:

I'm not sure that the timing leakage in an encode is actually something to be 
worried about. I'm not sure what secret information would be getting leaked in 
a way that you could determine it by examining the timing.

However I think the bigger thing is if I'm an app developer and I attempt to 
pass a unicode to hmac.compare_digest() and it tells me it only accepts bytes, 
the first thing I'm going to do is is .encode() it myself before I pass it in.

IOW hmac.compare_digest could avoid the encode, but it's just pushing that back 
up to the user of hmac.compare_digest, who might possibly have a byte string 
laying around that they won't have to do the encode/decode dance on (although 
if they have a unicode they have already done it at least once), or they only 
have a unicode available to them then they'll be forced to do the encode 
themselves.

--

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



[issue21327] socket.type value changes after using settimeout()

2014-04-22 Thread STINNER Victor

STINNER Victor added the comment:

I would prefer to add something to get the type without SOCK_NONBLOCK nor
SOCK_CLOEXEC. So new feature can only be added to Python 3.5. For older
Python versions, you can to filter manually, which is difficult because you
have yo check if SOCK_NONBLOCK and/or SOCK_CLOEXEC are available. You have
the same issue in the C language.

Anyway, all sockets are now created with SOCK_CLOEXEC since Python 3.4
because of the PEP 446 (cloexec).

We can add a new .sock_type attribute. Or .type could be an object with
attributes like: type (int/enum), cloexec, nonblock, etc.

Or simply a short helper method can be added. Ex:
socket.get_socket_type(sock) or socket.get_socket_type(sock.type).

--

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



[issue21331] Reversing an encoding with unicode-escape returns a different result

2014-04-22 Thread STINNER Victor

STINNER Victor added the comment:

unicode_escape codec is deprecated since Python 3.3. Please use UTF-8 or
something else.

--

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



[issue4913] wave.py: add writesamples() and readsamples()

2014-04-22 Thread Joe Button

Joe Button added the comment:

Forgive my unfamiliarity with python's development process, but, what is 
happening with this? Is there any chance of this enhancement making it into the 
python libs? What would need to happen?

Thanks.

--
nosy: +Joeboy

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



[issue21306] PEP 466: backport hmac.compare_digest

2014-04-22 Thread Alex Gaynor

Alex Gaynor added the comment:

Attached patch implements compare_digest. Code is mostly a 1-1 from 3.x, except 
the Unicode paths are changed, and the tests are a tiny bit different.

* Still needs to backport the docs.
* Compares all unicode objects, not just ascii ones.

If the patch looks good to folks I'll add the docs as well.

--
keywords: +patch
Added file: http://bugs.python.org/file35005/compare_digest.diff

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



[issue4913] wave.py: add writesamples() and readsamples()

2014-04-22 Thread R. David Murray

R. David Murray added the comment:

Someone has to find the time to do a commit review on the patch.  As Guilherme 
said, there's no specific maintainer for wave, so I'm afraid it just got 
forgotten about.  On the other hand, as a new feature it would now go in 3.5, 
and we're at the start of the approximately one year window for new features, 
so if you ping this issue (as you just did) periodically, someone will get to 
it ;)

What you could do to help move it along is to do your own review of the patch, 
including making sure it still applies to default...which it may not, since 
there have in fact been some changes in wave.py.  If that's the case you can 
also help by updating the patch.

--
nosy: +r.david.murray
stage: test needed - patch review
versions: +Python 3.5 -Python 3.2

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



[issue21207] urandom persistent fd - not re-openned after fd close

2014-04-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Updated patch using an anonymous struct.

--
Added file: http://bugs.python.org/file35006/urandom_fd_reopen2.patch

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



[issue21127] Path objects cannot be constructed from str subclasses

2014-04-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c24cbd9bd63b by Antoine Pitrou in branch '3.4':
Issue #21127: Path objects can now be instantiated from str subclass instances 
(such as numpy.str_).
http://hg.python.org/cpython/rev/c24cbd9bd63b

New changeset aad6d6b819ed by Antoine Pitrou in branch 'default':
Issue #21127: Path objects can now be instantiated from str subclass instances 
(such as numpy.str_).
http://hg.python.org/cpython/rev/aad6d6b819ed

--
nosy: +python-dev

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



[issue21127] Path objects cannot be constructed from str subclasses

2014-04-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ok, I've committed a patch (to 3.4 and 3.5) that force-casts to str.
Thank you for reporting this bug!

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

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



[issue21207] urandom persistent fd - not re-openned after fd close

2014-04-22 Thread Daniel Black

Daniel Black added the comment:

maybe you've thought and dismissed this already but os.close could call 
dev_urandom_close for the urandom_fd. Then there's no fstat calls in every 
random access. As a sweeping close all isn't going to occur that often and 
extra open probably isn't that much overhead.

--

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



[issue21207] urandom persistent fd - not re-openned after fd close

2014-04-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 maybe you've thought and dismissed this already but os.close could
 call dev_urandom_close for the urandom_fd. Then there's no fstat calls
 in every random access.

That's fine if os.close() is indeed used to close fd, but not if some
third-party library uses the C close() function directly. I don't know
how likely that is, but I think it's better to squash the bug
completely, rather than 80% of it :-)

(also some other stdlib code might (?) also call C close()...)

--

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



[issue4913] wave.py: add writesamples() and readsamples()

2014-04-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Serhiy, is this something you can review?

--
nosy: +serhiy.storchaka

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



[issue21207] urandom persistent fd - not re-openned after fd close

2014-04-22 Thread Daniel Black

Daniel Black added the comment:

fine by me. was just a thought

--

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



[issue21332] subprocess bufsize=1 docs are misleading

2014-04-22 Thread raylu

New submission from raylu:

https://docs.python.org/3.3/library/subprocess.html says

bufsize will be supplied as the corresponding argument to the open() function 
when creating the stdin/stdout/stderr pipe file objects: ... 1 means line 
buffered

but it calls io.open with 'wb' and 'rb': 
http://hg.python.org/cpython/file/c9cb931b20f4/Lib/subprocess.py#l828

This puts the file in binary mode, and 
https://docs.python.org/3.3/library/functions.html#open says

1 to select line buffering (only usable in text mode)

Even with universal_newlines=True, the TextIOWrapper isn't passed 
line_buffering=True. There's actually no way to get line buffering any more.

--
components: Library (Lib)
messages: 217044
nosy: raylu
priority: normal
severity: normal
status: open
title: subprocess bufsize=1 docs are misleading
versions: Python 3.3, Python 3.4, Python 3.5

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



[issue4913] wave.py: add writesamples() and readsamples()

2014-04-22 Thread Joe Button

Joe Button added the comment:

On quickly looking at this, the immediate issue seems to me to be that there is 
no patch, as I understand the term. If it would be helpful I can look at 
turning the code in the attached files into a patch against default and ensure 
the tests pass (but not right now as it's ~1am here).

--

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



[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

2014-04-22 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +pitrou

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



[issue10510] distutils upload/register should use CRLF in HTTP requests

2014-04-22 Thread Ian Cordasco

Changes by Ian Cordasco graffatcolmin...@gmail.com:


--
nosy: +icordasc

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



[issue21324] dbhash leaks random memory fragments to a database

2014-04-22 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/issue21324
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21324] dbhash leaks random memory fragments to a database

2014-04-22 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

Marcin, what Berkeley DB version are you using?. Platform?. 32 or 64 bits?

Could you be able to compile  test a custom python patch?

--

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



[issue21324] dbhash leaks random memory fragments to a database

2014-04-22 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

dbhash uses bsddb behind the curtain. Could you possibly try current bsddb 
external module at http://www.jcea.es/programacion/pybsddb.htm ??

Thanks.

--

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



[issue21330] Typo in Unicode HOWTO documentation

2014-04-22 Thread Benjamin Peterson

Benjamin Peterson added the comment:

http://hg.python.org/cpython/rev/b428b803f71f
http://hg.python.org/cpython/rev/660d53bfb332
http://hg.python.org/cpython/rev/ae4a9000e925

--
nosy: +benjamin.peterson
resolution:  - fixed
status: open - closed

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



[issue21324] dbhash leaks random memory fragments to a database

2014-04-22 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

Experimenting with this, looks like the content leak is inside Berkeley DB 
code. The leak is always on offset X*4096 bytes away when the database pagesize 
is 4096 bytes. Looks like this is an important hint, since Python itself knows 
nothing about database pagesize.

For instance:

 a=open(secrets.db).read()
 a.find(secret)
21184
 a.find(secret,21185)
25280
 25280-21184
4096
 a.find(secret,25281)
37568
 37568-25280
12288
 12288/4096.0
3.0

--

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



[issue21324] dbhash leaks random memory fragments to a database

2014-04-22 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

The C version reuses buffers, so the content leak is less probable. Could you 
possibly change the buffer for a malloc/free pair and try again?.

--

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



[issue17160] test_urllib2net fails

2014-04-22 Thread Zachary Ware

Zachary Ware added the comment:

This was already fixed, just not before 2.7.6 was released.

--
nosy: +zach.ware
status: open - closed

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



[issue17160] test_urllib2net fails

2014-04-22 Thread Zachary Ware

Zachary Ware added the comment:

Actually, that's not quite right.  It was fixed in 2.7.6, then changes to the 
website broke it again and it has been fixed again since then.  Either way, it 
ain't broke right now ;)

--

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



[issue4913] wave.py: add writesamples() and readsamples()

2014-04-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

A patch against default, including a test, would be helpful.

--

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



[issue21333] Document recommended exception for objects that shouldn't be pickled

2014-04-22 Thread Stefan Schwarzer

New submission from Stefan Schwarzer:

I recently was confused whether to raise a `PicklingError` or `TypeError` in 
`__getstate__` if objects of my class can't and shouldn't be pickled. [1]

Terry Reedy advised I should use `TypeError`. [2]

I wonder if the `pickle` module documention should explicitly recommend using 
`TypeError` if a class wants to say that its objects can't be pickled. What do 
you think?

[1] https://mail.python.org/pipermail/python-list/2014-April/670987.html
[2] https://mail.python.org/pipermail/python-list/2014-April/671002.html

--
assignee: docs@python
components: Documentation
messages: 217054
nosy: docs@python, sschwarzer
priority: normal
severity: normal
status: open
title: Document recommended exception for objects that shouldn't be pickled
type: enhancement
versions: Python 3.5

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