[issue15360] Behavior of assigning to __dict__ is not documented

2012-07-25 Thread Chris Rebert
Changes by Chris Rebert : -- nosy: +cvrebert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue15269] Document dircmp.left and dircmp.right

2012-07-25 Thread Eli Bendersky
Eli Bendersky added the comment: I think it can go into 3.3 but only if it gets reviewed by another core dev (we're in release candidate stage now). Senthil - can you review the patch together with me? As for customizing the stream, yes, go ahead and open a new issue for it, and add me there

[issue15436] __sizeof__ is not documented

2012-07-25 Thread Chris Rebert
Changes by Chris Rebert : -- nosy: +cvrebert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue14330] don't use host python, use host search paths for host compiler

2012-07-25 Thread Georg Brandl
Changes by Georg Brandl : -- priority: normal -> release blocker ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > +# The size of 'PyStructObject' > +totalsize = size(self.header + '5P') What if use totalsize = object.__sizeof__(struct_obj) ? -- ___ Python tracker

[issue15368] bytecode generation is not deterministic

2012-07-25 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue14578] importlib doesn't check Windows registry for paths

2012-07-25 Thread Eric Snow
Eric Snow added the comment: Brian, perhaps the problem described in issue15431 ("Cannot build importlib.h on Windows") is part of the problem for you here. -- ___ Python tracker _

[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Martin v . Löwis
Martin v. Löwis added the comment: issue15402-redux-v1.patch LGTM. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Martin v . Löwis
Martin v. Löwis added the comment: > So the good old "int main(void)" behaviour is "undefined" :-) No, it's not; see 5.1.2.2.1p1. -- ___ Python tracker ___

[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Talking about this, anybody has an electronic version of C Standard to > share with me, or should I hunt around the dark corners of Internet? :-) http://www.open-std.org/jtc1/sc22/wg14/www/standards (see n1256.pdf). --

[issue14201] Documented caching for shared library's __getattr__ and __getitem__ is incorrect

2012-07-25 Thread Meador Inge
Meador Inge added the comment: Any comments on this one? I plan on committing the changes tomorrow unless I hear something otherwise. -- ___ Python tracker ___ ___

[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Meador Inge
Meador Inge added the comment: The attached patch fixes: (1) the test cases to make them exact (inspired by 'test_sys.py'), (2) the definition of 's_sizeof' to add the dummy parameter, and (3) simplifies the sizeof calculation using 's_len'. -- Added file: http://bugs.python.org/file2

[issue15452] Eliminate the use of eval() in the logging config implementation

2012-07-25 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue10654] test_datetime sometimes fails on Python3.x windows binary

2012-07-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: Both subclasses return NotImplemented for d+1. Otherwise, TypeError or NotImplemented as expected. See file. -- Added file: http://bugs.python.org/file26519/datetimetest.py ___ Python tracker

[issue15415] Add temp_dir() and change_cwd() to test.support

2012-07-25 Thread Nick Coghlan
Changes by Nick Coghlan : -- assignee: -> ncoghlan nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue15441] test_posixpath fails on Japanese edition of Windows

2012-07-25 Thread Atsuo Ishimoto
Atsuo Ishimoto added the comment: Updated patch again. In this patch, byte object is passed as argument to WindowsError as Victor's patch. I prefer to fix PyErr_SetFromWindowsErrWithFilename() over path_error(), because PyErr_SetFromWindowsErrWithFilename() is public API, so someone may use

[issue15403] Refactor package creation support code into a common location

2012-07-25 Thread Nick Coghlan
Changes by Nick Coghlan : -- assignee: -> ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue10654] test_datetime sometimes fails on Python3.x windows binary

2012-07-25 Thread Nick Coghlan
Nick Coghlan added the comment: The precedence problems described in #11477 shouldn't factor into this case - that issue is specific to C level types that implement + and * via tp_as_sequence *without* implementing the corresponding slots in tp_as_number. That's not the case here, since datet

[issue15376] Refactor the test_runpy walk_package support code into a common location

