[issue28535] round seems to provide floor, not proper rounding

2016-10-25 Thread Steven D'Aprano
Steven D'Aprano added the comment: To be clear, let's look at the first failed assertion: AssertionError: 32.78 != 32.775 within 2 places It sure *looks* like 32.775 ought to round to 32.78. And indeed it would, if it actually was 32.775. But despite appearances, it isn't. S

[issue24379] Add operator.subscript as a convenience for creating slices

2016-11-12 Thread Steven D'Aprano
Steven D'Aprano added the comment: On Sat, Nov 12, 2016 at 08:23:45AM +, Raymond Hettinger wrote: > I can't even dream up any scenarios where > ``operator.subscript[3:7:2]`` would be better than > ``slice(3, 7, 2)``. For that specific example, I completely agree.

[issue28681] About function renaming in the tutorial

2016-11-12 Thread Steven D'Aprano
Steven D'Aprano added the comment: I disagree that "aliasing" is more accurate. We have a perfectly good name for symbols in Python: "name". A value (and that includes functions) can have multiple names. It seems to me that if we're to start distinguishing b

[issue28681] About function renaming in the tutorial

2016-11-13 Thread Steven D'Aprano
Steven D'Aprano added the comment: > And this is aliasing: > g = f Is it only aliasing if you know that f is a function? I don't mean that as a rhetorical question -- I'm asking if we're comfortable with the idea of saying that g is an ali

[issue28745] Python 3.5.2 "from ... import" statement is different from official documentation

2016-11-18 Thread Steven D'Aprano
Steven D'Aprano added the comment: Please don't post screen shots of text. Copy and paste the text into the bug report. Some people (those who are blind, visually impaired or using a screen-reader for some other reason) cannot see the screen shot, and even those who can prefer to

[issue28745] Python 3.5.2 "from ... import" statement is different from official documentation

2016-11-18 Thread Steven D'Aprano
Steven D'Aprano added the comment: If you're quoting from the docs, its a good idea to give the URL to *which* documentation you are reading, not just a copy of the text. -- ___ Python tracker <http://bugs.python.o

[issue13004] pprint: add option to truncate sequences

2011-09-19 Thread Steven Samuel Cole
Changes by Steven Samuel Cole : -- nosy: +ssc title: pprint: add option to truncate seqeunces -> pprint: add option to truncate sequences ___ Python tracker <http://bugs.python.org/issu

[issue13010] devguide doc: ./python.exe on OS X

2011-09-19 Thread Steven Samuel Cole
New submission from Steven Samuel Cole : it says in the last paragraph of the chapter at http://docs.python.org/devguide/setup.html#unix: [...] ./python.exe on OS X [...] .exe seems to indicate that should probably be './python.exe on Windows' -- assignee: docs@python

[issue13010] devguide doc: ./python.exe on OS X

2011-09-19 Thread Steven Samuel Cole
Steven Samuel Cole added the comment: i've gone through the process of checking out and building python as described in the devguide; it seems the python executable is indeed called python.exe under mac osx. i find this confusing. a comment on the reason for this unusual suffix wou

[issue13010] devguide doc: ./python.exe on OS X

2011-09-19 Thread Steven Samuel Cole
Steven Samuel Cole added the comment: from my observations, david is correct, but this is not limited to os x. i have checked out and rebuilt python twice on a linux system (kubuntu 10.10 i386 virtual machine): 1. in a 'conventional' setup using a local (i.e. guest) harddrive forma

[issue13004] pprint: add option to truncate sequences

2011-09-20 Thread Steven Samuel Cole
Steven Samuel Cole added the comment: @anand: as the names say, the depth parameter limits the depth of display while the length parameter limits the length. for example, with a data structure of a list of lists of lists and a depth of 2, only the first two levels would be shown, the third

[issue7434] general pprint rewrite

2011-09-20 Thread Steven Samuel Cole
Changes by Steven Samuel Cole : -- nosy: +ssc ___ Python tracker <http://bugs.python.org/issue7434> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10043] UnboundLocalError with local variable set by setattr, caused by code run later

2010-10-07 Thread Steven Samuel Cole
New submission from Steven Samuel Cole : inside a function, I create a local variable by using setattr with the current module as object, as in setattr(modules[__name__], 'name', 'value') if I _later_ in the code set name to None, the attribute becomes unavailable e

[issue10043] UnboundLocalError with local variable set by setattr, caused by code run later

2010-10-07 Thread Steven Samuel Cole
Steven Samuel Cole added the comment: I'm just a developer, I don't know anything about Python internals or what Python sees or does at what stage. Looking at the sample file, code executed later has an influence on code executed earlier - and that behavior is unexpected, confusin

[issue10043] UnboundLocalError with local variable set by setattr, caused by code run later

2010-10-07 Thread Steven Samuel Cole
Steven Samuel Cole added the comment: thank you very much for the clarification. i did indeed not come across the page you've linked to, mainly because i did not really know what to google for. actually, i do not recall ever looking into the python language reference in 6+ years of p

