[issue9164] 2.7 sysconfig should handle arch duplicates while building universal on OS X
Jyrki Wahlstedt jyrki.wahlst...@wahlstedt.fi added the comment: The same line appears in Lib/distutils/util.py, line 148, and requires to be treated the same. These are the changes I had to make to get the build done for both 32- and 64-bit architectures. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9164 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9176] module termios doesn't build on HP-UX
Ronald Oussoren ronaldousso...@mac.com added the comment: Maybe. I don't know when I'll have time to research the issue though. The code looks correct and the HP-UX system headers do include the definition for the type of 'mode' but for some reason that definition doesn't get picked up. That's probably because some feature macro is set or isn't set. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9176 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9175] ctypes doesn't build on hp-ux
Ronald Oussoren ronaldousso...@mac.com added the comment: I don't think installing GCC will be possible on the machine I did the build on (for non-technical reasons). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9175 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9164] 2.7 sysconfig should handle arch duplicates while building universal on OS X
Ronald Oussoren ronaldousso...@mac.com added the comment: How do you build the univeral binary. I regularly build multiple arch builds using the builtin support for that (--enable-universalsdk=/ --enable-univeral-archs=3-way) and don't need a patch for that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9164 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9164] 2.7 sysconfig should handle arch duplicates while building universal on OS X
Ronald Oussoren ronaldousso...@mac.com added the comment: BTW. A cleaner replacement is: archs = tuple(sorted(set(archs))) (That is, sorted works on arbitrary iterables) Tarek: is using set() acceptable in the distutils sources? -- nosy: +tarek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9164 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9164] 2.7 sysconfig should handle arch duplicates while building universal on OS X
Marc-Andre Lemburg m...@egenix.com added the comment: sorted() and set() were introduced in Python 2.4. If your code will not run in Python 2.3 anyway, then using those should be fine. The only other place currently using set() is the MSVC9 compiler code. sorted() is not used at all in distutils. list.sort() should do the trick as well in your code - I'm not sure why you need a tuple for the args. Note that Python 2.3 did have the set type, however, it was only available through the sets module as Set. Using a conditional import from sets import Set as set for Python 2.3 would get you the set() builtin in Python 2.3 as well. -- nosy: +lemburg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9164 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9185] os.getcwd causes infinite loop on solaris
New submission from Zsolt Cserna zsolt.cse...@morganstanley.com: os.getcwd() causes infinite loop on solaris10 when the length of the current directory is greater than 1024 (them limit of the maximum absolute path). os.getcwd is implemented by a while loop in python, see the function posix_getcwd in posixmodule.c. That while loop loops forever because on solaris it sets errno to ERANGE and res to NULL - even if there will be no positive results from getcwd due to the extra long path. This infinite while cycle also causes eating up the memory. I think the solution would be implementing a hard limit for this while loop. It could be either fixed (16k for example), or dymanic: comparing the MAXPATHLEN macro to the size of the allocated buffer and if the size of the buffer is greater than MAXLPATHLEN then raise an OSError exception with the current errno. That bug was triggered by test_posix unittest. -- components: Library (Lib) messages: 109459 nosy: csernazs priority: normal severity: normal status: open title: os.getcwd causes infinite loop on solaris type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9185 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2636] Regexp 2.7 (modifications to current re 2.2.2)
Mark Summerfield m...@qtrac.eu added the comment: On the PyPI page: http://pypi.python.org/pypi/regex/0.1.20100706.1 in the Subscripting for groups bullet it gives this pattern: r(?before.*?)(?num\\d+)(?after.*) Shouldn't this be: r(?Pbefore.*?)(?Pnum\\d+)(?Pafter.*) Or has a new syntax been introduced? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2636 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2636] Regexp 2.7 (modifications to current re 2.2.2)
Mark Summerfield m...@qtrac.eu added the comment: If you do: import regex as re dir(re) you get over 160 items, many of which begin with an underscore and so are private. Couldn't __dir__ be reimplemented to eliminate them. (I know that the current re module's dir() also returns private items, but I guess this is a legacy of not having the __dir__ special method?) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2636 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9185] os.getcwd causes infinite loop on solaris
Zsolt Cserna zsolt.cse...@morganstanley.com added the comment: There would be also a solution to allocate a fix buffer with MAXLPATHLEN size and call the getcwd function only one time - if MAXLPATHLEN is available. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9185 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2636] Regexp 2.7 (modifications to current re 2.2.2)
Mark Summerfield m...@qtrac.eu added the comment: I was wrong about r(?name.*). It is valid in the new engine. And the PyPI docs do say so immediately _following_ the example. I've tried all the examples in Programming in Python 3 second edition using import regex as re and they all worked. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2636 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9185] os.getcwd causes infinite loop on solaris
Stefan Krah stefan-use...@bytereef.org added the comment: I've encountered this a while ago on OpenSolaris. According to the man page http://docs.sun.com/app/docs/doc/816-5168/getcwd-3c?a=view this would be a bug in getcwd(): ERANGE The size argument is greater than 0 and less than the length of the pathname plus 1. -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9185 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9185] os.getcwd causes infinite loop on solaris
Zsolt Cserna zsolt.cse...@morganstanley.com added the comment: You are right, but this bug could be easily avoided by using one of the suggested solutions. In my experience a fix sized buffer (whose size is MAXLPATHLEN - or 1024 if not defined) is usually passed to getcwd and the errno is propagated back to the caller if the result is NULL. While getcwd() is buggy on solaris I think it's not the correct behavior from python to get to an infinite loop and eat up the memory. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9185 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9185] os.getcwd causes infinite loop on solaris
Stefan Krah stefan-use...@bytereef.org added the comment: I agree that there should be a workaround. In py3k the function is implemented like you suggest. -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9185 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8400] zipimporter find_module fullname mis-documented
Ryan Kelly r...@rfk.id.au added the comment: Was also just bitten by this, trying to muck with PEP-302-style import hooks. Note that the documented behaviour of zipimporter is also the behaviour required by PEP 302, i.e. full dotted module name. -- nosy: +rfk ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8400 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9186] math.log1p(-1.0) produces OverflowError; should be ValueError
New submission from Mark Dickinson dicki...@gmail.com: from math import log1p log1p(-1.0) Traceback (most recent call last): File stdin, line 1, in module OverflowError: math range error This should be a ValueError instead. (Thanks Benjamin for noticing this.) -- assignee: mark.dickinson components: Extension Modules files: log1p_neg1.patch keywords: patch messages: 109468 nosy: benjamin.peterson, mark.dickinson priority: normal severity: normal status: open title: math.log1p(-1.0) produces OverflowError; should be ValueError type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file17893/log1p_neg1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9186 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9186] math.log1p(-1.0) produces OverflowError; should be ValueError
Changes by Mark Dickinson dicki...@gmail.com: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9186 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9187] Can't find file vcvars64.bat
New submission from Lloyd Sheng sen...@gmail.com: While I install Pymongo,Error shows that: running install running bdist_egg running egg_info writing pymongo.egg-info\PKG-INFO writing top-level names to pymongo.egg-info\top_level.txt writing dependency_links to pymongo.egg-info\dependency_links.txt reading manifest file 'pymongo.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'pymongo.egg-info\SOURCES.txt' installing library code to build\bdist.win-amd64\egg running install_lib running build_py running build_ext building 'pymongo._cbson' extension Traceback (most recent call last): File setup.py, line 176, in module doc: doc}) File C:\Python26\lib\distutils\core.py, line 152, in setup dist.run_commands() File C:\Python26\lib\distutils\dist.py, line 975, in run_commands self.run_command(cmd) File C:\Python26\lib\distutils\dist.py, line 995, in run_command cmd_obj.run() File C:\Python26\lib\site-packages\setuptools-0.6c11-py2.6.egg\setuptools\command\install.py, line 76, in run File C:\Python26\lib\site-packages\setuptools-0.6c11-py2.6.egg\setuptools\command\install.py, line 96, in do_egg_install File C:\Python26\lib\distutils\cmd.py, line 333, in run_command self.distribution.run_command(command) File C:\Python26\lib\distutils\dist.py, line 995, in run_command cmd_obj.run() File C:\Python26\lib\site-packages\setuptools-0.6c11-py2.6.egg\setuptools\command\bdist_egg.py, line 175, in run File C:\Python26\lib\site-packages\setuptools-0.6c11-py2.6.egg\setuptools\command\bdist_egg.py, line 161, in call_command File C:\Python26\lib\distutils\cmd.py, line 333, in run_command self.distribution.run_command(command) File C:\Python26\lib\distutils\dist.py, line 995, in run_command cmd_obj.run() File C:\Python26\lib\site-packages\setuptools-0.6c11-py2.6.egg\setuptools\command\install_lib.py, line 20, in run File C:\Python26\lib\distutils\command\install_lib.py, line 115, in build self.run_command('build_ext') File C:\Python26\lib\distutils\cmd.py, line 333, in run_command self.distribution.run_command(command) File C:\Python26\lib\distutils\dist.py, line 995, in run_command cmd_obj.run() File setup.py, line 108, in run build_ext.run(self) File C:\Python26\lib\distutils\command\build_ext.py, line 340, in run self.build_extensions() File C:\Python26\lib\distutils\command\build_ext.py, line 449, in build_extensions self.build_extension(ext) File setup.py, line 118, in build_extension build_ext.build_extension(self, ext) File C:\Python26\lib\distutils\command\build_ext.py, line 499, in build_extension depends=ext.depends) File C:\Python26\lib\distutils\msvc9compiler.py, line 449, in compile self.initialize() File C:\Python26\lib\distutils\msvc9compiler.py, line 359, in initialize vc_env = query_vcvarsall(VERSION, plat_spec) File C:\Python26\lib\distutils\msvc9compiler.py, line 275, in query_vcvarsall raise ValueError(str(list(result.keys( ValueError: [u'path'] There error info is same as Issue7511 . Here is info about my machine: OS: Windows Server 2008 R2(64bit) I have installed both VS2010 and VS2008 in my machine.But VS2010 intalled before VS2008. Also. I can found vcvars64.bat at dir:C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64, but i don't know why Python can't found it. There is a temporarily way to avoid the error ,we can manual execute vcvars64.bat before intall python module, But I think it's a python bug. -- components: Library (Lib) messages: 109469 nosy: Lloyd.Sheng priority: normal severity: normal status: open title: Can't find file vcvars64.bat versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9187 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3485] os.path.normcase documentation/behaviour unclear on Mac OS X
Ronald Oussoren ronaldousso...@mac.com added the comment: Note that this does not just affect MacOSX, this even affects Linux (although the behaviour on the default filesystems is different). On Linux the default is case-sensitive filesystems, but you can use network filesystems that have case-insensitive behavior, for example by using a CIFS share. This means that /mnt/myserver-share/foo/bar and /mnt/myserver-share/FOO/BAR may or may not refer to the same object: there aren't the same if /mnt/myserver-share is a regular Linux filesystem but will be when /mnt/myserver-share is a mount from a CIFS server. In short: os.path.normcase is hopelessly naive in its assumptions about system behavior. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3485 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9187] Can't find file vcvars64.bat
Stefan Krah stefan-use...@bytereef.org added the comment: There error info is same as Issue7511. Yes. Issue 7511 will be fixed at some point in distutils2. Closing this as a duplicate. -- nosy: +skrah resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - msvc9compiler.py: ValueError: [u'path'] type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9187 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8605] test_gdb can fail with compiler opts
Antoine Pitrou pit...@free.fr added the comment: Minor nit: given that final_opt is set to at the start of the loop, the first conditional in: if final_opt and final_opt != '-O0': appears to be redundant. I don't think it is (the empty string is false, but != -O0 is true). -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8605 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9188] test_gdb fails on narrow unicode builds
New submission from Antoine Pitrou pit...@free.fr: == FAIL: test_unicode (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of unicode values -- Traceback (most recent call last): File /home/antoine/cpython/27/Lib/test/test_gdb.py, line 247, in test_unicode self.assertGdbRepr(u\U0001D121) File /home/antoine/cpython/27/Lib/test/test_gdb.py, line 178, in assertGdbRepr self.assertEquals(gdb_repr, repr(val), gdb_output) AssertionError: Breakpoint 1 at 0x45cde8: file Objects/object.c, line 330. [Thread debugging using libthread_db enabled] Breakpoint 1, PyObject_Print (op=Traceback (most recent call last): File /home/antoine/cpython/27/python-gdb.py, line 1084, in to_string return pyop.get_truncated_repr(MAX_OUTPUT_LEN) File /home/antoine/cpython/27/python-gdb.py, line 183, in get_truncated_repr self.write_repr(out, set()) File /home/antoine/cpython/27/python-gdb.py, line 1054, in write_repr proxy2.append(unichr(code)) ValueError: unichr() arg not in range(0x1) (narrow Python build) , fp=0x77535780, flags=1) at Objects/object.c:330 330 return internal_print(op, fp, flags, 0); #0 PyObject_Print (op=Traceback (most recent call last): File /home/antoine/cpython/27/python-gdb.py, line 1084, in to_string return pyop.get_truncated_repr(MAX_OUTPUT_LEN) File /home/antoine/cpython/27/python-gdb.py, line 183, in get_truncated_repr self.write_repr(out, set()) File /home/antoine/cpython/27/python-gdb.py, line 1054, in write_repr proxy2.append(unichr(code)) ValueError: unichr() arg not in range(0x1) (narrow Python build) , fp=0x77535780, flags=1) at Objects/object.c:330 #1 0x00431744 in file_PyObject_Print (op=Traceback (most recent call last): File /home/antoine/cpython/27/python-gdb.py, line 1084, in to_string return pyop.get_truncated_repr(MAX_OUTPUT_LEN) File /home/antoine/cpython/27/python-gdb.py, line 183, in get_truncated_repr self.write_repr(out, set()) File /home/antoine/cpython/27/python-gdb.py, line 1054, in write_repr proxy2.append(unichr(code)) ValueError: unichr() arg not in range(0x1) (narrow Python build) , f=0x77fc1280, flags=1) at Objects/fileobject.c:110 #2 0x004369e2 in PyFile_WriteObject (v=Traceback (most recent call last): File /home/antoine/cpython/27/python-gdb.py, line 1084, in to_string return pyop.get_truncated_repr(MAX_OUTPUT_LEN) File /home/antoine/cpython/27/python-gdb.py, line 183, in get_truncated_repr self.write_repr(out, set()) File /home/antoine/cpython/27/python-gdb.py, line 1054, in write_repr proxy2.append(unichr(code)) ValueError: unichr() arg not in range(0x1) (narrow Python build) , f=file at remote 0x77fc1280, flags=1) at Objects/fileobject.c:2472 #3 0x004c9709 in PyEval_EvalFrameEx (f=Frame 0x9190f0, for file string, line 1, in module (), throwflag=0) at Python/ceval.c:1769 #4 0x004cfd36 in PyEval_EvalCodeEx (co=0x77fb8930, globals= {'__builtins__': module at remote 0x77fd2470, '__name__': '__main__', '__doc__': None, '__package__': None}, locals= {'__builtins__': module at remote 0x77fd2470, '__name__': '__main__', '__doc__': None, '__package__': None}, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3252 #5 0x004c5dc4 in PyEval_EvalCode (co=0x77fb8930, globals= {'__builtins__': module at remote 0x77fd2470, '__name__': '__main__', '__doc__': None, '__package__': None}, locals= {'__builtins__': module at remote 0x77fd2470, '__name__': '__main__', '__doc__': None, '__package__': None}) at Python/ceval.c:666 #6 0x00500a4c in run_mod (mod=0x903828, filename=0x5a1bbd string, globals= {'__builtins__': module at remote 0x77fd2470, '__name__': '__main__', '__doc__': None, '__package__': None}, locals= {'__builtins__': module at remote 0x77fd2470, '__name__': '__main__', '__doc__': None, '__package__': None}, flags=0x7fffdbc0, arena=0x8bc5f0) at Python/pythonrun.c:1346 #7 0x005008eb in PyRun_StringFlags (str=0x82a010 print u'\\U0001d121'\n, start=257, globals= {'__builtins__': module at remote 0x77fd2470, '__name__': '__main__', '__doc__': None, '__package__': None}, locals= {'__builtins__': module at remote 0x77fd2470, '__name__': '__main__', '__doc__': None, '__package__': None}, flags=0x7fffdbc0) at Python/pythonrun.c:1309 #8 0x004ff3f5 in PyRun_SimpleStringFlags (command=0x82a010 print u'\\U0001d121'\n, flags= 0x7fffdbc0) at Python/pythonrun.c:962 #9 0x004155a4 in Py_Main (argc=4, argv=0x7fffdd48) at Modules/main.c:543 #10 0x00414484 in main (argc=4, argv=0x7fffdd48) at ./Modules/python.c:23 -- components: Library (Lib), Tests messages: 109473 nosy:
[issue2636] Regexp 2.7 (modifications to current re 2.2.2)
Georg Brandl ge...@python.org added the comment: Mark, __dir__ as a special method only works when defined on types, so you'd have to use a module subclass for the regex module :) As I already suggested, it is probably best to move most of the private stuff into a separate module, and only import the really needed entry points into the regex module. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2636 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2744] Fix test_cProfile
Mark Lawrence breamore...@yahoo.co.uk added the comment: Is there anybody who can run with this as it's been in limbo for over two years? -- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2744 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4724] setting f_exc_traceback aborts in debug builds
Mark Lawrence breamore...@yahoo.co.uk added the comment: Anybody willing and able to run with this? -- nosy: +BreamoreBoy stage: - needs patch type: - crash versions: +Python 3.1, Python 3.2 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4724 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4928] Problem with tempfile.NamedTemporaryFile on Solaris 10
Mark Lawrence breamore...@yahoo.co.uk added the comment: Shouldn't this get looked at as it's high priority, albeit over a year old? -- nosy: +BreamoreBoy versions: +Python 3.1, Python 3.2 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4928 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8605] test_gdb can fail with compiler opts
Dave Malcolm dmalc...@redhat.com added the comment: Oops, my bad. Patch looks good as is. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8605 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4928] Problem with tempfile.NamedTemporaryFile on Solaris 10
Stefan Krah stefan-use...@bytereef.org added the comment: I can reproduce this on Ubuntu with Python 2.7 and 3.2. -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4928 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4928] Problem with tempfile.NamedTemporaryFile
Changes by Stefan Krah stefan-use...@bytereef.org: -- title: Problem with tempfile.NamedTemporaryFile on Solaris 10 - Problem with tempfile.NamedTemporaryFile ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4928 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9164] 2.7 sysconfig should handle arch duplicates while building universal on OS X
Tarek Ziadé ziade.ta...@gmail.com added the comment: Since there will be no standalone release of this code, no worries -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9164 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9189] Improve CFLAGS handling
New submission from Jeffrey Yasskin jyass...@gmail.com: Patch at http://codereview.appspot.com/1749042. The idea here is to let the user set CFLAGS on either configure or make (or both), and have later settings appear later in the $CC command line. I left OPT, BASECFLAGS, and EXTRA_CFLAGS around in case people have written scripts using them, but I think they're superfluous as user-visible knobs after this patch. I prevented AC_PROG_CC from setting a default $CFLAGS value because the values it would set are already put into $BASECFLAGS when appropriate, and @CFLAGS@ needs to appear after @BASECFLAGS@ to allow the user to override Python's defaults at configure time. We could also accomplish this by removing BASECFLAGS and OPT entirely and instead prepending their contents to $CFLAGS in configure. That's a bigger patch, but if any of you feel strongly about it I can do that instead. I made the same changes for CPPFLAGS and LDFLAGS but no other user-settable variables. I don't have strong opinions about the exact set we support this for, as long as it includes CFLAGS, but these three seemed like a sensible set. -- messages: 109481 nosy: brett.cannon, jyasskin, lemburg, loewis, pitrou priority: normal severity: normal status: open title: Improve CFLAGS handling versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9189 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9189] Improve CFLAGS handling
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9189 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9186] math.log1p(-1.0) produces OverflowError; should be ValueError
Mark Dickinson dicki...@gmail.com added the comment: Fixed in py3k in r82626. I'm going to leave this as a 'won't fix' for the maintenance branches, on the basis that the risk of breaking code by changing the exception type exceeds the benefit from the fix. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9186 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9190] Undefined behaviour in _PyFloat_Pack4
New submission from Mark Dickinson dicki...@gmail.com: _PyFloat_Pack4 does a double-to-float cast, without first checking that the value being converted is within the range of a float. According to C99 6.3.1.5p2, this results in undefined behaviour. It should be fixed (probably via comparison with FLT_MAX before casting.) np_float in the struct module also has this problem. -- assignee: mark.dickinson messages: 109483 nosy: mark.dickinson priority: normal severity: normal stage: needs patch status: open title: Undefined behaviour in _PyFloat_Pack4 type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9190 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue876421] logging handlers raise exception on level
Mickey Killianey mickey.killia...@gmail.com added the comment: Would you be willing to consider supporting the level keyword as a convenience for the most simple/common Handlers? (For example, maybe just StreamHandler and FileHandler?) -- nosy: +Mickey.Killianey ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue876421 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9146] Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if ssl imported before hashlib
Dave Malcolm dmalc...@redhat.com added the comment: Thanks. The relevant code in setup.py is all wrapped with --pydebug: if COMPILED_WITH_PYDEBUG or not have_usable_openssl: All of my testing had been --with-pydebug. Rebuilding without --with-pydebug leads to some interesting failures; as you say, if OpenSSL has md5 support disabled, this isn't going to work unless the _md5 module is manually enabled. Notes on some of the failures seen: $ OPENSSL_FORCE_FIPS_MODE=1 ./python Python 2.7.0+ (trunk:82622M, Jul 7 2010, 12:08:16) [GCC 4.4.3 20100422 (Red Hat 4.4.3-18)] on linux2 Type help, copyright, credits or license for more information. import md5 Traceback (most recent call last): File stdin, line 1, in module File /home/david/coding/python-svn/2.7-fips/Lib/md5.py, line 10, in module from hashlib import md5 File /home/david/coding/python-svn/2.7-fips/Lib/hashlib.py, line 136, in module globals()[__func_name] = __get_hash(__func_name) File /home/david/coding/python-svn/2.7-fips/Lib/hashlib.py, line 100, in __get_openssl_constructor return __get_builtin_constructor(name) File /home/david/coding/python-svn/2.7-fips/Lib/hashlib.py, line 71, in __get_builtin_constructor import _md5 ImportError: No module named _md5 import hashlib Traceback (most recent call last): File stdin, line 1, in module File /home/david/coding/python-svn/2.7-fips/Lib/hashlib.py, line 136, in module globals()[__func_name] = __get_hash(__func_name) File /home/david/coding/python-svn/2.7-fips/Lib/hashlib.py, line 100, in __get_openssl_constructor return __get_builtin_constructor(name) File /home/david/coding/python-svn/2.7-fips/Lib/hashlib.py, line 71, in __get_builtin_constructor import _md5 ImportError: No module named _md5 Changing: Index: Lib/hashlib.py === --- Lib/hashlib.py (revision 82622) +++ Lib/hashlib.py (working copy) @@ -134,7 +134,7 @@ # version not supporting that algorithm. try: globals()[__func_name] = __get_hash(__func_name) -except ValueError: +except (ValueError, ImportError): import logging logging.exception('code for hash %s was not found.', __func_name) indicates that it's just md5 that's not found, and enables import hashlib to work, albeit with a traceback upon import: ERROR:root:code for hash md5 was not found. Traceback (most recent call last): File /home/david/coding/python-svn/2.7-fips/Lib/hashlib.py, line 136, in module globals()[__func_name] = __get_hash(__func_name) File /home/david/coding/python-svn/2.7-fips/Lib/hashlib.py, line 100, in __get_openssl_constructor return __get_builtin_constructor(name) File /home/david/coding/python-svn/2.7-fips/Lib/hashlib.py, line 71, in __get_builtin_constructor import _md5 ImportError: No module named _md5 import md5 also then fails in an obscure way: import md5 Traceback (most recent call last): File stdin, line 1, in module File /home/david/coding/python-svn/2.7-fips/Lib/md5.py, line 10, in module from hashlib import md5 ImportError: cannot import name md5 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9146 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9191] winreg.c:Reg2Py() may leak memory (in unusual circumstances)
New submission from Daniel Stutzbach dan...@stutzbachenterprises.com: In Reg2Py() in winreg.c, in the REG_MULTI_SZ case, there's the following: wchar_t **str = (wchar_t **)malloc(sizeof(wchar_t *)*s); if (str == NULL) return PyErr_NoMemory(); However, not all of the return paths after that point call free(str). The leaking paths are pretty unusual, so I'm setting the priority to low. The leaking paths occur when PyList_New returns NULL or if the registry entry contains more than INT_MAX characters. Two other things I noticed and I'm not sure about: Is INT_MAX really the maximum number of characters for a Python unicode string? Should this be using PyMem functions instead of malloc/free? -- assignee: stutzbach components: Windows messages: 109486 nosy: stutzbach priority: low severity: normal stage: needs patch status: open title: winreg.c:Reg2Py() may leak memory (in unusual circumstances) type: resource usage versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9191 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9191] winreg.c:Reg2Py() may leak memory (in unusual circumstances)
Changes by Brian Curtin cur...@acm.org: -- nosy: +brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9191 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9192] Add a a way to determine float format
New submission from Benjamin Peterson benja...@python.org: At the moment, the only way is float.__getformat__() which is unpleasant and unofficial. Perhaps we could add a member to sys.float_info. -- components: Interpreter Core messages: 109488 nosy: benjamin.peterson, mark.dickinson priority: low severity: normal status: open title: Add a a way to determine float format type: feature request versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9192 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9193] Versioned .so files
New submission from Barry A. Warsaw ba...@python.org: As described in the thread started here: http://mail.python.org/pipermail/python-dev/2010-June/100998.html this bug requests that a new configure option called --with-so-abi-tag be added to Python 3.2 to support sharing of .so files for different versions of Python. -- assignee: barry components: Build keywords: patch messages: 109489 nosy: barry priority: normal severity: normal status: open title: Versioned .so files type: feature request versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9193 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9193] Versioned .so files
Changes by Barry A. Warsaw ba...@python.org: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9193 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9193] Versioned .so files
Barry A. Warsaw ba...@python.org added the comment: Attaching patch from live branch living here: https://code.edge.launchpad.net/~barry/python/sovers -- Added file: http://bugs.python.org/file17895/preview.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9193 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9193] Versioned .so files
Changes by Dave Malcolm dmalc...@redhat.com: -- nosy: +dmalcolm ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9193 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4928] Problem with tempfile.NamedTemporaryFile
Martin v. Löwis mar...@v.loewis.de added the comment: Unfortunately, I typically don't have time to consider the priority of issues. However, in the specific case, I also fail to see the bug. Where does it say that they are supposed to be deleted when the process is killed, and what mechanism specifically is supposed to actually perform the deletion? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4928 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4928] Problem with tempfile.NamedTemporaryFile
Jean-Paul Calderone exar...@twistedmatrix.com added the comment: I can't think of any way that you might be able to implement the behavior being requested here. Instead, if you don't want to leave files lying around, use TemporaryFile instead of NamedTemporaryFile. Perhaps the documentation for NamedTemporary file could be updated to explain this limitation, though. -- nosy: +exarkun ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4928 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4928] Problem with tempfile.NamedTemporaryFile
Martin v. Löwis mar...@v.loewis.de added the comment: I can't think of any way that you might be able to implement the behavior being requested here. Thanks for the confirmation; lowering the priority then. It would, of course, be possible to improve quality by registering an atexit handler. Which, of course, would be futile in case of a SIGKILL or system crash. -- priority: high - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4928 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5907] repr of time.struct_time type does not eval
Changes by Alexander Belopolsky belopol...@users.sourceforge.net: -- dependencies: +String interpolation doesn't work with sys.version_info ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5907 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9189] Improve CFLAGS handling
Brett Cannon br...@python.org added the comment: Just to say what I said in my Rietveld review of the patch: I support the approach Jeffrey is taking and the patch looks good. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9189 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8413] String interpolation doesn't work with sys.version_info
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: This is definitely the right way to do it. I expect that I will have only minor nit-picks as I go through the patch. 1. You can probably just do #define PyStructSequence_SET_ITEM PyTuple_SET_ITEM #define PyStructSequence_GET_ITEM PyTuple_GET_ITEM there is no need to repeat the argument lists. 2. I am comparing PyStructSequence_New and PyTuple_New: - PyStructSequence_New does not fill ob_item array with NULLs. - PyStructSequence_New does not call _PyObject_GC_TRACK I believe tp_free gets inherited, so structseq tp_new should follow what tuple's tp_new does. I am not 100% sure on the second point, though _PyObject_GC_TRACK may be redundant after PyObject_GC_NewVar. 3. In structseq_repr, do you need PyTuple_GetItem? I think you can get away with PyTuple_GET_ITEM, or better PyStructSequence_GET_ITEM. -- nosy: +belopolsky -Alexander.Belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8413 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9189] Improve CFLAGS handling
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9189 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9193] Versioned .so files
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9193 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8413] String interpolation doesn't work with sys.version_info
Benjamin Peterson benja...@python.org added the comment: 2010/7/7 Alexander Belopolsky rep...@bugs.python.org: Alexander Belopolsky belopol...@users.sourceforge.net added the comment: This is definitely the right way to do it. I expect that I will have only minor nit-picks as I go through the patch. 1. You can probably just do #define PyStructSequence_SET_ITEM PyTuple_SET_ITEM #define PyStructSequence_GET_ITEM PyTuple_GET_ITEM there is no need to repeat the argument lists. I think the preprocessor requires this. (Anyway it fails without.) 2. I am comparing PyStructSequence_New and PyTuple_New: - PyStructSequence_New does not fill ob_item array with NULLs. I'm not sure it really matters, since the fields should always be filled in, but I suppose it can't hurt... - PyStructSequence_New does not call _PyObject_GC_TRACK I believe tp_free gets inherited, so structseq tp_new should follow what tuple's tp_new does. I am not 100% sure on the second point, though _PyObject_GC_TRACK may be redundant after PyObject_GC_NewVar. This is only needed when doing freelist magic in tupleobject.c. 3. In structseq_repr, do you need PyTuple_GetItem? I think you can get away with PyTuple_GET_ITEM, or better PyStructSequence_GET_ITEM. Yeah, that's fine. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8413 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8413] String interpolation doesn't work with sys.version_info
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: On Wed, Jul 7, 2010 at 4:19 PM, Benjamin Peterson rep...@bugs.python.org wrote: - PyStructSequence_New does not fill ob_item array with NULLs. I'm not sure it really matters, since the fields should always be filled in, but I suppose it can't hurt... The following pattern is quite common: tuple = PyTuple_New(size): for (i = 0; i size; ++i) { item = create_item(...); if (item == NULL) goto fail; } ... fail: Py_DECREF(tuple); I don't think this should be outlawed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8413 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8413] String interpolation doesn't work with sys.version_info
Benjamin Peterson benja...@python.org added the comment: (New patch addresses review.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8413 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8413] String interpolation doesn't work with sys.version_info
Benjamin Peterson benja...@python.org added the comment: Applied in r82636. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8413 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8413] String interpolation doesn't work with sys.version_info
Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment: I would suggest to document changed behavior of string interpolation with sys.version_info and sys.getwindowsversion() in What’s New in Python 2.7 page and maybe What’s New In Python 3.1 page. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8413 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8413] String interpolation doesn't work with sys.version_info
Changes by Éric Araujo mer...@netwok.org: -- stage: unit test needed - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8413 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8413] String interpolation doesn't work with sys.version_info
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: This was a fantastic check-in. Thanks Benjamin. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8413 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1820] Enhance Object/structseq.c to match namedtuple and tuple api
Benjamin Peterson benja...@python.org added the comment: structseq now does subclass tuple, so if there's any interest in adding namedtuple APIs, now it should be easier. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1820 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: Uploaded issue5288.diff to Rietveld: http://codereview.appspot.com/1698050 -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5288 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4928] Problem with tempfile.NamedTemporaryFile
Antoine Pitrou pit...@free.fr added the comment: Where does it say that they are supposed to be deleted when the process is killed, Well, it is more of a natural expectation I guess. and what mechanism specifically is supposed to actually perform the deletion? That's not the kind of questions users ask themselves. If the process shutdown is greatful, either __del__ or a weakref callback is adequate. We probably can't do anything for brutal killings, though. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4928 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9189] Improve CFLAGS handling
Marc-Andre Lemburg m...@egenix.com added the comment: Jeffrey Yasskin wrote: New submission from Jeffrey Yasskin jyass...@gmail.com: Patch at http://codereview.appspot.com/1749042. The idea here is to let the user set CFLAGS on either configure or make (or both), and have later settings appear later in the $CC command line. I left OPT, BASECFLAGS, and EXTRA_CFLAGS around in case people have written scripts using them, but I think they're superfluous as user-visible knobs after this patch. Passing in user values to CFLAGS on configure should already work without the patch. I'm not sure why you'd want to modify CFLAGS on Makefile. I prevented AC_PROG_CC from setting a default $CFLAGS value because the values it would set are already put into $BASECFLAGS when appropriate, and @CFLAGS@ needs to appear after @BASECFLAGS@ to allow the user to override Python's defaults at configure time. We could also accomplish this by removing BASECFLAGS and OPT entirely and instead prepending their contents to $CFLAGS in configure. That's a bigger patch, but if any of you feel strongly about it I can do that instead. We've already had a long discussion about the use of AC_PROG_CC on another ticket. We are you trying to remove the default setting again ? BASECFLAGS is not supported by autoconf, it's a Python invention. Do you really want to put all the logic that autoconf uses to setup CFLAGS currently and in the future into our own configure code ? Are you willing to maintain that code ? We've also discussed switching the order of $(OPT) and $(CFLAGS): that doesn't work, since $(OPT) is meant to override the $(CFLAGS) settings. I made the same changes for CPPFLAGS and LDFLAGS but no other user-settable variables. I don't have strong opinions about the exact set we support this for, as long as it includes CFLAGS, but these three seemed like a sensible set. Some more comments: I don't really like the approach you've taken with the variable naming. It's better to stick to Makefile all caps standards and instead prepend Python specific variables with a PY or PY_ prefix. The already existing PY_CFLAGS should then be renamed to PY_RUNTIME_CFLAGS or just PYTHON_CFLAGS. Please also keep the default values for CFLAGS et al around, ie. CFLAGS = @CFLAGS@ PY_CFLAGS = $(BASECFLAGS) $(CFLAGS) $(OPT) $(EXTRA_CFLAGS) Note that using := will cause trouble with non-GNU makes. Why do you need this ? In summary: While we're breaking Makefile parsing anyway, we might as well go for the big patch and remove the whole BASECFLAGS, OPT and EXTRA_CFLAGS cruft. These cause all sorts of problem when building extensions for Python and not even distutils always gets them right (distutils needs to mimic the CFLAGS setup when setting up the compiler, so it has to replicate what's going on in the Makefile in distutils.utils.ccompiler.customize_compiler()). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9189 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- assignee: - amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5127 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2986] difflib.SequenceMatcher not matching long sequences
Vlastimil Brom vlastimil.b...@gmail.com added the comment: I guess, I am not supposed to post to python-dev - not being a python developer, hopefully it is appropriate to add a comment here - only based on my current usage of (a modified) difflib.SequenceMatcher. It seems, the mentions of text comparison in that thread, e.g. http://mail.python.org/pipermail/python-dev/2010-July/101515.html etc. rather imply line-by-line comparison, and possibly character comparison of matched lines. For me the direct character-wise comparison is more useful in most cases. With the popular heuristics disabled the results look pretty well. (the script only involves changing the background colour of the compared texts - based on the SequenceMatcher - get_opcodes() ) Just now, I only need to disable the popular check, currently I use a monkey-patched subclass of SequenceMatcher with extended signature and modified __chain_b function. cf. http://mail.python.org/pipermail/python-list/2010-June/1247907.html I would vote for extending the SequenceMatcher API to enable adjustments (leaving the default values as the current ones) - enable/disable popular check, set the thresholds for string length and popular frequency (and eventually other parameters, which might be added). Are there some restrictions on API changes in a library due to a moratorium - even if the default behaviour remains unchanged? Otherwise, what might be the disadvantages of this approach? If the current behaviour is considered appropriate for the original usecases, other uses would be also made possible/easier - only at the cost of learning the meaning of the added parameters - from the enhanced docs, of course. vbr -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2986 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: issue5288a.diff addressed comments from Rietveld. -- stage: unit test needed - commit review Added file: http://bugs.python.org/file17897/issue5288a.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5288 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Now I wonder whether it's reasonable to consider this character U+1 (LINEAR B SYLLABLE B008 A) as printable with repr(). Yes, its category is Lo, but is there a font which can display it? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5127 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)
Alexander Belopolsky belopol...@users.sourceforge.net added the comment: C code changes eliminating round-trips between timdelta and int offsets committed in r82642 and Python code changes committed to sandbox in r82641. Now the requested behavior change is easy and I am about +0.5 on relaxing the offset checks to allow seconds in the offsets and about +0.1 on removing the checks altogether and allowing arbitrary timedeltas even over 1 day. The only substantive question in my mind is how to handle printing in formats like %z which only provide 4 digits for UTC offset. Two options seem reasonable: a) truncate sub-minute offsets; and b) follow RFC 3339 recommendation and translate the time into the nearest whole-minute timezone. I am slightly is favor of (a), but this whole problem may be a reason to reject this RFE. -- keywords: +easy -patch priority: normal - low stage: commit review - unit test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5288 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2986] difflib.SequenceMatcher not matching long sequences
Changes by Terry J. Reedy tjre...@udel.edu: -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2986 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2986] difflib.SequenceMatcher not matching long sequences
Changes by Terry J. Reedy tjre...@udel.edu: -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2986 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9194] winreg:fixupMultiSZ should check that P Q in the inner loop
New submission from Daniel Stutzbach dan...@stutzbachenterprises.com: The comment before fixupMultiSZ and countString states: ** Note that fixupMultiSZ and countString have both had changes ** made to support incorrect strings. The registry specification ** calls for strings to be terminated with 2 null bytes. It seems ** some commercial packages install strings which don't conform, ** causing this code to fail - however, regedit etc still work ** with these strings (ie only we don't!). As indicated in the comments, the two functions dutifully check the supplied length parameter and do not trust the data to be in the correct format. ... except for the inner loop in fixupMultiSZ, which reads: for(; *P != '\0'; P++) ; It should be the same as the inner loop of countStrings: for (; P Q *P != '\0'; P++) ; -- messages: 109511 nosy: stutzbach priority: normal severity: normal status: open title: winreg:fixupMultiSZ should check that P Q in the inner loop versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9194 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9189] Improve CFLAGS handling
Jeffrey Yasskin jyass...@gmail.com added the comment: Passing in user values to CFLAGS on configure should already work without the patch. Since the user's CFLAGS settings are overridden by Python's OPT settings, it doesn't already work without the patch. I'm not sure why you'd want to modify CFLAGS on Makefile. If I run `make clean; make CFLAGS=-Werror`, I expect that to add -Werror to the compilation line. I don't expect it to replace all of the flags configure set up, and I don't expect to have to re-run configure to add the -Werror. Doing this won't affect distutils' behavior and won't automatically cause all of Python to get recompiled, so it's not something people should do when installing Python, but it's helpful during development. We've already had a long discussion about the use of AC_PROG_CC on another ticket. We are you trying to remove the default setting again ? BASECFLAGS is not supported by autoconf, it's a Python invention. Do you really want to put all the logic that autoconf uses to setup CFLAGS currently and in the future into our own configure code ? Are you willing to maintain that code ? Given that AC_PROG_CC, in its entire history, has only grown the ability to check for -g and -O2, I'm not too worried. Our configure code already uses $ac_cv_prog_cc_g to take advantage of AC_PROG_CC's detection of -g, and we have more sophisticated logic around -O2 than it does. (Check the configure source if you don't believe that AC_PROG_CC's CFLAGS handling is pretty simple.) We've also discussed switching the order of $(OPT) and $(CFLAGS): that doesn't work, since $(OPT) is meant to override the $(CFLAGS) settings. It's meant to override AC_PROG_CC's bad CFLAGS settings. Once those are out of the way, we don't need to surprise users with a non-working CFLAGS anymore. I made the same changes for CPPFLAGS and LDFLAGS but no other user-settable variables. I don't have strong opinions about the exact set we support this for, as long as it includes CFLAGS, but these three seemed like a sensible set. Some more comments: I don't really like the approach you've taken with the variable naming. It's better to stick to Makefile all caps standards and instead prepend Python specific variables with a PY or PY_ prefix. The already existing PY_CFLAGS should then be renamed to PY_RUNTIME_CFLAGS or just PYTHON_CFLAGS. Sure. Please also keep the default values for CFLAGS et al around, ie. CFLAGS = @CFLAGS@ PY_CFLAGS = $(BASECFLAGS) $(CFLAGS) $(OPT) $(EXTRA_CFLAGS) This doesn't quite work, since the make command line overrides that CFLAGS assignment. I've saved the configure-provided values into CONFIGURE_CFLAGS, etc. Note that using := will cause trouble with non-GNU makes. Why do you need this ? http://www.openbsd.org/cgi-bin/man.cgi?query=make and http://www.freebsd.org/doc/en/books/pmake/variables.html say bsd make supports :=. I'm not sure where to find docs for other makes. I don't need := anymore, though, since I found another way to fix sysconfig. Removed. In summary: While we're breaking Makefile parsing anyway, we might as well go for the big patch and remove the whole BASECFLAGS, OPT and EXTRA_CFLAGS cruft. These cause all sorts of problem when building extensions for Python and not even distutils always gets them right (distutils needs to mimic the CFLAGS setup when setting up the compiler, so it has to replicate what's going on in the Makefile in distutils.utils.ccompiler.customize_compiler()). Makefile parsing isn't the only thing we care about compatibility with. I kept them around for people who've been setting them through build scripts or who are just used to setting them on the command line. Maybe they should go away too, but I think that's orthogonal to this patch, and should happen with a lag (maybe a whole release) to let people get used to CFLAGS first. That is, unless you can point out practical problems with the change around AC_PROG_CC. I've uploaded the new patch to http://codereview.appspot.com/1749042. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9189 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9194] winreg:fixupMultiSZ should check that P Q in the inner loop
Changes by Ezio Melotti ezio.melo...@gmail.com: -- components: +Extension Modules, Windows nosy: +brian.curtin stage: - unit test needed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9194 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c
Ezio Melotti ezio.melo...@gmail.com added the comment: Given that '\U0001'.isprintable() returns True, I would say yes. If someone needs to print this char and has an appropriate font to do it, I don't see why it shouldn't work. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5127 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9189] Improve CFLAGS handling
Changes by Ronald Oussoren ronaldousso...@mac.com: -- nosy: +ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9189 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com