2012-07-25 Thread Chris Jerdonek
Chris Jerdonek added the comment: Hi Nick, I was wondering if you'd have time to take a look at the patches I've uploaded to issue 15403 and issue 15415 at some point. Once those are addressed, I think we will be in a much better position to address most of this issue. -- __

[issue10654] test_datetime sometimes fails on Python3.x windows binary

2012-07-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: I do not see the error with installed 3.2.3. I **DO** see it consistently, when running the test with installed 3.3.0b1 on 64 bit Win 7. The only failure is == FAIL: test_computations (test.dat

[issue15452] Eliminate the use of eval() in the logging config implementation

2012-07-25 Thread Nick Coghlan
New submission from Nick Coghlan : The current implementation of PEP 391 relies on eval, which is substantially more permissive than the expected syntax described in the spec. This means the listen() feature provides an attack vector for injection of untrusted code. While the documentation has

[issue15451] PATH is not honored in subprocess.Popen in win32

2012-07-25 Thread Grissiom Gu
New submission from Grissiom Gu : My system is 32 bit win7 and python is 2.7.2. Sample code is here: === import os, sys nenv = {} nenv['PATH'] = 'C:\\Windows\\System32\\;e:\\projects\\teest\\python\\exe\\' nenv['SystemRoot'] = 'C:\\Windows\\' #os.putenv('PATH', nenv['PATH']

[issue15441] test_posixpath fails on Japanese edition of Windows

2012-07-25 Thread Atsuo Ishimoto
Atsuo Ishimoto added the comment: martin: while os.mkdir(b'\xe7w\xf0') succeeds, but strangely enough, subsequent os.chdir(b'\xe7w\xf0') fails. This is not a bug in Python, but Windows issue. -- ___ Python tracker

[issue15441] test_posixpath fails on Japanese edition of Windows

2012-07-25 Thread Atsuo Ishimoto
Atsuo Ishimoto added the comment: Here's another try: In this patch: - skip test_nonascii_abspath() test since it fails on some code pages. - Added a test to reproduce bug on latin code pages. - Use repr(filename) only if decode failed. This is more backward-compatible and does not lose any

[issue14501] Error initialising BaseManager class with 'authkey' argument of string type.

2012-07-25 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- nosy: +sbt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue14330] don't use host python, use host search paths for host compiler

2012-07-25 Thread Ezio Melotti
Ezio Melotti added the comment: The last changeset (7955d769fdf5) caused some problem on my machine. Before the changeset I was getting: Python build finished, but the necessary bits to build these modules were not found: _bz2 _curses_curses_panel _dbm

[issue15450] Allow dircmp.subdirs to behave well under subclassing