[issue11843] distutils doc: duplicate line in table

2011-04-14 Thread Steven Samuel Cole
New submission from Steven Samuel Cole : in the first table on http://docs.python.org/distutils/builtdist.html (search for 'available formats for built distributions'), the line with 'rpm / RPM / (5)' is in there twice -- assignee: docs@python components: Do

[issue39438] better handling of foreign signal handlers in signal.signal

2020-01-23 Thread Steven G. Johnson
New submission from Steven G. Johnson : In embedded Python, if the embedding code sets a signal handler (e.g. for SIGINT), then signal.getsignal(SIGINT) returns None. However, signal.signal(SIGINT, signal.getsignal(SIGINT)) throws a TypeError, even though it should logically be a no-op

[issue21618] POpen does not close fds when fds have been inherited from a process with a higher resource limit

2014-05-30 Thread Steven Stewart-Gallus
Changes by Steven Stewart-Gallus : -- type: -> security versions: +Python 3.4 ___ Python tracker <http://bugs.python.org/issue21618> ___ ___ Python-bugs-lis

[issue21618] POpen does not close fds when fds have been inherited from a process with a higher resource limit

2014-05-30 Thread Steven Stewart-Gallus
New submission from Steven Stewart-Gallus: The sysconf(_SC_OPEN_MAX) approach to closing fds is kind of flawed. It is kind of hacky and slow (see http://bugs.python.org/issue1663329). Moreover, this approach is incorrect as fds can be inherited from previous processes that have had higher

[issue21618] POpen does not close fds when fds have been inherited from a process with a higher resource limit

2014-05-30 Thread Steven Stewart-Gallus
Steven Stewart-Gallus added the comment: Okay here's a stub patch that address FreeBSD, NetBSD and Linux. I'm not sure how to address the other platforms. -- keywords: +patch Added file: http://bugs.python.org/file35419/python.patch

[issue21618] POpen does not close fds when fds have been inherited from a process with a higher resource limit

2014-05-30 Thread Steven Stewart-Gallus
Steven Stewart-Gallus added the comment: Oh right! I forgot a possible problem with my proposed patch. It is incompatible with Valgrind (see issue https://bugs.kde.org/show_bug.cgi?id=331311). Either this patch won't be applied, Valgrind compatibility is judged not essential or the Val

[issue21618] POpen does not close fds when fds have been inherited from a process with a higher resource limit

2014-05-31 Thread Steven Stewart-Gallus
Steven Stewart-Gallus added the comment: I agree that this is not a likely scenario but I can think of one mildly plausible scenario. Suppose some web server runs a Python CGI script but has a bug that leaks a file descriptor into the script. The web server sandboxes the Python CGI script a

[issue21618] POpen does not close fds when fds have been inherited from a process with a higher resource limit

2014-05-31 Thread Steven Stewart-Gallus
Steven Stewart-Gallus added the comment: I found another problem with _close_open_fd_range_safe. POSIX leaves the state of a file descriptor given to close undefined if the close fails with EINTR. I believe but haven't double checked that close should not be retried on EINTR on all o

[issue21618] POpen does not close fds when fds have been inherited from a process with a higher resource limit

2014-06-01 Thread Steven Stewart-Gallus
Steven Stewart-Gallus added the comment: Thank you for the very quick patch Gregory P. Smith. It's fair enough if you don't bother to fix the EINTR issue. One small note: > +"""Confirm that issue21618 is fixed (mail fail under valgrind)."""

[issue21627] Concurrently closing files and iterating over the open files directory is not well specified

2014-06-01 Thread Steven Stewart-Gallus
New submission from Steven Stewart-Gallus: Hello, I noticed some possible bad behaviour while working on Python issue 21618 (see http://bugs.python.org/issue21618). Python has the following code in _posixsubmodules.c for closing extra files before spawning a process: static void

[issue21627] Concurrently closing files and iterating over the open files directory is not well specified

2014-06-01 Thread Steven Stewart-Gallus
Steven Stewart-Gallus added the comment: Okay, I've made a simple proof of concept patch. -- ___ Python tracker <http://bugs.python.org/issue21627> ___ ___

[issue21627] Concurrently closing files and iterating over the open files directory is not well specified

2014-06-01 Thread Steven Stewart-Gallus
Steven Stewart-Gallus added the comment: Gah, I had trouble figuring out mecurial. Close files after reading open files and not concurrently This commit removes the old behaviour of closing files concurrently with reading the system's list of open files and instead closes the files afte

[issue21627] Concurrently closing files and iterating over the open files directory is not well specified

2014-06-02 Thread Steven Stewart-Gallus
Steven Stewart-Gallus added the comment: It occurred to me that the current patch I have is wrong and that using _Py_set_inheritable is wrong because EBADF can occur in the brute force version which in the case of _Py_set_inheritable raises an error which I am not sure is asynch signal safe

[issue21627] Concurrently closing files and iterating over the open files directory is not well specified

2014-06-04 Thread Steven Stewart-Gallus
Steven Stewart-Gallus added the comment: Okay, so the Python directory seems to be where wrappers over low level or missing functionality is placed. So I guess I should make a _Py_setcloexec function in a Python/setcloexec.c and a definition in Include/setcloexec.h

[issue21627] Concurrently closing files and iterating over the open files directory is not well specified

2014-06-06 Thread Steven Stewart-Gallus
Steven Stewart-Gallus added the comment: Okay, now I'm confused. How would I conditionally compile and use the setcloexec object and header on POSIX platforms and not on Windows? -- ___ Python tracker <http://bugs.python.org/is

[issue21627] Concurrently closing files and iterating over the open files directory is not well specified

2014-06-12 Thread Steven Stewart-Gallus
Steven Stewart-Gallus added the comment: Okay, I made a patch that I hoped dealt with all the criticisms and that fixed up a problem I noted myself. -- Added file: http://bugs.python.org/file35599/fixed-setcloexec.patch ___ Python tracker <h

[issue21627] Concurrently closing files and iterating over the open files directory is not well specified

2014-06-12 Thread Steven Stewart-Gallus
Changes by Steven Stewart-Gallus : Removed file: http://bugs.python.org/file35599/fixed-setcloexec.patch ___ Python tracker <http://bugs.python.org/issue21627> ___ ___

[issue21627] Concurrently closing files and iterating over the open files directory is not well specified

2014-06-12 Thread Steven Stewart-Gallus
Changes by Steven Stewart-Gallus : Added file: http://bugs.python.org/file35600/fixed-setcloexec.patch ___ Python tracker <http://bugs.python.org/issue21627> ___ ___ Pytho

[issue7067] Suggest better documentation of 2 versus 3 on 3.1.1 site.

2009-10-05 Thread Steven R. Loomis
New submission from Steven R. Loomis : It would be nice if http://www.python.org/download/releases/3.1.1/ had the '3 vs 2' explanation made more prominent, just as it was in the 3.0. Maybe I've been living under a rock, but I didn't realize that 3 was such a chan

[issue7067] Suggest better documentation of 2 versus 3 on 3.1.1 site.

2009-10-22 Thread Steven R. Loomis
Steven R. Loomis added the comment: Thnks for fixing this. there still seems to be something up with http://python.org/download/releases/3.1.1/ - it says 'Inline interpreted text or phrase reference start-string without end-string.' and the changelog link is broken. But I see the

[issue7067] Suggest better documentation of 2 versus 3 on 3.1.1 site.

2009-10-22 Thread Steven R. Loomis
Steven R. Loomis added the comment: welcome, looks great! -- ___ Python tracker <http://bugs.python.org/issue7067> ___ ___ Python-bugs-list mailing list Unsub

[issue5898] Hang in Popen.wait() when another process has been created

2010-01-11 Thread Steven K. Wong
Steven K. Wong added the comment: I think the hang is not a bug. Take a look at the Popen documentation on close_fds. If you specify close_fds=True when creating proc2, the hang will not happen when you remove the "proc2.stdin.close()" line. -- nosy: +ste

[issue5898] Hang in Popen.wait() when another process has been created

2010-01-11 Thread Steven K. Wong
Steven K. Wong added the comment: See this related issue: http://bugs.python.org/issue7448 -- ___ Python tracker <http://bugs.python.org/issue5898> ___ ___ Pytho

[issue5898] Hang in Popen.wait() when another process has been created

2010-01-11 Thread Steven K. Wong
Steven K. Wong added the comment: See this related issue: http://bugs.python.org/issue7213 -- ___ Python tracker <http://bugs.python.org/issue5898> ___ ___ Pytho

[issue7448] when piping output between subprocesses some fd is left open blocking forever

2010-01-11 Thread Steven K. Wong
Steven K. Wong added the comment: Looks like a duplicate of http://bugs.python.org/issue7213 . -- nosy: +steven.k.wong ___ Python tracker <http://bugs.python.org/issue7

[issue7678] subprocess.Popen pipeline example code in the documentation is lacking

2010-01-11 Thread Steven K. Wong
New submission from Steven K. Wong : The example code at http://www.python.org/doc/2.6.2/library/subprocess.html#replacing-shell-pipeline should be updated to add the close() call noted below: output=`dmesg | grep hda` ==> p1 = Popen(["dmesg"], stdout=PIPE) p2 = Popen(["gr

[issue2943] Distutils should generate a better error message when the SDK is not installed

2015-04-11 Thread Steven Samuel Cole
Changes by Steven Samuel Cole : -- nosy: +ssc ___ Python tracker <http://bugs.python.org/issue2943> ___ ___ Python-bugs-list mailing list Unsubscribe:

<    15   16   17   18   19   20