[issue5673] Add timeout option to subprocess.Popen

2010-01-28 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +astrand stage: test needed - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5673 ___

[issue7798] document pydoc methods

2010-01-28 Thread anatoly techtonik
New submission from anatoly techtonik techto...@gmail.com: pydoc contains some useful methods like pager() that could be reused in many python application, and it would be handy to have a documentation for them in Python manual http://docs.python.org/library/pydoc -- assignee:

[issue5673] Add timeout option to subprocess.Popen

2010-01-28 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Some comments: - why do you say Thread.join() uses a busy loop? is it because it uses Condition.wait()? If so, this will be solved in py3k by issue7316 (which you are welcome to review). Otherwise, I think there should be an upper bound on the

[issue5362] Add configure option to disable Py3k warnings

2010-01-28 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Given the very small benefits, I don't think there's any point in making this a configuration variable. A hardcoded flag would be sufficient, and expert users would be able to recompile their Python (as with the FAST_LOOPS flag). --

[issue5362] Add configure option to disable Py3k warnings

2010-01-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: I'm with Antoine on this one. Also, instead of removing the flag completely which will cause problems with extensions relying on it, I'd suggest to just disable the PyErr_WarnPy3k(msg, stacklevel) macro and turn it into a no-op if a

[issue7797] base64 module docs should indicate that encode methods return bytes, not strings

2010-01-28 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: -- nosy: +flox priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7797 ___ ___

[issue7591] test_distutils: test_get_platform fails on 3.1

2010-01-28 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr added the comment: Fixed with r77586 -- resolution: - accepted stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7591

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-01-28 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7732 ___ ___

[issue767645] incorrect os.path.supports_unicode_filenames

2010-01-28 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: -- components: +Tests stage: - patch review versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue767645 ___

[issue7753] newgil backport

2010-01-28 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: It appears to be better to use clock_gettime(CLOCK_MONOTONIC) where available and only use gettimeofday() as fallback solution together with times(), ftime() and time(). Ok, I've tried and it's less good than expected. Using CLOCK_MONOTONIC

[issue7799] unittest returning standard_tests from load_tests in module fails

2010-01-28 Thread R. David Murray
New submission from R. David Murray rdmur...@bitdance.com: Working from the example in the docs, I wrote a test suite like this: def load_tests(loader, standard_tests, pattern): for case in email.test.emailtestdb.populated_test_cases(globals()):

[issue7799] unittest returning standard_tests from load_tests in module fails

2010-01-28 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Yes. The standard tests should be wrapped in a suite before being passed into load_tests. That's a bug - thanks for catching it. -- assignee: - michael.foord nosy: +michael.foord ___ Python

[issue7610] Cannot use both read and readline method in same ZipExtFile object

2010-01-28 Thread Nir Aides
Nir Aides n...@winpdb.org added the comment: I actually meant how would you simulate zlib's absence on a system in which it is present? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7610

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-01-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This is slightly incorrect: if PyFile_FromFile fails for another reason (PyString_FromString(name) runs out of memory), the fp is not closed and the caller is right to call fclose(). IMO PyFile_FromFile() should be changed to

[issue7610] Cannot use both read and readline method in same ZipExtFile object

2010-01-28 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: The easiest way is to setting zlib to None or not import it at all. Are you suggesting that test_zipfile should be always run with and without zlib to check that everything (except the things that require zlib of course) works in both the

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-01-28 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: Removed file: http://bugs.python.org/file15937/issue7732_find_module.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7732 ___

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-01-28 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr added the comment: if PyFile_FromFile fails for another reason (PyString_FromString(name) runs out of memory), the fp is not closed and the caller is right to call fclose(). As far as I understand, the fp is never left open, when PyFile_FromFile returns NULL.

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-01-28 Thread Trundle
Trundle andy-pyt...@hammerhartes.de added the comment: Note that the fp gets set with `fill_file_fields()` and that is called after the error return of `PyString_FromString()`. Hence, the fp is left open if `PyString_FromString()` returns NULL. --

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-01-28 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr added the comment: AFAICT, in this case, if PyString_FromString gives NULL, then (o_name == NULL) and the function returns without calling fill_file_fields. Hence, the fp is not opened. Do you suggest something else? --

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-01-28 Thread Trundle
Trundle andy-pyt...@hammerhartes.de added the comment: `fill_file_fields()` does not open the fp, the caller of `PyFile_FromFile()` opens the fp. I don't have a better idea, that's why I don't have provided a patch. -- ___ Python tracker