2012-07-25 Thread Chris Jerdonek
New submission from Chris Jerdonek : Currently, the subdirs attribute of filecmp.dircmp does not respect subclassing: >>> from filecmp import dircmp >>> class MyDirCmp(dircmp): ... pass ... >>> my_dcmp = MyDirCmp('dir1', 'dir2') >>> for item in my_dcmp.subdirs.values(): ... print(type(item)

[issue15269] Document dircmp.left and dircmp.right

2012-07-25 Thread Chris Jerdonek
Chris Jerdonek added the comment: Attaching a patch to address Eli's requests (1) and (2). Since this patch merely adds documentation and tests for existing functionality, is there any reason why this cannot go into Python 3.3? Thanks. -- Added file: http://bugs.python.org/file26516/

[issue15441] test_posixpath fails on Japanese edition of Windows

2012-07-25 Thread STINNER Victor
STINNER Victor added the comment: > haypo: how is this meant to fix the bug? > Won't it now cause a WindowsError, when a successful > operation is expected? Oh, I was referring to the new test proposed in the attached patch (issue15441.patch): +def test_chdir_invalid_filename(self): +

[issue15008] PEP 362 "Signature Objects" reference implementation

2012-07-25 Thread Yury Selivanov
Yury Selivanov added the comment: Benjamin: http://bugs.python.org/issue15151 -- nosy: +yselivanov ___ Python tracker ___ ___ Python-

[issue15436] __sizeof__ is not documented

2012-07-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: sys.getsizeof() is not for production code, it's for experimenting and getting information at the command prompt. It's quite useful when you know its limitations. I'd argue that implementing __sizeof__ for user types doesn't make much sense (except C extensi

[issue15436] __sizeof__ is not documented

2012-07-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: This may be CPython specific. Also, sys.getsizeof() hasn't proved to be very useful (I never see anyone use it or see it in production code). Worse, it doesn't even make sense in the case of shared-key dictionaries and whatnot. Accordingly, there is litt

[issue13538] Improve doc for str(bytesobject)

2012-07-25 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: +easy stage: -> needs patch type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list

[issue15320] thread-safety issue in regrtest.main()

2012-07-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, I've committed the patch to 3.2 and 3.3. I don't really want to bother with 2.7 (it's a rare enough issue). Thank you Chris! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: -Python 2.7 _

[issue15320] thread-safety issue in regrtest.main()

2012-07-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset d7a64e095930 by Antoine Pitrou in branch '3.2': Issue #15320: Make iterating the list of tests thread-safe when running tests in multiprocess mode. http://hg.python.org/cpython/rev/d7a64e095930 New changeset 43ae2a243eca by Antoine Pitrou in branc

[issue4712] Document pickle behavior for subclasses of dicts/lists

2012-07-25 Thread Ezio Melotti
Changes by Ezio Melotti : -- versions: +Python 3.2, Python 3.3, Python 3.4 -Python 2.6, Python 3.0, Python 3.1 ___ Python tracker ___

[issue14501] Error initialising BaseManager class with 'authkey' argument of string type.

2012-07-25 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +jnoller stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue13525] Tutorial: Example of Source Code Encoding triggers error

2012-07-25 Thread Ezio Melotti
Changes by Ezio Melotti : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Meador Inge
Meador Inge added the comment: On Wed, Jul 25, 2012 at 5:38 PM, Jesús Cea Avión wrote: > So the good old "int main(void)" behaviour is "undefined" :-) Actually the C Standard says that is OK. See 5.1.2.2.1 of ISO/IEC 9899:TC3. -- ___ Python track

[issue7593] Computed-goto patch for RE engine

2012-07-25 Thread Ezio Melotti
Changes by Ezio Melotti : -- versions: +Python 3.4 -Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Talking about this, anybody has an electronic version of C Standard to share with me, or should I hunt around the dark corners of Internet? :-) -- ___ Python tracker ___

[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: So the good old "int main(void)" behaviour is "undefined" :-) -- ___ Python tracker ___ ___ Python

[issue15320] thread-safety issue in regrtest.main()

2012-07-25 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks, Antoine. Just a note: with that other implementation I think the call to pending.close() would probably also warrant a lock since it appears close() can't be called either if a generator is already executing (granted that situation would be even rarer

[issue15008] PEP 362 "Signature Objects" reference implementation

2012-07-25 Thread Benjamin Peterson
Benjamin Peterson added the comment: Are we going to get documentation? -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python

[issue15441] test_posixpath fails on Japanese edition of Windows

2012-07-25 Thread Martin v . Löwis
Martin v. Löwis added the comment: haypo: how is this meant to fix the bug? Won't it now cause a WindowsError, when a successful operation is expected? -- ___ Python tracker __

[issue15441] test_posixpath fails on Japanese edition of Windows

2012-07-25 Thread STINNER Victor
STINNER Victor added the comment: decode_filename_mbcs.patch uses the "replace" error handler to decode the filename on Windows. It should solve the issue. -- Added file: http://bugs.python.org/file26515/decode_filename_mbcs.patch ___ Python tracker

[issue15209] Re-raising exceptions from an expression

2012-07-25 Thread Tyler Crompton
Tyler Crompton added the comment: As for the losing valuable debug information, much worse can be done: import sys try: x except NameError: print('An error occurred.', file=sys.stderr) sys.exit(1) This is obviously not how one should handle errors in development, but i

