[issue14284] unicodeobject error on macosx in build process
New submission from Hervé Coatanhay herve.coatan...@gmail.com: On a fresh install from mercurial on macosx. ./python -SE -m sysconfig --generate-posix-vars Could not find platform dependent libraries exec_prefix Consider setting $PYTHONHOME to prefix[:exec_prefix] Assertion failed: (compact-utf8_length == 0), function _PyUnicode_CheckConsistency, file Objects/unicodeobject.c, line 369. make: *** [Lib/_sysconfigdata.py] Abort trap: 6 This is reproduced with the following mercurial changesets: changeset reproduced 368a5d7d8a15no (3.2 branch) fafe12f2a030no (3.2 branch) 4a5eafcdde11yes 6b8dd7724ec0yes 0df295d590a8yes 7e576ad85663yes (tip on default) When compiled with pydebug I've got the following in gdb: #0 0x7fff86c0282a in __kill () #1 0x7fff8e61aa9c in abort () #2 0x7fff8e64d5de in __assert_rtn () #3 0x0001000d5589 in _PyUnicode_CheckConsistency (op=0x101024c40, check_content=0) at unicodeobject.c:369 #4 0x0001000df567 in unicode_dealloc (unicode=0x101024c40) at unicodeobject.c:1503 #5 0x00010009f025 in _Py_Dealloc (op=0x101024c40) at object.c:1765 #6 0x00010019df6a in decode_unicode (c=0x7fff5fbf6d58, s=0x10087cc36 ois Pinard]\n\nHeaps are arrays for which a[k] = a[2*k+1] and a[k] = a[2*k+2] for\nall k, counting elements from 0. For the sake of comparison,\nnon-existing elements are considered to be infinite. Th..., len=4720, rawmode=0, encoding=0x1002c6710 utf-8) at ast.c:3759 #7 0x00010019e3c6 in parsestr (c=0x7fff5fbf6d58, n=0x10103a118, bytesmode=0x7fff5fbf6944) at ast.c:3829 #8 0x00010019e839 in parsestrplus (c=0x7fff5fbf6d58, n=0x10103a0d0, bytesmode=0x7fff5fbf6944) at ast.c:3874 #9 0x00010019597a in ast_for_atom (c=0x7fff5fbf6d58, n=0x10103a0d0) at ast.c:1869 #10 0x00010019744d in ast_for_power (c=0x7fff5fbf6d58, n=0x10103a088) at ast.c:2228 #11 0x000100197fa6 in ast_for_expr (c=0x7fff5fbf6d58, n=0x10103a088) at ast.c:2428 #12 0x000100198a11 in ast_for_testlist (c=0x7fff5fbf6d58, n=0x1007c1c90) at ast.c:2584 #13 0x000100198fbe in ast_for_expr_stmt (c=0x7fff5fbf6d58, n=0x10048b868) at ast.c:2680 #14 0x00010019d248 in ast_for_stmt (c=0x7fff5fbf6d58, n=0x10048b868) at ast.c:3600 #15 0x000100191530 in PyAST_FromNode (n=0x10048b280, flags=0x7fff5fbf6f60, filename=0x100794ee0 /Users/herve/Documents/workspace/mercurial_repository/python-vanilla/Lib/heapq.py, arena=0x10051f8f0) at ast.c:760 #16 0x00010021b86f in PyParser_ASTFromFile (fp=0x7fff77c75140, filename=0x100794ee0 /Users/herve/Documents/workspace/mercurial_repository/python-vanilla/Lib/heapq.py, enc=0x0, start=257, ps1=0x0, ps2=0x0, flags=0x7fff5fbf6f60, errcode=0x0, arena=0x10051f8f0) at pythonrun.c:1982 #17 0x0001001f6d04 in parse_source_module (pathname=0x1007a5320, fp=0x7fff77c75140) at import.c:1186 #18 0x0001001f822d in load_source_module (name=0x1007bd178, pathname=0x1007a5320, fp=0x7fff77c75140) at import.c:1509 #19 0x0001001fd345 in load_module (name=0x1007bd178, fp=0x7fff77c75140, pathname=0x1007a5320, type=1, loader=0x0) at import.c:2477 #20 0x0001002011f7 in import_submodule (mod=0x100340f80, subname=0x1007bd178, fullname=0x1007bd178) at import.c:3338 #21 0x0001001ffb97 in load_next (mod=0x100340f80, altmod=0x100340f80, inputname=0x1007bd178, p_outputname=0x7fff5fbf7350, p_prefix=0x7fff5fbf7338) at import.c:3149 #22 0x0001001fe5c7 in import_module_level (name=0x1007bd178, globals=0x10077cbe8, locals=0x10077cbe8, fromlist=0x100340f80, level=0) at import.c:2842 #23 0x0001001feb00 in PyImport_ImportModuleLevelObject (name=0x1007bd178, globals=0x10077cbe8, locals=0x10077cbe8, fromlist=0x100340f80, level=0) at import.c:2904 #24 0x00010019fd85 in builtin___import__ (self=0x100607420, args=0x10079e9f0, kwds=0x0) at bltinmodule.c:195 #25 0x000100096214 in PyCFunction_Call (func=0x100607510, arg=0x10079e9f0, kw=0x0) at methodobject.c:84 #26 0x000100010656 in PyObject_Call (func=0x100607510, arg=0x10079e9f0, kw=0x0) at abstract.c:2150 #27 0x0001001c597d in PyEval_CallObjectWithKeywords (func=0x100607510, arg=0x10079e9f0, kw=0x0) at ceval.c:3932 #28 0x0001001ba572 in PyEval_EvalFrameEx (f=0x10052f5d0, throwflag=0) at ceval.c:2332 #29 0x0001001c3681 in PyEval_EvalCodeEx (_co=0x1007b9dc0, globals=0x10077cbe8, locals=0x10077cbe8, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at ceval.c:3426 #30 0x0001001aaf0b in PyEval_EvalCode (co=0x1007b9dc0, globals=0x10077cbe8, locals=0x10077cbe8) at ceval.c:771 #31 0x0001001f2d62 in PyImport_ExecCodeModuleObject (name=0x10077b9e0, co=0x1007b9dc0, pathname=0x10060ed60, cpathname=0x10060ed60) at import.c:868 #32 0x0001001f820e in load_source_module (name=0x10077b9e0, pathname=0x1004bbbf8, fp=0x7fff77c750a8) at import.c:1505 #33 0x0001001fd345 in load_module (name=0x10077b9e0, fp=0x7fff77c750a8, pathname=0x1004bbbf8, type=1, loader=0x0) at
[issue14284] unicodeobject error on macosx in build process
Ezio Melotti ezio.melo...@gmail.com added the comment: See #13241. -- nosy: +ezio.melotti resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14284 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14285] Traceback wrong on ImportError while executing a package
New submission from Marc Schlaich marc.schla...@googlemail.com: It is very simple to reproduce this error. There is an executable package: package/ __init__.py __main__.py The __init__ imports a missing module: import missing_module And the __main__ imports from it: from . import missing_module Now I get the following output which is not what I am expecting: C:\Python27\python.exe: No module named missing_module; 'package' is a package and cannot be directly executed -- messages: 155574 nosy: ms4py priority: normal severity: normal status: open title: Traceback wrong on ImportError while executing a package type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14285 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14257] minor error in glossary wording regarding __hash__
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 0f146020d8e9 by Senthil Kumaran in branch '3.2': closes issue14257 - Grammatical fix http://hg.python.org/cpython/rev/0f146020d8e9 New changeset c5833f277258 by Senthil Kumaran in branch 'default': closes issue14257 - Grammatical fix http://hg.python.org/cpython/rev/c5833f277258 New changeset f3c8bdbe2cf3 by Senthil Kumaran in branch '2.7': closes issue14257 - Grammatical fix http://hg.python.org/cpython/rev/f3c8bdbe2cf3 -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14257 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14246] Accelerated ETree XMLParser cannot handle io.StringIO
Stefan Behnel sco...@users.sourceforge.net added the comment: FWIW, lxml also has support for parsing Unicode strings. It doesn't encode the input, however, but parses straight from the underlying buffer (after detecting the buffer layout etc. at module init time - and yes, I still haven't fixed this up for PEP393). There is one problem that I see with encoding it to UTF-8 first, even disregarding the obvious inefficiency in terms of both memory and processing time. At least for string parsing, lxml has an additional check in place that rejects Unicode string input containing an encoding declaration, because that would be very unlikely to match the buffer encoding on a given platform. In your case, it would be good to have something similar, because when you get a Unicode string with, say, an ISO8859-1 encoding declaration, encoding it to UTF-8 and then passing that to pyexpat will silently generate incorrect content - unless you can safely enforce a specific encoding regardless of the declaration, don't know how expat handles this (you are clearly not handling it in your patch, which, I take it, only adapts the behaviour to what pyET currently does). The problem here is that it's not so easy to do this for file-like objects, because they may return text that contains ?xml version='1.0', then a billion whitespace characters, and then encoding='latin1'?. The XML parser could handle this, but doing it in a preprocessing step would be some work. In any case, silently returning broken data is not a good idea. Maybe it would work to check the encoding that the parser uses against the one we expect? If the parser switches encodings at some point even though we are sure it *must* be utf-8 (in whatever spelling), we can still raise an error at that point. I'll consider letting lxml do this check as well, it sounds more efficient than what it currently does. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14246 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5758] fileinput.hook_compressed returning bytes from gz file
Tatiana Al-Chueyr tatiana.alchu...@gmail.com added the comment: Improved patch, according to eric.araujo's suggestions and mnewman's guidance. -- Added file: http://bugs.python.org/file24815/issue5758_fileinput_gzip_with_encoding_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5758 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12890] cgitb displays p tags when executed in text mode
Jeff McNeil j...@jmcneil.net added the comment: Did this ever get committed? Is there anything left for me to do here? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12890 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14246] Accelerated ETree XMLParser cannot handle io.StringIO
Eli Bendersky eli...@gmail.com added the comment: Stefan, Thanks a lot for taking the time to review the patch. As you correctly say, the current pathch's goal is just to align with existing behavior in the Python implementation of ET. I understand the problem you are describing, but at least it's not a regression vs. previous behavior, while the original problem this issue complains about *is* a regression. I propose to commit this to fix the regression and open a separate issue with the insight you provided. One easy solution could be to just require the encoding to be UTF-8 when passing unicode to the module, and to document it explicitly. Another solution would be to actually fix it in the module itself. If there is a decision to fix it, the fix should then cover both the C and Python implementations, in all possible places (all functions reading XML from strings will also suffer from the same problem, since they get passed to xmlparse_Parse in pyexpat, which just uses PyArg_ParseTuple with the s# format - encoding unicode in utf-8 without looking at the XML encoding itself). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14246 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1666318] shutil.copytree doesn't give control over directory permissions
Jeff McNeil j...@jmcneil.net added the comment: I made the change suggested in the last comment, patch is attached. Trying to clean up any bugs I've got my name on! -- keywords: +patch Added file: http://bugs.python.org/file24816/makedirs_function.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1666318 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14281] Add unit test for cgi.escape method
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 757afb3af762 by Senthil Kumaran in branch '2.7': Fix closes Issue14281 - Test for cgi.escape by Brian Landers http://hg.python.org/cpython/rev/757afb3af762 New changeset 13922f6d87f2 by Senthil Kumaran in branch '3.2': 3.2 - Fix closes Issue14281 - Test for cgi.escape by Brian Landers http://hg.python.org/cpython/rev/13922f6d87f2 New changeset 70712a806bdb by Senthil Kumaran in branch 'default': merge to 3.3 - Fix closes Issue14281 - Test for cgi.escape by Brian Landers http://hg.python.org/cpython/rev/70712a806bdb -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14281 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12365] URLopener should support context manager protocol
Jeff McNeil j...@jmcneil.net added the comment: Documentation patch to outline the use of context manager protocol attached. Trying to cleanup any bugs with my name on them. -- keywords: +patch Added file: http://bugs.python.org/file24817/urllib_request_doc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12365 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10050] urllib.request still has old 2.x urllib primitives
Changes by Jeff McNeil j...@jmcneil.net: -- nosy: -mcjeff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10050 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14262] Allow using decimals as arguments to `timedelta`
STINNER Victor victor.stin...@gmail.com added the comment: The PEP 410 was rejected. See also the issue #13882. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14262 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14273] distutils2: logging handler not properly initialized
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: I cannot reproduce this, and in fact couldn't find anywhere in packaging in the default branch where a distutils2 logger is set up. I used grep to look for getLogger.*(distutils2|__name__), could some other logic be in use to construct the logger name? Looking at packaging.run.main() - it calls Dispatcher(args), and any exception in Dispatcher.__init__() before the call to _set_logger could lead to a logging call being made before a handler is set up. Suggestion: set the handler as early as possible, perhaps in main() where the other handlers logic is, and just set the level later (as that is the only thing that depends on verbosity settings passed in via command line flags). A couple of things I don't quite understand: 1. Why are the packaging logger's handlers are saved and restored en masse - all that is happening is that a handler is being added in Dispatcher._set_logger, so it would seem to be enough to call removeHandler(). 2. There should normally be no need to set both the logger's *and* and handler's level to the same value - if the event fails the logger's level test, it will not be passed to handlers anyway. In packaging code I found no reference to any other loggers than packaging - i.e. no child loggers whose events might need to be blocked at the handler level. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14273 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1429] FD leak in SocketServer
Jeff McNeil j...@jmcneil.net added the comment: In an effort to walk through bugs in my nosy list, I dug into this and tried to reproduce it to no avail. Also, as the handle_error method is supposed to handle problems gracefully, calling shutdown on handle_error exception is probably questionable. I'd be happy to submit a patch to do just that if those smarter than I think it is worthwhile, but I don't so much believe it is. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1429 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14272] ast.c: windows compile error
Stefan Krah stefan-use...@bytereef.org added the comment: Looks fixed in 6bee4eea1efa. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14272 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14262] Allow using decimals as arguments to `timedelta`
Ram Rachum r...@rachum.com added the comment: I'm not proposing that `timedelta` will use `Decimal` internally, but that it would handle the conversion to `float` itself, instead of the user having to do it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14262 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14286] xxlimited.obj: unresolved external symbol __imp__PyObject_New
New submission from Stefan Krah stefan-use...@bytereef.org: Linking fails on Windows 64-bit. Perhaps Py_LIMITED_API ifdefs are missing. Creating library C:\Users\stefan\hg\cpython\PCbuild\\amd64\\xxlimited.lib and object C:\Users\stefan\hg\c python\PCbuild\\amd64\\xxlimited.exp xxlimited.obj : error LNK2001: unresolved external symbol __imp__PyObject_New xxlimited.obj : error LNK2001: unresolved external symbol __imp_PyType_FromSpec xxlimited.obj : error LNK2001: unresolved external symbol __imp_PyDict_New xxlimited.obj : error LNK2001: unresolved external symbol __imp_PyDict_DelItemString xxlimited.obj : error LNK2001: unresolved external symbol __imp_PyDict_GetItem xxlimited.obj : error LNK2001: unresolved external symbol __imp_PyObject_GenericGetAttr xxlimited.obj : error LNK2001: unresolved external symbol __imp_PyUnicode_Type xxlimited.obj : error LNK2001: unresolved external symbol __imp_PyExc_AttributeError xxlimited.obj : error LNK2001: unresolved external symbol __imp__Py_NoneStruct xxlimited.obj : error LNK2001: unresolved external symbol __imp_PyArg_ParseTuple xxlimited.obj : error LNK2001: unresolved external symbol __imp__Py_NotImplementedStruct xxlimited.obj : error LNK2001: unresolved external symbol __imp_PyObject_Free xxlimited.obj : error LNK2001: unresolved external symbol __imp_PyErr_SetString xxlimited.obj : error LNK2001: unresolved external symbol __imp_PyModule_Create2 xxlimited.obj : error LNK2001: unresolved external symbol __imp_PyErr_NewException xxlimited.obj : error LNK2001: unresolved external symbol __imp_PyLong_FromLong xxlimited.obj : error LNK2001: unresolved external symbol __imp_PyBaseObject_Type xxlimited.obj : error LNK2001: unresolved external symbol __imp_PyType_GenericNew xxlimited.obj : error LNK2001: unresolved external symbol __imp_PyModule_AddObject xxlimited.obj : error LNK2001: unresolved external symbol __imp_PyDict_SetItemString C:\Users\stefan\hg\cpython\PCbuild\\amd64\\xxlimited.pyd : fatal error LNK1120: 20 unresolved externals -- components: Build messages: 155588 nosy: brett.cannon, skrah priority: normal severity: normal stage: needs patch status: open title: xxlimited.obj: unresolved external symbol __imp__PyObject_New type: compile error versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14286 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1762561] unable to serialize Infinity or NaN on ARM using marshal
Nir Soffer nir...@gmail.com added the comment: As someone who has to develop on ARM OABI, I find this won't fix policy rather frustrating. If you happen to need this patch on 2.7, this is the same patch as arm-float2.diff, which can be applied cleanly to release 2.7.2. Changes from arm-float2.diff: - Remove whitespace only changes - Replace tabs with spaces - Fixed indentation in changed code Enjoy. -- nosy: +nirs Added file: http://bugs.python.org/file24818/arm-oabi-float-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1762561 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13889] str(float) and round(float) issues with FPU precision
Stefan Krah stefan-use...@bytereef.org added the comment: I've looked at the latest patch: It seems that new_387controlword is not set if old_387controlword already has the desired precision and rounding mode. Attached is a revised patch that uses the same logic as the Linux version. A couple of remarks: - It would be possible to negate (_PC_53|_RC_NEAR) instead of enumerating (_MCW_DN|_MCW_EM|_MCW_IC). I found it nice to see all possibilities listed. - Technically we might need to use #pragma fenv_access (on). I'm not sure where though: If it is set in pyport.h, VS complains that Py_MATH_PI / 180.0 is not constant. The patch is tested on win32/x64. Additionally, the patch is tested with setting the rounding mode to _PC_64 in main.c. Then, the patch is tested with replacing the 'if' bodies by 'abort()'. This shows that in the regular build (_PC_53 on startup) the bodies of the if statements are never executed. Finally, inserting an #error after #if defined(_MSC_VER) !defined(_WIN64) on the x64 build shows that !defined(_WIN64) really does its job. -- Added file: http://bugs.python.org/file24819/issue13889.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13889 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows
Éric Araujo mer...@netwok.org added the comment: The proposition of using other C functions and changing the bdist_wininst code looks risky to me, especially as I don’t know how compatibility would be affected (see my previous message). We are free to improve the wininst code in distutils2, or discuss a replacement (Jeremy Kloth was working on something with all the features of MSI and wininst), but for distutils I would very much prefer the simplest fix that could possibly works. bdist_msi decodes data read from setup.py with MBCS on Windows; on other OSes, couldn’t the locale preferred encoding be used? -- priority: high - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10945 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8954] wininst regression: errors when building on linux
Éric Araujo mer...@netwok.org added the comment: Sean: In msg135902 I am merely explaining why I removed 2.6 from the list of versions. Only 2.7, 3.2 and 3.3 can get fixed. If you look at my previous message or the list of dependencies, you can see that #10945 needs to be fixed first before I can review the patch provided for this issue. -- components: +Distutils2 nosy: +alexis priority: critical - normal versions: +3rd party, Python 3.3 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8954 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14260] re.groupindex available for modification and continues to work, having incorrect data inside it
Éric Araujo mer...@netwok.org added the comment: I can get code from anywhere I am afraid I don’t understand. Could you start again and explain what bug you ran into, i.e. what behavior does not match what the docs say? At present this report looks like it is saying “when I put random things in an internal data structures then bad things happen”, and I don‘t think Python promises to not break when people do random editions to internal data structures. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14260 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14282] lib2to3.fixer_util.touch_import('__future__', ...) can lead to SyntaxError in code
Martin v. Löwis mar...@v.loewis.de added the comment: I think that's actually a bug in python-modernize, not in touch_import - or, rather, touch_import shouldn't be used to add future imports. Instead, I think there should be a touch_future function which adds a future import, taking into account that future imports need to go before all other imports, but after a possible docstring. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14282 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5758] fileinput.hook_compressed returning bytes from gz file
Éric Araujo mer...@netwok.org added the comment: Thanks. Unless another core dev wants to do a complementary review I will slightly tweak the patch and commit it. I need to finish waking up and eat some food before I do that :) Technically adding a new argument means that this is a new feature and cannot be applied to the stable 3.2 version, but something needs to be done for this bug in 3.2 too, like a recipe in the docs for a hook_compressed that returns strings (i.e. a function that calls fileinput.hook_compressed and wraps it in a TextIOWrapper), or at least a note to warn about this bug. -- assignee: - eric.araujo versions: +Python 3.3 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5758 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12890] cgitb displays p tags when executed in text mode
Éric Araujo mer...@netwok.org added the comment: I’ll apply it shortly. -- assignee: - eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12890 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14267] TimedRotatingFileHandler chooses wrong file name due to daylight saving time spring forward
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset a5c4b8ccca8b by Vinay Sajip in branch '2.7': Closes #14267: Corrected computation of rollover filename. http://hg.python.org/cpython/rev/a5c4b8ccca8b New changeset a1d9466441ff by Vinay Sajip in branch '3.2': Closes #14267: Corrected computation of rollover filename. http://hg.python.org/cpython/rev/a1d9466441ff New changeset 30fe8a62046e by Vinay Sajip in branch 'default': Closes #14267: Merged fix from 3.2. http://hg.python.org/cpython/rev/30fe8a62046e -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14267 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14202] The docs of xml.dom.pulldom are almost nonexistent
Eli Bendersky eli...@gmail.com added the comment: I reviewed the patch in http://bugs.python.org/review/14202/show -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14202 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13885] CVE-2011-3389: _ssl module always disables the CBC IV attack countermeasure
Tomas Hoger tho...@redhat.com added the comment: Is the final patch going to enable empty fragments unconditionally and will ofter no way to disable them? curl did that recently and ended up adding option to allow users to disable empty fragments when they break compatibility: http://curl.haxx.se/docs/adv_20120124B.html http://thread.gmane.org/gmane.comp.web.curl.library/34659 http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTSSLOPTIONS http://curl.haxx.se/docs/manpage.html#--ssl-allow-beast -- nosy: +thoger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13885 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14180] Factorize code to convert int/float to time_t, timeval or timespec
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 1e9cc1a03365 by Victor Stinner in branch 'default': Close #14180: Factorize code to convert a number of seconds to time_t, timeval or timespec http://hg.python.org/cpython/rev/1e9cc1a03365 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14180 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14180] Factorize code to convert int/float to time_t, timeval or timespec
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset ed73006bac42 by Victor Stinner in branch 'default': Issue #14180: Remove commented code http://hg.python.org/cpython/rev/ed73006bac42 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14180 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14262] Allow using decimals as arguments to `timedelta`
STINNER Victor victor.stin...@gmail.com added the comment: Attached patch changes timedelta constructor to accept decimal.Decimal. See also the issue #14180. -- keywords: +patch Added file: http://bugs.python.org/file24820/timedelta_decimal.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14262 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows
STINNER Victor victor.stin...@gmail.com added the comment: Would the proposed change mean that a bdist_wininst built with 3.2.0 won’t work with a patched 3.2.3? The installer doesn't use distutils to read its configuration, so such binary runs with any installed Python version. bdist_msi decodes data read from setup.py with MBCS on Windows; on other OSes, couldn’t the locale preferred encoding be used? It would be worse: Linux doesn't use Windows code page. Most modern OSes are now using UTF-8 locale encoding, whereas Windows never use UTF-8 as the ANSI code page. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10945 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10148] st_mtime differs after shutil.copy2
STINNER Victor victor.stin...@gmail.com added the comment: This issue is a duplicate of #14127. -- nosy: +haypo resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10148 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14127] os.stat and os.utime: allow preserving exact metadata
STINNER Victor victor.stin...@gmail.com added the comment: I'm lost in all issues related to os.stat/utime and nanosecond, here is a list: - #10148: duplicate - #11457: closed (was related the the rejected PEP 410) - #12904: closed, it was the first step to fix os.stat/os.utime - #13882: closed (implementation of the PEP 410) - #13964: duplicate - #14127: this issue, open :-) -- nosy: +eric.araujo, maubp, python-dev, shaurz ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14127 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13964] os.utimensat() and os.futimes() should accept (sec, nsec), drop os.futimens()
STINNER Victor victor.stin...@gmail.com added the comment: This issue is a duplicate of #14127. -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13964 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14127] add st_*time_ns fileds to os.stat(), add ns keyword to os.*utime*(), os.*utimens*() expects a number of nanoseconds
Changes by STINNER Victor victor.stin...@gmail.com: -- title: os.stat and os.utime: allow preserving exact metadata - add st_*time_ns fileds to os.stat(), add ns keyword to os.*utime*(), os.*utimens*() expects a number of nanoseconds ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14127 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14282] lib2to3.fixer_util.touch_import('__future__', ...) can lead to SyntaxError in code
Martin v. Löwis mar...@v.loewis.de added the comment: Instead of changing touch_import, I propose to add a function similar to https://github.com/loewis/python-modernize/commit/0db885e616807d0cc6859b4035d81fd260b06a67 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14282 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14127] add st_*time_ns fileds to os.stat(), add ns keyword to os.*utime*(), os.*utimens*() expects a number of nanoseconds
STINNER Victor victor.stin...@gmail.com added the comment: The following changes has to be done to fix this issue: - add st_atime_ns, st_mtime_ns and st_ctime_ns fileds to os.stat() result: number of nanoseconds since Epoch (1970.1.1), an integer - change os.*utime*() functions (see below) - shutil.copystat() should use os.utime(ns=...) and os.ltime(ns=...) List of the os.*utime*() functions: - os.futimes(): use futimens() or futimes() - os.futimens(): use futimens(); UTIME_NOW and UTIME_OMIT flags - os.futimesat(): use utimensat() or futimesat() - os.lutimes(): use futimesat(AT_SYMLINK_NOFOLLOW) or lutimes() - os.utime(): use SetFileTime() (Windows), utimensat(), utimes() or utime() - os.utimensat(): use utimensat(); UTIME_NOW and UTIME_OMIT flags Changes on the os.*utime*() functions: - add ns keyword to: * os.futimes() * os.futimesat() * os.lutimes() * os.utime() - except a number of nanoseconds instead of a number of seconds: * os.futimens() * os.utimensat() The ns keyword is an exclusive parameter with existing times parameter. Examples: * seconds: os.utime(name, (1, 2)) * seconds: os.utime(name, times=(1, 2)) * nanoseconds: os.utime(name, ns=(1, 2)) * INVALID! os.utime(name, (1, 2), ns=(1, 2)) * INVALID! os.utime(name, times=(1, 2), ns=(1, 2)) I don't want to remove os.futimens() and os.utimensat() because they add a feature: UTIME_NOW and UTIME_OMIT flags. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14127 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14262] Allow using decimals as arguments to `timedelta`
Ram Rachum r...@rachum.com added the comment: Thanks for the patch! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14262 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13889] str(float) and round(float) issues with FPU precision
Mark Dickinson dicki...@gmail.com added the comment: BTW, the MSDN documentation at http://msdn.microsoft.com/en-us/library/e9b52ceh(v=vs.100).aspx is a bit confusing. Question 1: when doing __control87_2(new, mask, old, NULL), does the resulting value in old reflect the *new* FPU state or the old one? Question 2: in the example near the bottom of that page, there's code like: control_word_x87 = __control87_2(_PC_24, MCW_PC, control_word_x87, 0); This looks very odd: we're assigning to control_word_x87, *and* passing it as an output parameter to the call. Moreover, from the documentation the return value from __control87_2 is always 1 to indicate success, so I'm not sure why it's being assigned to control_word_x87. Am I the only person who's confused by this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13889 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14217] text output pretends to be code
Éric Araujo mer...@netwok.org added the comment: This issue does not apply to 2.7 docs because they lack the local/nonlocal assignment example; do you agree it would be good to backport that? Tshepang, if you find more instances of the same problem, please report them. Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14217 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14287] sys.stdin.readline and KeyboardInterrupt on windows
New submission from Musashi Tamura yuri.musashi.miwa.tam...@gmail.com: I run z.py and press Ctrl-C. '' Traceback (most recent call last): File z.py, line 7, in module print(repr(x)) KeyboardInterrupt I think '' should not be printed. This sometimes occurs on Python 3.2.2 and 2.7.2 AMD64 on Windows7, but doesn't occur on ubuntu. -- components: Windows files: z.py messages: 155612 nosy: miwa priority: normal severity: normal status: open title: sys.stdin.readline and KeyboardInterrupt on windows type: behavior versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file24821/z.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14287 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1666318] shutil.copytree doesn't give control over directory permissions
Éric Araujo mer...@netwok.org added the comment: Patch looks good. I don’t know if I should fix this in 3.3 with your patch or go back to the first idea of adding a copystat(src, dst) after the mkdir call. I just don’t know if it’s important that this behavior does not change in stable versions, or if it’s clearly a bug and we can change it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1666318 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14273] distutils2: logging handler not properly initialized
Éric Araujo mer...@netwok.org added the comment: We didn’t give enough info, sorry. This bug is not reproducible with packaging, it only shows when using the distutils2 repository with Python 2.5, 2.6 or 3.1. I think it’s related to the absence of built-in handler of last resort. (packaging’s logger is named “packaging” and d2’s is “distutils2”, that’s why your grep did not find it. This is one of the few differences between both codebases that I will fix before the betas.) Looking at packaging.run.main() - it calls Dispatcher(args), and any exception in Dispatcher.__init__() before the call to _set_logger could lead to a logging call being made before a handler is set up. Suggestion: set the handler as early as possible, perhaps in main() where the other handlers logic is, and just set the level later (as that is the only thing that depends on verbosity settings passed in via command line flags). Thanks, I will try that! 1. Why are the packaging logger's handlers are saved and restored en masse - all that is happening is that a handler is being added in Dispatcher._set_logger, so it would seem to be enough to call removeHandler(). Tarek added that in d53e813ffe58 to fix regrtest warnings about test_packaging modifying logging._handlers. 2. There should normally be no need to set both the logger's *and* and handler's level to the same value - if the event fails the logger's level test, it will not be passed to handlers anyway. In packaging code I found no reference to any other loggers than packaging - i.e. no child loggers whose events might need to be blocked at the handler level. Yes, the whole package only uses one logger, and we don’t want to stop messages: the application (pysetup, pip, etc.) must be able to set the level. I’ll remove the code that sets a level on the logger and write a test to make sure that a client can get all messages. -- priority: high - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14273 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12365] URLopener should support context manager protocol
Éric Araujo mer...@netwok.org added the comment: Thanks for the patch. - This function returns a file-like object with two additional methods from + This function returns a file-like object that supports the Context Manager + protocol, with two additional methods from The capitalization seems unneeded to me. Also, in my opinion saying “file-like” implies support for the context manager protocol, even if not all file-likes do, and anyway not all users share my assumption. What do you think about this wording: This function returns a file-like object that works as a :term:`context manager` and has two additional methods from the :mod:`urllib.response` module The term role creates a link to the glossary. (BTW the entry for context manager could be improved to give open as example; I’ll do that.) +It is also possible to achieve the same result using a context manager +approach. :: I would rather use with statements everywhere, or if it makes sense to have examples both with and without with, to put the example with with first. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12365 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14180] Factorize code to convert int/float to time_t, timeval or timespec
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 1eaf6e899f02 by Victor Stinner in branch 'default': Issue #14180: Fix select.select() compilation on BSD and a typo in kqueue_queue_control() http://hg.python.org/cpython/rev/1eaf6e899f02 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14180 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13889] str(float) and round(float) issues with FPU precision
Stefan Krah stefan-use...@bytereef.org added the comment: Mark Dickinson rep...@bugs.python.org wrote: http://msdn.microsoft.com/en-us/library/e9b52ceh(v=vs.100).aspx Question 1: when doing __control87_2(new, mask, old, NULL), does the resulting value in old reflect the *new* FPU state or the old one? The new one, but I had to test that manually (see below). Question 2: in the example near the bottom of that page, there's code like: control_word_x87 = __control87_2(_PC_24, MCW_PC, control_word_x87, 0); This looks very odd: we're assigning to control_word_x87, *and* passing it as an output parameter to the call. Moreover, from the documentation the return value from __control87_2 is always 1 to indicate success, so I'm not sure why it's being assigned to control_word_x87. Am I the only person who's confused by this? I was confused as well. I'm positive that it's a cut-and-paste bug in the docs: Probably they had _control87() in that place before, which *does* return the new control word. As you say, the example above clobbers the value that was set via the pointer reference, so the result is always 1. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13889 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5758] fileinput.hook_compressed returning bytes from gz file
R. David Murray rdmur...@bitdance.com added the comment: For 3.2 could we use the same fix, but without exposing the ability to *change* the encoding? That is, we use TextIOWrapper but always with the default None for encoding. It also occurs to me that this really exposes a weakness in the design. What if the user wants to specify other open parameters? I wonder if we should say that for better future-proofing openhooks should always take **kw. You could even envision fileinput accepting **kw and passing them along to the openhook. I think charset is the most important open paramenter in this context, though, so I don't think we have to solve the general problem in this fix. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5758 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13889] str(float) and round(float) issues with FPU precision
Stefan Krah stefan-use...@bytereef.org added the comment: Stefan Krah rep...@bugs.python.org wrote: Stefan Krah stefan-use...@bytereef.org added the comment: Mark Dickinson rep...@bugs.python.org wrote: http://msdn.microsoft.com/en-us/library/e9b52ceh(v=vs.100).aspx Question 1: when doing __control87_2(new, mask, old, NULL), does the resulting value in old reflect the *new* FPU state or the old one? The new one, but I had to test that manually (see below). Well of course, unless both new and mask are 0, in which case it's the existing state. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13889 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14127] add st_*time_ns fileds to os.stat(), add ns keyword to os.*utime*(), os.*utimens*() expects a number of nanoseconds
Guido van Rossum gu...@python.org added the comment: Larry, are you sprinting on this? I'd love to help. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14127 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14273] distutils2: logging handler not properly initialized
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Yes, the whole package only uses one logger, and we don’t want to stop messages: the application (pysetup, pip, etc.) must be able to set the level. I’ll remove the code that sets a level on the logger and write a test to make sure that a client can get all messages. I think you might mean sets a level on the handler - the logger should still have the level set, I think. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14273 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5758] fileinput.hook_compressed returning bytes from gz file
R. David Murray rdmur...@bitdance.com added the comment: It also occurs to me that this fix makes the charset hook look rather odd. We could render it redundant by passing charset to open in the non-openhook case, and mark it deprecated. There is also a bug in the hook_encoding docs. It says the file is opened with codecs.open, but that is not the case, regular open is used. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5758 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14273] distutils2: logging handler not properly initialized
Éric Araujo mer...@netwok.org added the comment: I think you might mean sets a level on the handler - the logger should still have the level set IIUC the logger should be set to DEBUG, otherwise even if e.g. pip wants to get INFO messages it won’t see them. Is that right? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14273 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5758] fileinput.hook_compressed returning bytes from gz file
Éric Araujo mer...@netwok.org added the comment: For 3.2 could we use the same fix, but without exposing the ability to *change* the encoding? That is, we use TextIOWrapper but always with the default None for encoding. Yes! It also occurs to me that this really exposes a weakness in the design. What if the user wants to specify other open parameters? I wonder if we should say that for better future-proofing openhooks should always take **kw. You could even envision fileinput accepting **kw and passing them along to the openhook. I think charset is the most important open paramenter in this context, though, so I don't think we have to solve the general problem in this fix. I concur. I’ve never had to care about buffering for example, but mode is another parameter of open that people may want to give. I’ll commit the minimal fix to 3.2 and merge in 3.3, and then we can discuss on a new RFE bug about adding encoding vs. **kwargs for 3.3. Agreed on deprecating the charset hook when it becomes redundant. Will fix the doc bug about codecs.open too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5758 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14180] Factorize code to convert int/float to time_t, timeval or timespec
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset cb1c877a27f2 by Victor Stinner in branch 'default': Issue #14180: Fix another typo in kqueue_queue_control() http://hg.python.org/cpython/rev/cb1c877a27f2 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14180 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14288] Make iterators pickleable
New submission from Kristján Valur Jónsson krist...@ccpgames.com: A common theme in many talks last year about cloud computing was the need to suspend execution, pickle state, and resume it on a different node. This patch is the result of last year's stackless sprint at pycon, finally completed and submitted for review. Python does not currently support pickling of many run-time structures, but pickling for things like iterators is trivial. A large piece of Stackless' branch is to make sure that various run-time constructs are pickleable, including function objects. While this patch does not do that, it does add pickling for dictiter, and the lot. This makes it possible to have compilcated data sets, iterate through them, and pickle them in a semi-consumed state. Please note that a slight hack is needed to pickle some iterators. Many of these classes are namely hidden and there is no way to access their constructors by name. instead, an unpickling trick is to invoke iter on an object of the target type instead. Not the most elegant solution but I didn't want to complicate matters by adding iterator classes into namespaces. Where should stringiter live for example? Be a builtin like str? We also didn't aim to make all iterators copy.copy-able using the __reduce__ protocol. Some iterators actually use internal iterators themselves, and if a (non-deep) copy were to happen, we would have to shallow copy those internal objects. Instead, we just return the internal iterator object directly from __reduce__ and allow recursive pickling to proceed. -- files: pickling.patch keywords: patch messages: 155626 nosy: krisvale, loewis, michael.foord priority: normal severity: normal status: open title: Make iterators pickleable type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file24822/pickling.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14288 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14262] Allow using decimals as arguments to `timedelta`
Alexander Belopolsky alexander.belopol...@gmail.com added the comment: I am -0 on the feature and -1 on the implementation. Conversion from Decimal to float is explicit by design. Decimal gives the user fine control over rounding issues allowing for either exact arithmetics (trapping inexact operation) or one of several rounding modes. This said, timedelta(decimal) is not much worse than float(decimal), so I will be only -0 if the implementation is such that (1) timedelta(decimal) does no loose precision over the entire range of timedelta and rounding is documented; and (2) implementaton does not require an explicit import decimal inside the datetime module. -- type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14262 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1666318] shutil.copytree doesn't give control over directory permissions
Jeff McNeil j...@jmcneil.net added the comment: Ah, understood. I kind of like the idea of having the added functionality behind a custom callable, but if it's generally just a bug then copystat is a good solution, too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1666318 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14062] UTF-8 Email Subject problem
Tatiana Al-Chueyr tatiana.alchu...@gmail.com added the comment: Hi msladek! I tried to reproduce your bug using Python 3.2.2 on MacOS X, but didn't manage - all worked fine. I used gmail both to send and receive the message, on SSL: smtpPort = '465' smtpSrv = 'smtp.gmail.com' As I'm no SMPTP nor email expert, I asked r.david.murray to review the email message code received and it looks fine. Could you provide a smaller example of code that causes the same problem? I just extracted your code to help other people trying to reproduce the bug. It is attached. -- nosy: +tati_alchueyr Added file: http://bugs.python.org/file24823/issue14062_buggy_email_subject.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14062 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8536] Support new features of ZLIB 1.2.4
Jason Killen jsnk...@gmail.com added the comment: Given this is marked as good for a newbie and easy I figured I'd take a crack at it but I'm confused. As example I don't see where inflateReset2 would be useful. I don't see anywhere inflateReset is used and would need to be replaced by inflateReset2. I also don't see where the action of inflateReset2 (End then Init) is currently used. What am I missing? -- nosy: +Jason.Killen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8536 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14180] Factorize code to convert int/float to time_t, timeval or timespec
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 760cf150bb99 by Victor Stinner in branch 'default': Issue #14180: Fix pythoncore.vcproj, Modules/_time.[ch] have been removed http://hg.python.org/cpython/rev/760cf150bb99 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14180 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14127] add st_*time_ns fileds to os.stat(), add ns keyword to os.*utime*(), os.*utimens*() expects a number of nanoseconds
Martin v. Löwis mar...@v.loewis.de added the comment: I don't want to remove os.futimens() and os.utimensat() because they add a feature: UTIME_NOW and UTIME_OMIT flags. I'm not sure how this could work: UTIME_NOW and UTIME_OMIT have typically values such as ((1l 30) - 2l) which could be mistaken as a time stamp if there is a flat nanosecond value. There would be ways to solve this, of course: not passing the value should be considered as UTIME_OMIT, and passing -1 may be treated as UTIME_NOW. -- title: add st_*time_ns fileds to os.stat(), add ns keyword to os.*utime*(), os.*utimens*() expects a number of nanoseconds - add st_*time_ns fileds to os.stat(), add ns keyword to os.*utime*(), os.*utimens*() expects a number of nanoseconds ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14127 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1178863] Variable.__init__ uses self.set(), blocking specialization
Martin v. Löwis mar...@v.loewis.de added the comment: Thanks for the patch. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1178863 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14278] email.utils.localtime throws exception if time.daylight is False
Changes by Brian Jones bkjo...@gmail.com: -- nosy: +r.david.murray -Brian.Jones ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14278 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14062] UTF-8 Email Subject problem
Michal Sladek mic...@sladkovi.eu added the comment: I tested the code again. Using Gmail SMTP server produces correct results, using server smtp.seznam.cz leads to a problem (I should mention here, that Seznam is the largest free mail provider in the Czech Republic). Here are the differences on receiving side. GMAIL: Return-Path: mic...@sladkovi.eu Received: from mail-bk0-f45.google.com (mail-bk0-f45.google.com [209.85.214.45]) by mx4.volny.cz (Postfix) with ESMTP id 0A3E12E086B for msla...@volny.cz; Tue, 13 Mar 2012 17:58:03 +0100 (CET) Received: by bkcjg9 with SMTP id jg9so842625bkc.18 for msla...@volny.cz; Tue, 13 Mar 2012 09:58:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:content-type:mime-version:from:to:subject :x-gm-message-state; bh=Sdb8G6CtN+pEzPJHxwbwCprTgWPJUrR3jiU+qeK1WAs=; b=X88feHvtpL6zBXYNYSjgUQ+1WirGmU8B69k+4fGlAge6F5+pYd6SzuJ6ExdBsp+brw 1QuCne97OdVnYoFmg86ZviFz3m6Cn6N8hgPNa2H7hCPQD4O+cjJQQzze4xXYqgPJQs+D ke4ISEmxL9UFJUvkTyFhrCDefSxQMY+TnnLwWQR+PCD/uB0FgR2UgBjEx9K7EUKQi6W0 78+EZYO3cd+SuuadOUvIpe2cj0576ahcP40dGN0kIe+P4NX5Ij7D2cCa/bWiwFdDRUI4 v8UxJcnbTuOCQFtlItxCAxU9IzZWGekWtpJVnRDBGG63iGXHoTDzp+4+d1FRBGsDQ2pD l5tg== Received: by 10.204.150.73 with SMTP id x9mr6371797bkv.7.1331657883687; Tue, 13 Mar 2012 09:58:03 -0700 (PDT) Received: from dvr.ph.sladkovi.eu (ip-84-42-150-218.net.upcbroadband.cz. [84.42.150.218]) by mx.google.com with ESMTPS id u14sm2783344bkp.2.2012.03.13.09.58.02 (version=SSLv3 cipher=OTHER); Tue, 13 Mar 2012 09:58:02 -0700 (PDT) Message-ID: 4f5f7c9a.0e70cc0a.12f5.7...@mx.google.com Date: Tue, 13 Mar 2012 09:58:02 -0700 (PDT) Content-Type: multipart/mixed; boundary1165280172== MIME-Version: 1.0 From: mic...@sladkovi.eu To: msla...@volny.cz Subject: =?utf-8?b?xb5sdcWlb3XEjWvDvSBrxa/FiA==?= X-Gm-Message-State: ALoCoQmf6k2GVVKdm0ZNbvSyPpZ0Gl1yv/BDc3h3zrh34hWWp3wa/fSBXbWT9FANzBLd5k1qUnEP X-DKIM-Status: neutral X-Virus: no (m2.volny.internal - Tue, 13 Mar 2012 17:58:05 +0100 (CET)) X-Spam: no (m2.volny.internal - Tue, 13 Mar 2012 17:58:07 +0100 (CET)) X-Received-Date: Tue, 13 Mar 2012 17:58:08 +0100 (CET) --===1165280172== Content-Type: text/plain; charset=utf-8 MIME-Version: 1.0 Content-Transfer-Encoding: base64 w7pwxJtsIMSPw6FiZWxza8OpIMOzZHk= --===1165280172==-- -- SEZNAM: Return-Path: michal.sla...@seznam.cz Received: from smtp2.seznam.cz (smtp2.seznam.cz [77.75.76.43]) by mx4.volny.cz (Postfix) with ESMTP id 542A32E0868 for msla...@volny.cz; Tue, 13 Mar 2012 18:00:05 +0100 (CET) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=seznam.cz; h=Received:Content-Type:MIME-Version:From:To:Subject:--===1097187749==:MIME-Version:Content-Transfer-Encoding:X-Smtpd:X-Seznam-User:X-Session:X-Country:X-Virus-Info:X-Seznam-SPF:X-Seznam-DomainKeys; b=bfwTOSoFJU7vGbB7VvXNIQzhbsj+pDPhwr72BX1aVWAicyK0Cix3evz6c3+srYBba lHDeYd74ZXW5553N6ocfy68pRxpI6K5dKfvcKKLgUN7+N/iQOUtj09D4wN81cjPt7qQ uH5rjcdsDsbZV31EsxyS1P/rn6F7bYOxrpPeHAk= Received: from dvr.ph.sladkovi.eu (ip-84-42-150-218.net.upcbroadband.cz [84.42.150.218])by email-relay1.ng.seznam.cz (Seznam SMTPD 1.2.15-6@18976) with ESMTP; Tue, 13 Mar 2012 17:59:32 +0100 (CET) Content-Type: multipart/mixed; boundary1097187749== MIME-Version: 1.0 From: michal.sla...@seznam.cz To: msla...@volny.cz Subject: =?utf-8?b?xb5sdcWlb3XEjWvDvSBrxa/FiA==?= X-DKIM-Status: fail X-Virus: no (m2.volny.internal - Tue, 13 Mar 2012 18:00:06 +0100 (CET)) X-Spam: no (m2.volny.internal - Tue, 13 Mar 2012 18:00:08 +0100 (CET)) X-Received-Date: Tue, 13 Mar 2012 18:00:08 +0100 (CET) --===1097187749==:Content-Type: text/plain; charset=utf-8 MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-Smtpd: 1.2.15-6@18976 X-Seznam-User: michal.sla...@seznam.cz X-Session: 5 X-Country: CZ X-Virus-Info:clean X-Seznam-SPF:neutral X-Seznam-DomainKeys:unknown w7pwxJtsIMSPw6FiZWxza8OpIMOzZHk= --===1097187749==-- -- As you can see, Seznam is adding a lot of headers into mail's body. Anyway, making utf-8 subject manually like this: base64Subject = base64.b64encode(subject.encode('utf-8')).decode() encodedSubject = '=?UTF-8?B?{0}?='.format(base64Subject) message.add_header('Subject',encodedSubject) works correctly for both SMTP servers. So there must be a difference... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14062 ___ ___ Python-bugs-list mailing list Unsubscribe:
[issue14127] add st_*time_ns fileds to os.stat(), add ns keyword to os.*utime*(), os.*utimens*() expects a number of nanoseconds
Larry Hastings la...@hastings.org added the comment: Larry, are you sprinting on this? I'd love to help. I am. Come on by--mi CPU es tu CPU! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14127 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2843] New methods for existing Tkinter widgets
Andrew Svetlov andrew.svet...@gmail.com added the comment: Fresh patch for current 3.3 head is attached. -- keywords: +patch Added file: http://bugs.python.org/file24824/tknewmethods.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2843 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2843] New methods for existing Tkinter widgets
Andrew Svetlov andrew.svet...@gmail.com added the comment: Martin, please review and move it forward if ok. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2843 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10522] test_telnet exception
Jack Diederich jackd...@gmail.com added the comment: Either someone changed the test or I can't understand how the try/except/else could happen where 'conn' is undefined in the else. Either way, I'm marking it closed. -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10522 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14180] Factorize code to convert int/float to time_t, timeval or timespec
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 9d69a2418d80 by Victor Stinner in branch 'default': Issue #14180: Fix an invalid rounding when compiler optimization are enabled http://hg.python.org/cpython/rev/9d69a2418d80 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14180 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3835] tkinter goes into an infinite loop (pydoc.gui)
Andrew Svetlov andrew.svet...@gmail.com added the comment: Push updated patch for tip (3.3) head -- nosy: +asvetlov Added file: http://bugs.python.org/file24825/issue_3835_2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3835 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14288] Make iterators pickleable
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14288 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14184] test_recursion_limit fails on OS X when compiled with clang
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 246e681a4272 by Ned Deily in branch '3.2': Issue #14184: Increase the default stack size for secondary threads on http://hg.python.org/cpython/rev/246e681a4272 New changeset c00ac2b25048 by Ned Deily in branch 'default': Issue #14184: merge http://hg.python.org/cpython/rev/c00ac2b25048 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14184 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14184] test_recursion_limit fails on OS X when compiled with clang
Ned Deily n...@acm.org added the comment: Thanks for the report. Fix applied for 3.2.x (for release in 3.2.4) and default (for 3.3.0). -- resolution: - fixed stage: patch review - committed/rejected status: open - closed type: - crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14184 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO
Jason Killen jsnk...@gmail.com added the comment: I've generated a patch that checks to see if seen_greeting is set before processing other commands. This is the first time I've submitted a patch so if there is something more I need to do let me know. -- nosy: +Jason.Killen Added file: http://bugs.python.org/file24826/smtpd.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14269 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7652] Merge C version of decimal into py3k.
Benjamin Peterson benja...@python.org added the comment: Stefan, please feel free to commit the latest patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7652 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5219] IDLE/Tkinter: edit win stops updating when tooltip is active
Andrew Svetlov andrew.svet...@gmail.com added the comment: I confirm: patch5219.diff solves the problem in linux box. -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5219 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13889] str(float) and round(float) issues with FPU precision
Mark Dickinson dicki...@gmail.com added the comment: Thanks for the responses. As far as I'm concerned, this is good to go into all 3 maintained branches. Having said that, the 2.7 and 3.2 branches are currently at release candidate stage, so I think we should wait until after the releases. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13889 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue829370] math.signum(int)
Frank frank.breitl...@gmx.de added the comment: Its true. Python needs it as every scientific programming language needs it. Its a matter of completeness. This is a deficit. -- nosy: +fkbreitl versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue829370 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue829370] math.signum(int)
Merlijn van Deen valhall...@gmail.com added the comment: numpy.sign does this: http://docs.scipy.org/doc/numpy/reference/generated/numpy.sign.html -- nosy: +valhallasw ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue829370 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7652] Merge C version of decimal into py3k.
Mark Dickinson dicki...@gmail.com added the comment: FWIW, I think we would be better off if this patch were merged in soon. +1 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7652 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14289] Prebuilt CHM file on Docs download page
New submission from Nam Nguyen bits...@gmail.com: Before 2.7, one can easily find .CHM files in the Documentation download page. When 2.7 come out, the only way to get CHM files is downloading the Windows installers (EXE or MSI), installing it on Windows, and grabbing the CHM files. This is unwieldy. I am on a Mac at work, have a desktop running Linux and Windows at home. In all cases, I usually rely on the CHM file. It is self-packaged, indexable, and easily searchable. There are CHM readers out there that work across different OSes such as the cross platform xCHM. Therefore, I'd like to request for a prebuilt .CHM file for download, in addition to what there already are. -- assignee: docs@python components: Documentation messages: 155650 nosy: Nam.Nguyen, docs@python priority: normal severity: normal status: open title: Prebuilt CHM file on Docs download page ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14289 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14290] Importing script as module causes ImportError with pickle.load
New submission from Robert bobbyr...@gmail.com: I implemented a data-structure as an object in a script, let's call it objectScript.py. I'm using this data-structure in other scripts like so: from objectScript import data-structure Populating this data-structure requires quite a bit of time, so when I'm done with it, I like to pickle it. However, if I try to load it from the pickled file, I get the following error: ImportError: No module named objectScript However, if I replace my 'from objectScript import data-structure' statement with the actual data-structure class definition from the objectScript.py file when I am pickling the object but then revert to the import statement when I am unpickling the object, everything works fine. -- components: Library (Lib) messages: 155651 nosy: rj3d priority: normal severity: normal status: open title: Importing script as module causes ImportError with pickle.load type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14290 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue829370] math.signum(int)
Frank frank.breitl...@gmx.de added the comment: That's too much for too little. The math module should cover the basics. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue829370 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue829370] math.signum(int)
Mark Dickinson dicki...@gmail.com added the comment: I disagree that this is useful enough to make it worth adding to the standard library. Between math.copysign and simple comparisons, I think all the common cases are well covered. And it's a simple one-line function: def signum(x): return (x 0) - (x 0) Frank, do you have any convincing use-cases that aren't already covered by math.copysign or simple two-way comparisons (e.g., x = 0)? -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue829370 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10543] Test discovery (unittest) does not work with jython
Michael Foord mich...@voidspace.org.uk added the comment: Now fixed. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10543 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14289] Prebuilt CHM file on Docs download page
Georg Brandl ge...@python.org added the comment: The CHMs are already on the Python download page, along with the .msi installers. We can add a note to the docs download page that they are to be found there. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14289 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14291] Regression in Python3 of email handling of unicode strings in headers
New submission from R. David Murray rdmur...@bitdance.com: In Python2, this works: from email.mime.text import MIMEText m = MIMEText('abc') str(m) 'From nobody Tue Mar 13 15:44:59 2012\nContent-Type: text/plain; charset=us-ascii\nMIME-Version: 1.0\nContent-Transfer-Encoding: 7bit\n\nabc' m['Subject'] = u'É test' str(m) 'From nobody Tue Mar 13 15:48:11 2012\nContent-Type: text/plain; charset=us-ascii\nMIME-Version: 1.0\nContent-Transfer-Encoding: 7bit\nSubject: =?utf-8?q?=C3=89_test?=\n\nabc' That is, unicode string automatically get turned into encoded words. In Python3 this no longer works: from email.mime.text import MIMEText m = MIMEText('abc') str(m) 'Content-Type: text/plain; charset=us-ascii\nMIME-Version: 1.0\nContent-Transfer-Encoding: 7bit\n\nabc' m['Subject'] = u'É test' str(m) Traceback (most recent call last): File stdin, line 1, in module File /home/rdmurray/python/p33/Lib/email/message.py, line 154, in __str__ return self.as_string() File /home/rdmurray/python/p33/Lib/email/message.py, line 168, in as_string g.flatten(self, unixfrom=unixfrom) File /home/rdmurray/python/p33/Lib/email/generator.py, line 99, in flatten self._write(msg) File /home/rdmurray/python/p33/Lib/email/generator.py, line 152, in _write self._write_headers(msg) File /home/rdmurray/python/p33/Lib/email/generator.py, line 186, in _write_headers header_name=h) File /home/rdmurray/python/p33/Lib/email/header.py, line 205, in __init__ self.append(s, charset, errors) File /home/rdmurray/python/p33/Lib/email/header.py, line 286, in append s.encode(output_charset, errors) UnicodeEncodeError: 'ascii' codec can't encode character '\xc9' in position 0: ordinal not in range(128) Presumably the problem is that the Python2 code tests for 'string' and if it isn't string handles it by CTE encoding it. In Python3 everything is a string. Probably what should happen is the encoding error should be caught, and the CTE encoding done at that point, based on the model of how Python2 handled unicode strings. -- assignee: r.david.murray components: Library (Lib) keywords: easy messages: 155656 nosy: aikinci, r.david.murray priority: high severity: normal stage: needs patch status: open title: Regression in Python3 of email handling of unicode strings in headers type: behavior versions: Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14291 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue829370] math.signum(int)
Mark Dickinson dicki...@gmail.com added the comment: See also the (fairly) recent python-ideas discussion starting here: http://mail.python.org/pipermail/python-ideas/2010-April/007136.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue829370 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue829370] math.signum(int)
Changes by Mark Dickinson dicki...@gmail.com: -- versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue829370 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14062] UTF-8 Email Subject problem
R. David Murray rdmur...@bitdance.com added the comment: It makes no sense that changing how Subject is generated would affect the later formatting of the mime header. There is no coupling that I'm aware of in the code. I notice that your handcrafted version uses uppercase for the charset and CTE code. Can you try using lowercase like the email module does, and see if that reproduces the problem? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14062 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14278] email.utils.localtime throws exception if time.daylight is False
R. David Murray rdmur...@bitdance.com added the comment: Thanks, Brian. (For the record, this is a bug in email6 code that hasn't been checked into trunk yet.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14278 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2843] New methods for existing Tkinter widgets
Martin v. Löwis mar...@v.loewis.de added the comment: Thanks both of you for the patches. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2843 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14292] OS X installer build script doesn't set $CXX, so it ends up as c++
New submission from Nicholas Riley com-python-b...@sabi.net: % python build-installer.py \ --sdk-path=/Developer/SDKs/MacOSX10.6.sdk \ --universal-archs=intel \ --dep-target=10.6 Settings: * Source directory: /Users/nicholas/src/cpython * Build directory: /tmp/_py * SDK location: /Developer/SDKs/MacOSX10.6.sdk * Third-party source: /tmp/_py/third-party * Deployment target: 10.6 * Universal architectures: ('i386', 'x86_64') * C compiler: gcc-4.2 [...] Building a universal python for intel architectures [...] checking for c++... c++ configure: WARNING: By default, distutils will build C++ extension modules with c++. If this is not intended, then set CXX on the configure command line. -- assignee: ronaldoussoren components: Macintosh messages: 155663 nosy: ned.deily, nriley, ronaldoussoren priority: normal severity: normal status: open title: OS X installer build script doesn't set $CXX, so it ends up as c++ versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14292 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2843] New methods for existing Tkinter widgets
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 71041c0dedd5 by Martin v. Löwis in branch 'default': Issue #2843: Add new Tk API to Tkinter. http://hg.python.org/cpython/rev/71041c0dedd5 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2843 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue829370] math.signum(int)
Frank frank.breitl...@gmx.de added the comment: Mark, the convincing use-cases apear already on this page. People suggest the usage of numpy or the definition of all kinds of functions to accomplish this trivial task. But the users don't want to worry about this. They just want to use this function and not lose time figuring out how to best implement it in python. Copysign is not very intuitive e.g. because command completion on math.si_ fails and because it will not be a first result by search engines. The discussion is another example for the user request. And I have the feeling that with the time spend on it all different variations of signum functions could have been implemented including their documentation - although the implementation of your two line solution should have been satisfying for almost everybody... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue829370 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3835] tkinter goes into an infinite loop (pydoc.gui)
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset d731dcda2611 by Martin v. Löwis in branch 'default': Issue #3835: Refuse to use unthreaded Tcl in threaded Python. http://hg.python.org/cpython/rev/d731dcda2611 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3835 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3835] tkinter goes into an infinite loop (pydoc.gui)
Martin v. Löwis mar...@v.loewis.de added the comment: Thanks for the patch! -- nosy: +loewis resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3835 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13507] Modify OS X installer builds to package liblzma for the new lzma module
Nicholas Riley com-python-b...@sabi.net added the comment: The configure problem is soluble with --disable-dependency-tracking (it was the -M* options to gcc that caused the problem); something similar is used for SQLite. The attached patch should do it... -- keywords: +patch nosy: +nriley Added file: http://bugs.python.org/file24827/xz.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13507 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com