[issue7610] Cannot use both read and readline method in same ZipExtFile object

2010-01-28 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Apparently that part of code is already tested in other tests that use deflated mode, so I'll close this again. Thanks for the info. -- stage: test needed - committed/rejected status: open - closed

[issue7798] document pydoc methods

2010-01-28 Thread Brian Curtin
Changes by Brian Curtin cur...@acm.org: -- priority: - normal stage: - needs patch versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7798 ___

[issue6939] shadows around the io truncate() semantics

2010-01-28 Thread Pascal Chambon
Pascal Chambon chambon.pas...@gmail.com added the comment: Hello Here is the patch for the python trunk, regarding truncate() behaviour. I've tested it on windows and linux, against IO test suites (with -uall), in debug and normal mode. I've also updated some docstrings, and added tests for

[issue7753] newgil backport

2010-01-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Antoine Pitrou wrote: Antoine Pitrou pit...@free.fr added the comment: It appears to be better to use clock_gettime(CLOCK_MONOTONIC) where available and only use gettimeofday() as fallback solution together with times(), ftime() and

[issue7753] newgil backport

2010-01-28 Thread Ross Cohen
Ross Cohen rco...@snurgle.org added the comment: I am confused by this line of reasoning. Is it ok to ignore the deprecation process in py3k but not in 2.x? Is it only ok if a core developer does it? If the point of 2.7 is to make it easier for apps and packages to be ported to py3k, then what

[issue3871] cross and native build of python for mingw32 with distutils

2010-01-28 Thread Robin Schoonover
Changes by Robin Schoonover e...@cornhooves.org: -- nosy: +rschoon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3871 ___ ___ Python-bugs-list

[issue7753] newgil backport

2010-01-28 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: pthreads will default to use the real time clock. In order to have them use the monotonic timer, you have to setup a condition variable attribute: See the man-page for pthread_condattr_setclock(). I'll look at that, but I'm not thrilled at

[issue7800] Attributes of type list are static

2010-01-28 Thread Chris Carter
New submission from Chris Carter jesdisci...@gmail.com: The test case at the end of this message seems to indicate that the list is being initialized only once for all wrapper instances. I've tried to find anything about static members in Python and came up empty. I also found no relevant

[issue7800] Attributes of type list are static

2010-01-28 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: The list in your example is a *class attribute* not an instance attribute, so yes it is only initialised once. You can still access it through the instance (self) because of Python member lookup rules. If you want one list per instance

[issue7643] What is a Unicode line break character?

2010-01-28 Thread Chris Carter
Chris Carter jesdisci...@gmail.com added the comment: Then I must ask, why did the string attribute behave differently? I added it to allow for that, and the behavior seems inconsistent. -- nosy: +Chris.Carter ___ Python tracker

[issue7643] What is a Unicode line break character?

2010-01-28 Thread Chris Carter
Chris Carter jesdisci...@gmail.com added the comment: My bad, wrong bug. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7643 ___ ___

[issue7800] Attributes of type list are static

2010-01-28 Thread Chris Carter
Chris Carter jesdisci...@gmail.com added the comment: Then I must ask, why did the string attribute behave differently? I added it to allow for that, and the behavior seems inconsistent. -- ___ Python tracker rep...@bugs.python.org

[issue7801] xmlrpc.client binary object examples needs to use binary mode

2010-01-28 Thread Michael Newman
New submission from Michael Newman michael.b.new...@gmail.com: In Section 20.23.3 Binary Objects of: http://docs.python.org/3.1/library/xmlrpc.client.html The server AND client examples fail because the read and write methods are not set to binary mode. Example of what the client portion

[issue7800] Attributes of type list are static

2010-01-28 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Because strings are immutable. Your list access (self.list.append) mutates the existing list in place. Because strings are immutable you += is exactly equivalent to the following code: self.string = self.string + str(i) The first

[issue4331] Can't use _functools.partial() created function as method