[issue15320] thread-safety issue in regrtest.main()

2012-07-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: I would have taken the "simpler" route myself (taking the lock around the next() call), that said it looks ok as it is to me. Do other people have an opinion? -- ___ Python tracker

[issue15320] thread-safety issue in regrtest.main()

2012-07-25 Thread Chris Jerdonek
Chris Jerdonek added the comment: Antoine, does the latest patch look okay to you, or did you want something even more minimal (e.g. by defining and acquiring the lock directly in main)? -- ___ Python tracker ___

[issue15431] Cannot build importlib.h on Windows

2012-07-25 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: shouldn't be too hard to add, I'll give it a go soon. -- ___ Python tracker ___ ___ Python-

[issue15449] Optional size argument for readline()

2012-07-25 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> works for me status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue15449] Optional size argument for readline()

2012-07-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, it does: http://docs.python.org/dev/library/io.html#io.IOBase.readline “readline(limit=-1) Read and return one line from the stream. If limit is specified, at most limit bytes will be read.” -- nosy: +pitrou ___

[issue15431] Cannot build importlib.h on Windows

2012-07-25 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +kristjan.jonsson, sbt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue12605] Enhancements to gdb 7 debugging hooks

2012-07-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Dave, test_gdb fails consistently on the ARM buildbot: == FAIL: test_threads (test.test_gdb.PyBtTests) Verify that "py-bt" indicates threads that are waiting for the GIL --

[issue15449] Optional size argument for readline()

2012-07-25 Thread Sworddragon
New submission from Sworddragon : For file objects the read() function has the optional size argument to limit the data that will be read. I'm wondering why there isn't such an argument for readline(). Theoretically lines in a file could have million of characters and even much more. An option

[issue15444] Incorrectly written contributor's names

2012-07-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: All names interpreted correctly except cyrillic (Alexander “Саша” Belopolsky and Марк Коренберг). I think it's just because of lack of some non-installed package (of course, Latex supports cyrillic). -- ___ Pytho

[issue15437] Merge Doc/ACKS.txt names into Misc/ACKS

2012-07-25 Thread Éric Araujo
Éric Araujo added the comment: We can just use :source:`Misc/ACKS` and it will created a link to hgweb (the colored HTML page, not the raw file). -- ___ Python tracker ___

[issue15444] Incorrectly written contributor's names

2012-07-25 Thread Ezio Melotti
Ezio Melotti added the comment: > Indeed, PDF rendering is important. OTOH, Latex T1 does support Ž. I tried to put a Ž directly in an rst source and indeed the pdf has been created correctly. -- ___ Python tracker

[issue15269] Document dircmp.left and dircmp.right

2012-07-25 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks a lot, Eli, and for the suggestions. I would be happy to prepare a full patch. Regarding the stream argument, I think there are other changes to dircmp that would be more useful (e.g. issue 12932), but I agree that some form of your suggestion makes

[issue15445] Ability to do code injection via logging module configuration listener port.

2012-07-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset f30b49a5072e by Vinay Sajip in branch '2.7': Issue #15445: Updated logging configuration documentation to highlight potential security risk posed by listen() in certain scenarios. http://hg.python.org/cpython/rev/f30b49a5072e New changeset e5d7d20

[issue14930] Make memoryview weakrefable

2012-07-25 Thread Stefan Krah
Stefan Krah added the comment: r75484 should be b595e1ad5722. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue15444] Incorrectly written contributor's names

2012-07-25 Thread Martin v . Löwis
Martin v. Löwis added the comment: Indeed, PDF rendering is important. OTOH, Latex T1 does support Ž. Untested, \v{Z} should generate that character. If this doesn't work, the build process needs to be fixed. -- ___ Python tracker

[issue15443] datetime module has no support for nanoseconds

2012-07-25 Thread Vincenzo Ampolo
Vincenzo Ampolo added the comment: Have a look to this python dev mailing list thread too: http://mail.python.org/pipermail/python-dev/2012-July/121123.html -- ___ Python tracker _

