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

[issue1067702] urllib fails with multiple ftp transfers

2011-06-27 Thread Stefan Schwarzer
Stefan Schwarzer added the comment: Hi Senthil, I don't yet understand what was going on before it resulted in the traceback. I also don't understand _why_ the patch fixes _this_ bug. (That's not to say it doesn't, but I think it's not obvious either. :-) ) Were

[issue1067702] urllib fails with multiple ftp transfers

2011-06-26 Thread Stefan Schwarzer
Stefan Schwarzer added the comment: The traceback and its context for the exception raised in Python 2.7 is: ... ### 99

[issue1067702] urllib fails with multiple ftp transfers

2011-06-26 Thread Stefan Schwarzer
Stefan Schwarzer added the comment: After running the adapted test script three times for Python 3 tip (changeset c5b0585624ef), I didn't get an error message / exception. -- Added file: http://bugs.python.org/file22485/urllibftpbug-non-interactive-p

[issue1067702] urllib fails with multiple ftp transfers

2011-06-26 Thread Stefan Schwarzer
Stefan Schwarzer added the comment: I can confirm the bug for the Python 2.7 tip (changeset b11e7bc76d07) after using the script urllibftpbug-non-interactive.py. -- ___ Python tracker <http://bugs.python.org/issue1067

[issue1067702] urllib fails with multiple ftp transfers

2011-06-26 Thread Stefan Schwarzer
Stefan Schwarzer added the comment: > I converted the script to be executable with manual intervention (see > attachment). This should have been "without manual intervention". :) -- ___ Python tracker <http://bugs.pyth

[issue1067702] urllib fails with multiple ftp transfers

2011-06-26 Thread Stefan Schwarzer
Stefan Schwarzer added the comment: I was able to get some error output with the code of the OP. However, I only saw the "opposite" message, such as: Retrieval of 'ftp://ftp.gnome.org/pub/debian/dists/stable/main/source/Sources.bz2' failed with error: [Errno ftp err

[issue4608] urllib.request.urlopen does not return an iterable object

2011-06-25 Thread Stefan Schwarzer
Stefan Schwarzer added the comment: It turned out that although the addinfourl instance had the `__iter__` attribute in `addbase.__init__` correctly assigned, `__iter__` wasn't found by the `iter` builtin. It seems that `iter` always tries to use the `__iter__` method of the _class