2010-01-28 Thread Alexander Belopolsky
Alexander Belopolsky alexander.belopol...@gmail.com added the comment: Christophe, It looks like your patch goes out of its way to avoid creating nested partials. This is a worthwhile goal and I think it should be done in partial_new so that partial(partial(f, x), y) returns partial(f, x,

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Here is my review of issue7092_syntax_imports_v3.diff: - test_itertools.py: please replace [tuple([arg[i] if i len(arg) else None for arg in args]) for i in range(max(map(len, args)))] by something more readable (nested

[issue7437] OS X 2.6.4 installer fails on 10.3 with two corrupted file names, ignored on 10.4

2010-01-28 Thread TJ Sullivan
TJ Sullivan tjsu...@gmail.com added the comment: I would be happy to test the new package for you. I am running 10.3.9 and Had attempted to install 2.6.4 recently without realizing it, so my terminal version is 2.6.4 but idle and back at 2.5. email me if you want me to test it for you.

[issue4944] os.fsync() doesn't work as expect in Windows

2010-01-28 Thread Brian Curtin
Changes by Brian Curtin cur...@acm.org: -- nosy: +brian.curtin priority: - normal stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4944 ___

[issue7802] socket.gaierror before ProtocolError for xmlrpc.client

2010-01-28 Thread Michael Newman
New submission from Michael Newman michael.b.new...@gmail.com: Following the example in Section 20.23.5. ProtocolError Objects of: http://docs.python.org/3.1/library/xmlrpc.client.html It implies that an invalid URL will give raise an xmlrpc.client.ProtocolError. Instead I'm getting a

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-28 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Here's mine about issue7092_check_warnings_v3.diff: 1) test_callable should keep testing callable() and the warnings should be caught; 2) in test_bsddb3 the problems should be correct in the module if possible and worth it (the module is

[issue7802] socket.gaierror before ProtocolError for xmlrpc.client

2010-01-28 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: FWIW it had the same behavior already on Python 2.4. -- nosy: +ezio.melotti, loewis priority: - normal stage: - test needed ___ Python tracker rep...@bugs.python.org

[issue1481] test_uuid is warning about unreliable functions

2010-01-28 Thread Brian Curtin
Brian Curtin cur...@acm.org added the comment: These tests have been disabled for a little over two years now. I've run the previously disabled tests on Windows, Mac OSX, and Linux numerous times and haven't seen any instability or failures (not that it proves much). I wasn't around at the

[issue7801] xmlrpc.client binary object examples needs to use binary mode

2010-01-28 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +loewis priority: - normal stage: - needs patch type: - behavior versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7801

[issue7633] decimal.py: type conversion in context methods

2010-01-28 Thread Juan José Conti
Juan José Conti jjco...@gmail.com added the comment: 1) Agree. Extra checks removed. 2) My mistake. Fixed. 3) Fexed. 4) Methods documentation fixed. Also added examples. 5) Fixed 6) Allow ints in the following unary methods (all except the ones excluded by skrah in cdecimal): - abs - canonical

[issue6490] os.popen documentation in 2.6 is probably wrong

2010-01-28 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: The function is still marked as deprecated in the 2.x doc and undocumented in 3.x (the function is there, but the description points somewhere else). -- nosy: +ezio.melotti priority: - normal stage: - needs patch

[issue7800] Attributes of type list are static

2010-01-28 Thread Chris Carter
Chris Carter jesdisci...@gmail.com added the comment: Ha, fun with language features. Thanks for the detailed explanation. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7800 ___

[issue1926] NNTPS support in nntplib

2010-01-28 Thread Brian Curtin
Changes by Brian Curtin cur...@acm.org: -- stage: - test needed versions: +Python 2.7, Python 3.2 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1926 ___

[issue2052] Allow changing difflib._file_template character encoding.

2010-01-28 Thread Brian Curtin
Changes by Brian Curtin cur...@acm.org: -- stage: - test needed versions: +Python 2.6 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2052 ___

[issue1927] raw_input behavior incorrect if readline not enabled

2010-01-28 Thread Brian Curtin
Changes by Brian Curtin cur...@acm.org: -- stage: - test needed versions: -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1927 ___ ___