[issue15448] utimes() functions fail with ENOSYS even when detected by configure

2012-07-25 Thread Richard Moseley
New submission from Richard Moseley : When building on a ASUS Eee PC 1000 running the original Xandros O/S with libc-2.7-13, the various utimes() functions are being detected as available for use, everything compiles. However, during installation of the lib-dynload libraries, the error 'Error:

[issue14930] Make memoryview weakrefable

2012-07-25 Thread Stefan Krah
Stefan Krah added the comment: Sorry folks, I messed up the revisions when testing. This commit has nothing to do with the decreased coverage. Now I properly bisected and in r75481 mbuf_clear() and memory_clear() are still covered, but in r75484 they are not. r75484 addresses #1469629. I've go

[issue15437] Merge Doc/ACKS.txt names into Misc/ACKS

2012-07-25 Thread Martin v . Löwis
Martin v. Löwis added the comment: I don't think the docs should display Misc/ACKS. Instead, I propose the following wording "Many people have contributed to the Python language, the Python standard library, and the Python documentation. See Misc/ACKS in the Python source distribution for a

[issue15439] Include Misc/ACKS names into the documentation

2012-07-25 Thread Martin v . Löwis
Martin v. Löwis added the comment: OK, I propose to completely drop the Doc/ACKS.txt from the documentation, and replace it with the words "Many people have contributed to the Python language, the Python standard library, and the Python documentation. See Misc/ACKS in the Python source distr

[issue15439] Include Misc/ACKS names into the documentation

2012-07-25 Thread Ezio Melotti
Ezio Melotti added the comment: FWIW including Misc/ACKS in the doc will probably break the generation of the pdf version of the doc, since it contains non-latin1 characters (see msg166408). I don't think it's necessary to include the names in the doc. > I don't know how Doc ACKS is maintain

[issue15444] Incorrectly written contributor's names

2012-07-25 Thread Ezio Melotti
Ezio Melotti added the comment: Make sure that it's still possible to generate the pdf of the docs (with `make latex` and then `make all-pdf` in build/latex/). Latin1 should be fine, but IIRC non-latin1 will break (sorry Žiga). -- nosy: +ezio.melotti __

[issue15444] Incorrectly written contributor's names

2012-07-25 Thread Chris Jerdonek
Chris Jerdonek added the comment: To be clear on this issue's scope, I would state in a single comment a white list of which directories or individual files are being corrected (or if necessary, the rules to determine such a list, e.g. any file whose name root is "NEWS", etc). I would also r

[issue14930] Make memoryview weakrefable

2012-07-25 Thread Richard Oudkerk
Richard Oudkerk added the comment: Is it possible that the use of test.support.gc_collect() in test_memoryview made the difference? -- ___ Python tracker ___ __

