[issue5788] datetime.timedelta is inconvenient to use...

2009-11-26 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: A late note: this would be redundant if the oft-requested division of timedeltas were implemented: t.total_seconds could then be spelt t/timedelta(seconds=1) with the advantage that there would then be a natural way to spell t.total_days

[issue5788] datetime.timedelta is inconvenient to use...

2009-11-26 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: That should be t.total_seconds(), of course. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5788 ___

[issue1023290] Conversion of longs to bytes and vice-versa.

2009-11-26 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Looks good to me, too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1023290 ___ ___

[issue1023290] Conversion of longs to bytes and vice-versa.

2009-11-26 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: All tests pass on OS X 10.5/Intel, except that I'm still getting the issue 6687 test failure. This needs to be resolved somehow before committing. -- ___ Python tracker rep...@bugs.python.org

[issue4057] Popen(..., cwd=...) does not set PWD environment variable

2009-11-26 Thread Geoffrey Bache
Changes by Geoffrey Bache gjb1...@users.sourceforge.net: -- nosy: +gjb1002 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4057 ___ ___

[issue7397] __import__ docs should reference imputil.import_module

2009-11-26 Thread Nick Coghlan
New submission from Nick Coghlan ncogh...@gmail.com: Fairly straightforward one - __import__ is no longer the preferred tool for doing runtime imports, so its documentation should point to imputil.import_module (this is a little more than just a see also, some of the existing wording in the

[issue6727] ImportError when package is symlinked on Windows

2009-11-26 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Given that you had to use ctypes to create the symlinks on Windows in the first place, I'd say you're right :) Probably the first step would be to make sure the nt OS and path modules get Windows symlink support (although even that may not be

[issue7397] __import__ docs should reference imputil.import_module

2009-11-26 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: According to http://docs.python.org/library/imputil.html, imputil is deprecated and it has been removed in 3.x. Further, I don't see import_module in imputil (2.6 or trunk), it's just an example on that documentation page. -- nosy:

[issue7397] __import__ docs should reference importlib.import_module

2009-11-26 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: s/imputil/importlib/ Details, details... -- title: __import__ docs should reference imputil.import_module - __import__ docs should reference importlib.import_module ___ Python tracker

[issue5788] datetime.timedelta is inconvenient to use...

2009-11-26 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: A late note: this would be redundant if the oft-requested division of timedeltas were implemented: t.total_seconds could then be spelt t/timedelta(seconds=1) It would be less obvious, though. --

[issue7398] Issue with _PyLong_Format while trying to build Python on HP-UX itanium

2009-11-26 Thread Paul H
New submission from Paul H paulh.m...@gmail.com: Hello all, First post here so go easy on me please! And please bear in mind I am not a C programmer, just a unix admin trying to build python as an option for other programmers to use. I am trying to build Python 3.1.1 on HP-UX itanium. OS and

[issue7398] Issue with _PyLong_Format while trying to build Python on HP-UX itanium

2009-11-26 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: To elaborate on Eric's suggestion, put a single line top PY_VERSION_HEX bottom right above the line #if PY_VERSION_HEX = 0x0300 Then add the flag that produces preprocessor output to the compiler line (copy the compiler line

[issue5725] process SysV-Semaphore support

2009-11-26 Thread Philip Semanchuk
Philip Semanchuk osvens...@users.sourceforge.net added the comment: I stumbled across this bug report while looking for an mmap-related issue. I thought I'd mention that I have a module for SysV IPC that's about a year old. Obviously it's not in the standard library, but it is pretty well

[issue7398] Issue with _PyLong_Format while trying to build Python on HP-UX itanium

2009-11-26 Thread Paul H
Paul H paulh.m...@gmail.com added the comment: Hi all, Many thanks for the tips, and for the super-quick responses also! Yes indeed, what is happening here is that PY_VERSION_HEX is not being evaluated correctly. In fact what appears to be happening is that Include/patchlevel.h is not being

[issue7398] Issue with _PyLong_Format while trying to build Python on HP-UX itanium

2009-11-26 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I'm going to close this, but if you find the problem (and especially if you develop a patch to resolve it), please post back here. -- status: open - closed ___ Python tracker rep...@bugs.python.org

[issue4057] Popen(..., cwd=...) does not set PWD environment variable

2009-11-26 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: In most shells $PWD is a magic variable that is maintained by the shell itself. IMHO python has no reason to mess with variables that happen to be defined by some shells. If subprocess were to set $PWD, os.setuid should set $UID, and

[issue6727] ImportError when package is symlinked on Windows

2009-11-26 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com added the comment: I agree that a proper solution might include full symlink support. However, symlink support for windows (issue1578269) is taking some time to develop and will likely never be available for Python 2. My feeling is that a symlink naive

[issue7399] Possible bug in Python Tutorial

2009-11-26 Thread David Henretty
New submission from David Henretty dhenre...@a2etech.com: Hi, In the v3.1.1 Python Tutorial (section 10.7 - Internet Access), the sample code (shown below) results in the following error :- from urllib.request import urlopen for line in urlopen('http://tycho.usno.navy.mil/cgi-bin/timer.pl'):

[issue7399] Possible bug in Python Tutorial

2009-11-26 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: The example is indeed wrong. urlopen is returning an object that emits binary data. The error comes from using 'in' on incompatible types. The solution is to encode the data with an appropriate encoding, once you figure out what that

[issue4057] Popen(..., cwd=...) does not set PWD environment variable

2009-11-26 Thread Geoffrey Bache
Geoffrey Bache gjb1...@users.sourceforge.net added the comment: I can see your point, though I think particularly in this case it's (unfortunately) fairly common that scripts on POSIX platforms read $PWD instead of finding the current working directory properly. I'm probably not the first

[issue7400] Small typo in Python's library documentation: set

2009-11-26 Thread Renato Cunha
New submission from Renato Cunha ren...@renatocunha.com: In the documentation of the built-in functions, the description of set says Return a new set, optionally with elements ARE taken from iterable. The referenced text should be either ... optionally with elements taken from iterable.

[issue7400] Small typo in Python's library documentation: set

2009-11-26 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r76538. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7400 ___

[issue7397] __import__ docs should reference importlib.import_module

2009-11-26 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7397 ___ ___ Python-bugs-list

[issue6845] Restart support in binary upload for ftplib

2009-11-26 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Now that FTP_TLS has been integrated into the trunk, the patch should be augmented in order to also cover that class. Right now a test is failing: == ERROR: test_storbinary_rest

[issue7401] os.write and os.close on pipe from separate threads hangs on Mac OS X

2009-11-26 Thread Hugh Secker-Walker
New submission from Hugh Secker-Walker hug...@users.sourceforge.net: The attached script demonstrates a problem on Mac OS X 10.5 whereby Python can hang while simultaneously trying os.write with a large buffer and os.close, from separate threads on the write and read fds respectively of a pipe.

[issue6845] Restart support in binary upload for ftplib

2009-11-26 Thread Pablo Mouzo
Changes by Pablo Mouzo pablomo...@gmail.com: Removed file: http://bugs.python.org/file15302/issue6845-trunk.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6845 ___

[issue6845] Restart support in binary upload for ftplib

2009-11-26 Thread Pablo Mouzo
Pablo Mouzo pablomo...@gmail.com added the comment: Thanks Antoine, I'm attaching both patches. Now the test isn't failing. -- Added file: http://bugs.python.org/file15401/issue6845-trunk.diff ___ Python tracker rep...@bugs.python.org

[issue6845] Restart support in binary upload for ftplib

2009-11-26 Thread Pablo Mouzo
Changes by Pablo Mouzo pablomo...@gmail.com: Added file: http://bugs.python.org/file15402/issue6845-py3k.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6845 ___

[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2009-11-26 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com added the comment: Thanks Eric for the report. I had tested earlier on XP, but didn't do so with the latest changes. It appears that a couple of modules didn't behave well under XP. The latest patch (16) addresses these issues. In particular, many tests use the

[issue7401] os.write and os.close on pipe from separate threads hangs on Mac OS X

2009-11-26 Thread Hugh Secker-Walker
Changes by Hugh Secker-Walker hug...@users.sourceforge.net: -- versions: +Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7401 ___ ___

[issue7401] os.write and os.close on pipe from separate threads hangs on Mac OS X

2009-11-26 Thread Hugh Secker-Walker
Changes by Hugh Secker-Walker hug...@users.sourceforge.net: -- assignee: - ronaldoussoren components: +Macintosh nosy: +ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7401 ___

[issue4057] Popen(..., cwd=...) does not set PWD environment variable

2009-11-26 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: On 26 Nov, 2009, at 19:27, Geoffrey Bache wrote: Geoffrey Bache gjb1...@users.sourceforge.net added the comment: I can see your point, though I think particularly in this case it's (unfortunately) fairly common that scripts on

[issue7401] os.write and os.close on pipe from separate threads hangs on Mac OS X

2009-11-26 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Why do you think this is a bug in Python, and not an operating system bug? I.e. if you would redo the script in C, would it still hang? -- nosy: +loewis ___ Python tracker rep...@bugs.python.org