[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Meador Inge
Meador Inge added the comment: While looking this up in the C Standard (ISO/IEC 9899:TC3) I also noticed 6.3.2.3p8: """ A pointer to a function of one type may be converted to a pointer to a function of another type and back again; the result shall compare equal to the original pointer. If a

[issue15447] A file is not properly closed by webbrowser._invoke

2012-07-25 Thread R. David Murray
R. David Murray added the comment: You could do it either way. Normally we prefer to have a test along with any fix; in this case adding a test involves adding the test module as well, but it is not different in principle. If you want to work on it and prefer to have it as a separate issue

[issue15438] Incredible issue in math.pow

2012-07-25 Thread Mark Dickinson
Mark Dickinson added the comment: > Wouldn't that reinforce the misconception that math is for arbitrary > precision number theoretical functions? Perhaps. We already have math.factorial, though; adding math.powmod wouldn't seem so much of a stretch. Just to be clear, I'm not seriously prop

[issue15438] Incredible issue in math.pow

2012-07-25 Thread Stefan Krah
Stefan Krah added the comment: Ramchandra Apte wrote: > > [+1 for removing pow from the builtins and shunting three-argument pow to > > the math module in Python 500.] > Anybody who uses pow with three is doing something mathematical and has most > likely imported math already. Wouldn't

[issue15447] A file is not properly closed by webbrowser._invoke

2012-07-25 Thread Anton Barkovsky
Anton Barkovsky added the comment: Adding a patch that uses subprocess.DEVNULL instead. Writing tests for webbrowser should be a separate issue, right? -- Added file: http://bugs.python.org/file26513/fileclose_devnull.patch ___ Python tracker

[issue12834] PyBuffer_ToContiguous() incorrect for non-contiguous arrays

2012-07-25 Thread Stefan Krah
Stefan Krah added the comment: Here's a patch for 3.3, which consists mostly of tests. A couple of points: o I removed the len > view->len check in PyBuffer_ToContiguous(), since the function is not documented and silently accepting output buffers that are too large seems unusual to m

[issue15447] A file is not properly closed by webbrowser._invoke

2012-07-25 Thread R. David Murray
R. David Murray added the comment: @Anton: That's what I was guessing. If we had a unit test in test_webbrowser that did the same thing, we'd have seen the resource warning when running the tests and fixed it. However, it looks like there aren't *any* tests for webbrowser, not even in test_

[issue15438] Incredible issue in math.pow

2012-07-25 Thread Ramchandra Apte
Ramchandra Apte added the comment: > [+1 for removing pow from the builtins and shunting three-argument pow to the > math module in Python 500.] Me too. Anybody who uses pow with to arguments can use arg1**arg2 Anybody who uses pow with three is doing something mathematical and has most li

[issue15447] A file is not properly closed by webbrowser._invoke

2012-07-25 Thread Ross Lagerwall
Ross Lagerwall added the comment: Are there any webbrowser unit tests? (this could probably use the new subprocess.DEVNULL constant in 3.3) -- nosy: +rosslagerwall ___ Python tracker _

[issue15447] A file is not properly closed by webbrowser._invoke

2012-07-25 Thread Anton Barkovsky
Anton Barkovsky added the comment: To clarify, I discovered this when I was simply running webbrowser.open in REPL. -- ___ Python tracker ___ ___

[issue15447] A file is not properly closed by webbrowser._invoke

2012-07-25 Thread Anton Barkovsky
Anton Barkovsky added the comment: The warning is printed by the file object when it closes itself in __del__: ResourceWarning: unclosed file <_io.TextIOWrapper name='/dev/null' mode='r+' encoding='UTF-8'> There isn't much to test, or is there? -- _

[issue15447] A file is not properly closed by webbrowser._invoke

2012-07-25 Thread R. David Murray
R. David Murray added the comment: Thanks. Is this warning printed by the webbrowser unit tests? If not can you see a way to add one that does? -- nosy: +r.david.murray ___ Python tracker __

[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Martin v . Löwis
Martin v. Löwis added the comment: Stefan: not sure whether raising this to python-dev really helps; see also msg42177, msg58196, issue1648268, and msg75239. Feel free to raise it, though. -- ___ Python tracker

[issue15447] A file is not properly closed by webbrowser._invoke

2012-07-25 Thread Anton Barkovsky
New submission from Anton Barkovsky : webbrowser._invoke opens /dev/null, never closes it and a warning is printed. I'm attaching a patch. The diff looks messy, but I'm just wrapping the code in a try-finally block, the rest is just indented. -- components: Library (Lib) files: fileclos

[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Martin v . Löwis
Martin v. Löwis added the comment: Jesús: this is a (common) mistake. Standard C makes it undefined behavior to call a function with an incorrect number of arguments, see 6.5.2.2p9 # If the function is defined with a type that is not compatible with the # type (of the expression) pointed to by

[issue15275] isinstance is called a more times that needed in ntpath

2012-07-25 Thread Ezio Melotti
Ezio Melotti added the comment: > I don't know about a decent way of doing benchmarks for the changes. > Any recommendation? You could make a script that uses the timeit module. >> If this patch is applied I think it would be good to change >> posixpath too. > I agree and I'd love to do it but

[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: I think that C standard actually documents the parameter order placement, so you can left out the last ones in the actual function definition. So, that this is working is not an accident, it is a C standard requirement. I think... -- __

[issue15424] __sizeof__ of array should include size of items

2012-07-25 Thread Ludwig Hähne
Ludwig Hähne added the comment: Revised the patch based on the discussion in issue #15402 (http://bugs.python.org/msg166372). It doesn't typecast the function anymore and instead casts to the array type inside the function. -- Added file: http://bugs.python.org/file26510/array_sizeof_

[issue15443] datetime module has no support for nanoseconds

2012-07-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: [Roundup's email interface again...] x = 86400.0 x == x + 1e-9 > False x == x + 1e-10 > False x == x + 1e-11 > False x == x + 1e-12 > True -- ___ Python tracker

[issue15443] datetime module has no support for nanoseconds

2012-07-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > On Wed, Jul 25, 2012 at 4:17 AM, Marc-Andre Lemburg > wrote: >> ... full C double precision for the time part of a timestamp, >> which covers nanoseconds just fine. > > No, it

[issue15446] Eval Recursion SIGSEGV

2012-07-25 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> stack overflow evaluating eval("()" * 3) title: Recursion SIGSEGV -> Eval Recursion SIGSEGV ___ Python tracker

[issue15443] datetime module has no support for nanoseconds

2012-07-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Marc-Andre Lemburg wrote: > >> Alexander Belopolsky added the comment: >> >> On Wed, Jul 25, 2012 at 4:17 AM, Marc-Andre Lemburg >> wrote: >>> ... full C double precision for the time part of a timestamp, >>> which covers nanoseconds just fine. >> >> No,

[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Stefan Krah
Stefan Krah added the comment: ""Everywhere" is nowhere close to the truth. There are tons of NOARGS functions which have the correct signature." When I started writing C-extensions, I used the PyObject *unused idiom. Then I saw Meador's version in so many places in the source tree that I assum

[issue15443] datetime module has no support for nanoseconds

2012-07-25 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Wed, Jul 25, 2012 at 4:17 AM, Marc-Andre Lemburg wrote: > ... full C double precision for the time part of a timestamp, > which covers nanoseconds just fine. No, it does not: >>> import time >>> t = time.time() >>> t + 5e-9 == t True In fact, C dou

[issue15445] Ability to do code injection via logging module configuration listener port.

2012-07-25 Thread Vinay Sajip
Vinay Sajip added the comment: I think it is sufficient for 2.7, 3.2 and 3.3 to just update the documentation, as Graham says, using "note" markup so that it stands out. I can look at ast.literal_eval as an option for 3.4. -- ___ Python tracker

[issue14930] Make memoryview weakrefable

2012-07-25 Thread Stefan Krah
Stefan Krah added the comment: A quick question: Prior to this patch test_memoryview.py exercised both mbuf_clear() and memory_clear(). Now gcov shows no coverage. Is this expected? Is it still possible to construct tests that exercise the code? --

[issue15402] Correct __sizeof__ support for struct

2012-07-25 Thread Mark Dickinson
Mark Dickinson added the comment: > The compiler has no chance to find out. You cast the pointer to > PyCFunction, telling the compiler that it really is a PyCFunction. True; I was thinking that the compiler should have the necessary information to warn about the suspicious (PyCFunction) cast.

[issue15363] Idle/tkinter ~x.py 'save as' fails. closes idle

2012-07-25 Thread Martin v . Löwis
Martin v. Löwis added the comment: I think this should apply to all systems, and I think the proper escaping is with "./", see TclpNativeSplitPath (in Tcl's source code). -- nosy: +loewis ___ Python tracker _

[issue15446] Recursion SIGSEGV

2012-07-25 Thread Arseniy
New submission from Arseniy : a=lambda:a print eval("a" + "()" * 99) -- components: None messages: 166378 nosy: senyai priority: normal severity: normal status: open title: Recursion SIGSEGV type: crash versions: Python 2.7, Python 3.3 ___ Python

  1   2   >