[issue43438] [doc] sys.addaudithook() documentation should be more explicit on its limitations
Frank added the comment: PEP 551 is confusing. It looked suggesting that it's a "security tool" that "detects, identifies and analyzes misuse of Python" to me (and apparently many others). examples shown in the PEP includes WannaCrypt, APTs, all of which involves the good old remote code execution, which is basically a sandboxed environment it self, at least in some way. also, the challenges provided the contestants with a "background story" that enables an attacker to execute arbitrary code doesn't mean that one HAVE to gain code execution to achieve the goal of bypassing the aevents. in this case, one only have to find the list object which contains the audit hooks registered, and clear it(or replace it). this clearly breaks the promise made in PEP 578 (Hooks cannot be removed or replaced). THIS SHOULD BE FIXED. ALSO(again), the software is not always doing what it's designed to do. maybe, I mean maybe, developers should make changes according to what users are doing. I don't know, really. -- nosy: +frankli ___ Python tracker <https://bugs.python.org/issue43438> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41162] Clear audit hooks after destructors
Change by Frank : -- nosy: +frankli ___ Python tracker <https://bugs.python.org/issue41162> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue829370] math.signum(int)
Frank 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 <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)
Frank added the comment: That's too much for too little. The math module should cover the basics. -- ___ Python tracker <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)
Frank 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 <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)
Frank added the comment: Mark, https://en.wikipedia.org/wiki/Signum_function or elementary math books tell us that this function is called signum, sign or sgn. A library should adopt this standard for the same reason we don't want a ComputeTheSine or calcsin, which would be very confusing. As we learn from repeated discussions people want to use this signum function, no matter we can imagine this or not and no matter whether that functionality is hidden somewhere else. Since we are talking about not more than 5 lines of code, I don't see any reason not to have it. If there are some please let us know. -- ___ Python tracker <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)
Frank added the comment: Here an example where the signum function provides an elegant way to calculate the Julian date: def julian_date(YY,MM,DD,HR,Min,Sec,UTcor): return 367*YY - (7*(YY+((MM+9)/12))/4) + (275*MM/9)+ DD + 1721013.5 + UTcor/24 - 0.5*sign((100*YY)+MM-190002.5) + 0.5 + HR/24.0 + Min/(60.0*24.0) + Sec/(3600.0*24.0) http://aa.usno.navy.mil/faq/docs/JD_Formula.php http://www.krioma.net/blog/2011/09/python_julian_date.php By the way Julian date should be part of the time or datetime module. -- ___ Python tracker <http://bugs.python.org/issue829370> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14659] HP multi-thread environment python core in PyObject_GC_UnTrack
New submission from frank : #0 0x1dbaa480:0 in PyObject_GC_UnTrack () at Modules/gcmodule.c:1149 1149Modules/gcmodule.c: No such file or directory. in Modules/gcmodule.c (gdb) where #0 0x1dbaa480:0 in PyObject_GC_UnTrack () at Modules/gcmodule.c:1149 #1 0x1dab7040:0 in tupledealloc () at Objects/tupleobject.c:137 #2 0x1db3c650:0 in code_dealloc () at Python/compile.c:169 #3 0x1dc09e70:0 in func_dealloc () at Objects/funcobject.c:408 #4 0x1da81390:0 in insertdict () at Objects/dictobject.c:390 #5 0x1da82030:0 in PyDict_SetItem () at Objects/dictobject.c:533 #6 0x1db25cd0:0 in eval_frame () at Python/ceval.c:1681 #7 0x1db309d0:0 in PyEval_EvalCodeEx () at Python/ceval.c:2650 #8 0x1db2f9e0:0 in PyEval_EvalCode () at Python/ceval.c:537 #9 0x1db7aa10:0 in PyImport_ExecCodeModuleEx () at Python/import.c:621 #10 0x1db7a850:0 in PyImport_ExecCodeModule () at Python/import.c:588 who can help me, many thanks! -- components: Interpreter Core files: P160254_R1699958_120413075145.txt messages: 159120 nosy: njfrank priority: normal severity: normal status: open title: HP multi-thread environment python core in PyObject_GC_UnTrack type: crash versions: Python 2.6 Added file: http://bugs.python.org/file25337/P160254_R1699958_120413075145.txt ___ Python tracker <http://bugs.python.org/issue14659> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14659] HP multi-thread environment python core in PyObject_GC_UnTrack
frank added the comment: in addtion, the version of our python is 2.3.4 -- ___ Python tracker <http://bugs.python.org/issue14659> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16913] ElementTree tostring error when method='text'
New submission from Frank: Since upgrading to python 3.3 the tostring method fails when the output method is requested as text. Code like this: with open(fp, mode='rt') as f: data = f.read() tree, idmap = ET.XMLID(data) print(ET.tostring(tree, method='text', encoding='unicode')) Generates the following error: Traceback (most recent call last): File "/home/john/Desktop/docs/Pear/pear.py", line 64, in pass_four print(ET.tostring(tree, method='text', encoding='unicode')) File "/usr/lib/python3.3/xml/etree/ElementTree.py", line 1171, in tostring ElementTree(element).write(stream, encoding, method=method) File "/usr/lib/python3.3/xml/etree/ElementTree.py", line 824, in write _serialize_text(write, self._root) File "/usr/lib/python3.3/xml/etree/ElementTree.py", line 1057, in _serialize_text write(part) TypeError: string argument expected, got 'list' Whereas it used to return plain text with formatting tags stripped from the root element on prior versions of python. -- components: XML messages: 179523 nosy: Frank priority: normal severity: normal status: open title: ElementTree tostring error when method='text' versions: Python 3.3 ___ Python tracker <http://bugs.python.org/issue16913> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16913] ElementTree tostring error when method='text'
Frank added the comment: It happens whenever the method is called, regardless of input. I'm using HTML that has been tidied first with HTML entities (if any) converted to unicode values. -- ___ Python tracker <http://bugs.python.org/issue16913> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16913] ElementTree tostring error when method='text'
Frank added the comment: Scratch that, it happens whenever there are XML entities (<, " and friends) that are appearing the text as you pointed out. -- ___ Python tracker <http://bugs.python.org/issue16913> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46264] 'I'.lower() should give non dotted i for LANG=tr_TR
New submission from Frank Feuerbacher : This blasted Turkish I will be the death of us all... https://www.unicode.org/versions/Unicode14.0.0/ch05.pdf has a lovely graphic on page 238 of the behavior of upper/lower casing of the various I's and when locale is Turkish or not. It seems that Python 3.9.5 is broken, and I see no evidence that version 10 has fixed it. Basically, U-0049 (I) should lower case to U-131 (ı) and vice-versa, when locale is tr_TR. The rules are different for other locales. -- files: foo.py messages: 409733 nosy: fbacher priority: normal severity: normal status: open title: 'I'.lower() should give non dotted i for LANG=tr_TR versions: Python 3.9 Added file: https://bugs.python.org/file50541/foo.py ___ Python tracker <https://bugs.python.org/issue46264> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46264] 'I'.lower() should give non dotted i for LANG=tr_TR
Frank Feuerbacher added the comment: Oh joy. Kodi media server is having unicode issues and this won't help. I'm trying to see how bad it is. The main use for case transformations is for internal keyword lookup/monocasing. Settings, filenames on moncased filesystems, etc. are caseless. On the main things work okay until you hit a language, such as Turkish, that does not obey the usual rules. So, ToLower('I') does not map to 'i'. There are ways to work around this, but it depends upon the robustness of the unicode implementation. I've spent the past several days looking into C++ behavior. It seemed to be similarly broken until I discovered that writing to both cout and wcout tends to break things, including unicode encoding. It will take a few days to investigate further. Thanks for the info. -- ___ Python tracker <https://bugs.python.org/issue46264> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue46264] 'I'.lower() should give non dotted i for LANG=tr_TR
Frank Feuerbacher added the comment: Using casefold did not help ubuntu Lang is en_US.UTF-8 [GCC 9.3.0] on linux >>> folded_1: str = "Turkish I: İı".casefold() >>> folded_2: str = "tUrkİsh i: iI".casefold() >>> print(folded_1) turkish i: i̇ı >>> print(folded_2) turki̇sh i: ii >>> print(folded_1==folded_2) False It exhibits the same shortcoming as toLower. multi-language support ain't easy, especially when everything you learned about strings ain't true. -- ___ Python tracker <https://bugs.python.org/issue46264> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1152] Bug in documentation for SimpleXMLRPCServer
New submission from Frank Millman: I spotted a minor bug in the documentation to SimpleXMLRPCServer. Background: xmlrpclib.py has the following - # This class is available as ServerProxy and Server. New code should # use ServerProxy, to avoid confusion. # ... class ServerProxy: ... Server = ServerProxy The bug: Section 18.25.1 SimpleXMLRPCServer Objects ... Example: ... The following client code will call the methods made available by the preceding server: import xmlrpclib s = xmlrpclib.Server('http://localhost:8000') It should say: s = xmlrpclib.ServerProxy('http://localhost:8000') -- components: Documentation messages: 55836 nosy: FrankMillman severity: normal status: open title: Bug in documentation for SimpleXMLRPCServer versions: Python 2.5 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1152> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13465] A Jython section in the dev guide would be great
New submission from Frank Wierzbicki : Nick suggested this as a comment on a blog post of mine -- I'll come up with some content, but I wanted to log the bug straight away so I wouldn't forget. -- components: Devguide messages: 148200 nosy: brett.cannon, ezio.melotti, fwierzbicki, ncoghlan priority: normal severity: normal status: open title: A Jython section in the dev guide would be great type: feature request ___ Python tracker <http://bugs.python.org/issue13465> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13465] A Jython section in the dev guide would be great
Frank Wierzbicki added the comment: I'll take a look at the dev guide this week and see how much it differs from what I'd want to do and report back here. If it doesn't make sense to include a Jython page here I can either copy content over or link to the CPython dev guide from the Jython one. -- ___ Python tracker <http://bugs.python.org/issue13465> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13465] A Jython section in the dev guide would be great
Frank Wierzbicki added the comment: I have forked the devguide into http://hg.python.org/jython-docs/devguide/ -- this way I can merge changes from the main devguide as they make sense. DVCS FTW :) -- I guess this issue can be closed. -- ___ Python tracker <http://bugs.python.org/issue13465> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13465] A Jython section in the dev guide would be great
Changes by Frank Wierzbicki : -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue13465> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13703] Hash collision security issue
Frank Sievertsen added the comment: I'd like to add a few notes: 1. both 32-bit and 64-bit python are vulnerable 2. collision-counting will break other things 3. imho, randomization is the way to go, enabled by default. 4. do we need a steady hash-function later again? I created ~500KB of colliding strings for both 32-bit and 64-bit python. It works impressively good: 32bit: ~500KB payload keep django busy for >30 minutes. 64bit: ~500KB payload keep django busy for 5 minutes. Django is more vulnerable than python-dict alone, because it * converts the strings to unicode first, making the comparision more expensive * does 5 dict-lookups per key. So Python's dict of str alone is probably ~10x faster. Of course it's much harder to create the payload for 64-bit python than for 32-bit, but it works for both. The collision-counting idea makes some sense in the web environment, but for other software types it can causes serious problems. I don't want my software to stop working because someone managed to enter 1000 bad strings into it. Think of a software that handles names of customers or filenames. We don't want it to break completely just because someone entered a few clever names. Randomization fixes most of these problems. However, it breaks the steadiness of hash(X) between two runs of the same software. There's probably code out there that assumes that hash(X) always returns the same value: database- or serialization-modules, for example. There might be good reasons to also have a steady hash-function available. The broken code is hard to fix if no such a function is available at all. Maybe it's possible to add a second steady hash-functions later again? For the moment I think the best way is to turn on randomization of hash() by default, but having a way to turn it off. -- nosy: +fx5 ___ Python tracker <http://bugs.python.org/issue13703> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10322] sys.argv and quoted arguments on command line
Frank Rügheimer added the comment: You are right, it seems to work when the file is passed directly into python so the quotes are stripped somewhere before python even gets to see them. Thanks -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue10322> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3918] random.uniform suprisingly (good kind) does not work as documented
New submission from Frank Martinez <[EMAIL PROTECTED]>: The documentation for random.uniform states: uniform(a, b) Return a random real number N such that a <= N < b. However when I test it out, We see: >>> import random as r >>> r.uniform(0,-1) -0.9815056608839331 >>> r.uniform(0,-1) -0.37308132546878092 >>> r.uniform(0,-1) -0.57090673820243609 >>> r.uniform(-1,0) -0.80471374256455697 >>> r.uniform(3,2) 2.9202748927236488 Now, while /I/ actually find this behavior *extremely* useful (I don't need to verify I call with the arguments in the `correct' order.), I think either the behavior needs to change to match the documentation or (preferably), the documentation needs alteration to read, for example, additionally: If a > b, this function behaves as if it were called as uniform(b,a). Again, for clarity, I vote for the documentation change. -- components: Library (Lib) messages: 73480 nosy: xuinkrbin severity: normal status: open title: random.uniform suprisingly (good kind) does not work as documented type: behavior versions: Python 2.5 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3918> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1617161] Instance methods compare equal when their self's are equal
Frank Niessink <[EMAIL PROTECTED]> added the comment: Just to reiterate the original bug report: the issue (for me) is that currently (python 2.5): >>> [].__add__ == [].__add__ True >>> [].__add__ == [1].__add__ False Or, using a non-builtin class: >>> class C(object): ... def __eq__(self, other): ... return False ... def foo(self): ... pass ... >>> C().foo == C().foo False >>> class C(object): ... def __eq__(self, other): ... return True ... def foo(self): ... pass ... >>> C().foo == C().foo True I think it makes little sense that the equality test for the instance methods takes the equality of the instances into account. Imho, this behaviour is inconsistent with the principle of no surprises. The correct behaviour (again imho of course) is that instance methods only compare equal to the same instance method of the same instance, where 'same instance' is based on 'is' not on '=='. Cheers, Frank _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1617161> _ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2617] Patch to emit "-J is reserved for Jython" on -J arg
New submission from Frank Wierzbicki <[EMAIL PROTECTED]>: This patch adds the message "-J is reserved for Jython" if that arg is attempted. See http://mail.python.org/pipermail/python-dev/2008-April/078564.html For support from BDFL. -- components: Interpreter Core files: argdashjay.diff keywords: patch messages: 65365 nosy: fwierzbicki severity: normal status: open title: Patch to emit "-J is reserved for Jython" on -J arg type: feature request versions: Python 2.6 Added file: http://bugs.python.org/file10009/argdashjay.diff __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2617> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2617] Patch to emit "-J is reserved for Jython" on -J arg
Frank Wierzbicki <[EMAIL PROTECTED]> added the comment: On Sat, Apr 12, 2008 at 9:03 AM, Christian Heimes <[EMAIL PROTECTED]> wrote: > > Christian Heimes <[EMAIL PROTECTED]> added the comment: > > I've reserved -X as well. Applied in r62293 Great, thanks! While I'd love to have *both* -X and -J, is that okay with the other devs? -Frank __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2617> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5044] name not found in generator in eval()
New submission from Frank Henigman : # works >>> eval( "sum( [ a[0]=='a' for j in 'a' ] )", {}, dict(a='a')) # take out the square brackets >>> eval( "sum( a[0]=='a' for j in 'a' )", {}, dict(a='a')) NameError: global name 'a' is not defined -- components: Interpreter Core messages: 80469 nosy: fjhpy severity: normal status: open title: name not found in generator in eval() type: behavior versions: Python 2.6 ___ Python tracker <http://bugs.python.org/issue5044> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43514] Disallow fork in a subinterpreter affects multiprocessing plugin
New submission from Frank Ueberschar : Related to this issue https://bugs.python.org/issue34651, our Bareos libcloud plugin cannot be run with Python > 3.7. We are using subprocesses in a C-subinterpreter environment. Is there a way to circumvent rewriting our code completely? -- components: C API messages: 388841 nosy: franku priority: normal severity: normal status: open title: Disallow fork in a subinterpreter affects multiprocessing plugin type: behavior versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue43514> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43514] Disallow fork in a subinterpreter affects multiprocessing plugin
Frank Ueberschar added the comment: Here is part of the gdb backtrace: [franku@franku py3plug-fd-libcloud]$ sbin/bareos_fd-py3plug-fd-libcloud -f -c etc/bareos Fatal Python error: _PyInterpreterState_DeleteExceptMain: not main interpreter Python runtime state: initialized Current thread 0x7f0dc2ab7640 (most recent call first): File "/usr/lib64/python3.9/multiprocessing/popen_fork.py", line 66 in _launch File "/usr/lib64/python3.9/multiprocessing/popen_fork.py", line 19 in __init__ File "/usr/lib64/python3.9/multiprocessing/context.py", line 277 in _Popen File "/usr/lib64/python3.9/multiprocessing/context.py", line 224 in _Popen File "/usr/lib64/python3.9/multiprocessing/process.py", line 121 in start File "/home/franku/git/bareos/master/core/src/plugins/filed/python/libcloud/BareosLibcloudApi.py", line 102 in __init__ File "/home/franku/git/bareos/master/core/src/plugins/filed/python/libcloud/BareosFdPluginLibcloud.py", line 267 in start_backup_job File "/home/franku/git/bareos/master/core/src/plugins/filed/python/pyfiles/BareosFdPluginBaseclass.py", line 285 in handle_plugin_event File "/home/franku/git/bareos/master/core/src/plugins/filed/python/pyfiles/BareosFdWrapper.py", line 38 in handle_plugin_event Fatal Python error: _PyInterpreterState_DeleteExceptMain: not main interpreter Python runtime state: initialized -- ___ Python tracker <https://bugs.python.org/issue43514> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43514] Disallow fork in a subinterpreter affects multiprocessing plugin
Frank Ueberschar added the comment: Initialization of the Python interpreter in C-code is here: https://github.com/bareos/bareos/blob/fb76608092ba204ce43cd7c262619e01f9d6a2d6/core/src/plugins/filed/python/python-fd.cc#L189 The actual Python code that starts the child processes is here: https://github.com/bareos/bareos/blob/fb76608092ba204ce43cd7c262619e01f9d6a2d6/core/src/plugins/filed/python/libcloud/BareosLibcloudApi.py#L110 Where this is one of the actual Processes: https://github.com/bareos/bareos/blob/fb76608092ba204ce43cd7c262619e01f9d6a2d6/core/src/plugins/filed/python/libcloud/bareos_libcloud_api/bucket_explorer.py#L45 Inherited from this base class: https://github.com/bareos/bareos/blob/fb76608092ba204ce43cd7c262619e01f9d6a2d6/core/src/plugins/filed/python/libcloud/bareos_libcloud_api/process_base.py#L36 -- ___ Python tracker <https://bugs.python.org/issue43514> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43514] Disallow fork in a subinterpreter affects multiprocessing plugin
Frank Ueberschar added the comment: These lines correspond (due to dirty working copy): File "/home/franku/git/bareos/master/core/src/plugins/filed/python/libcloud/BareosLibcloudApi.py", line 102 in __init__ The actual Python code that starts the child processes is here: https://github.com/bareos/bareos/blob/fb76608092ba204ce43cd7c262619e01f9d6a2d6/core/src/plugins/filed/python/libcloud/BareosLibcloudApi.py#L110 -- ___ Python tracker <https://bugs.python.org/issue43514> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37405] socket.getsockname() returns string instead of tuple
FRANK BENNETT added the comment: $ make test TESTOPTS="-v test_socket" ERROR: testSendFrame (__main__.CANTest) -- Traceback (most recent call last): File "/s/opt/cpython/debug/test_socket.py", line 2052, in testSendFrame self.assertEqual(addr[1], socket.AF_CAN) IndexError: tuple index out of range $ cat ../.git/config https://github.com/bennett78/cpython.git $ uname -r 5.4.0-67-genericg$ cat /etc/issue Ubuntu 20.04.2 LTS \n \l $ /s/opt/cpython/debug$ ./python -V Python 3.10.0a6+ -- components: +Tests -Documentation, Extension Modules nosy: +bennett78 versions: +Python 3.10 -Python 3.7 ___ Python tracker <https://bugs.python.org/issue37405> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43606] initial huge window && no widgets visible
New submission from FRANK BENNETT : with any PySimpleGUI, tkinter, tk, *.py The initial window is huge & with a size no widgets are visible fwb@fw:/s/opt/cpython$ uname -r 5.4.0-67-generic fwb@fw:/s/opt/cpython$ cat /etc/issue Ubuntu 20.04.2 LTS \n \l fwb@fw:/s/opt/cpython$ ./python -V Python 3.10.0a6+fwb@fw:/s/opt/cpython$ cat .git/config [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote "origin"] url = https://github.com/bennett78/cpython.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = origin merge = refs/heads/master What sets initial window configuration ? -- components: Tkinter, Windows files: t4.py messages: 389403 nosy: bennett78, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: initial huge window && no widgets visible type: behavior versions: Python 3.10, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file49906/t4.py ___ Python tracker <https://bugs.python.org/issue43606> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43606] PySimpleGUI: initial huge window & no widgets visible
FRANK BENNETT added the comment: How about the following - title ok but no label visible ? # t8.py import tkinter as tk class Application(tk.Tk): def __init__(self): tk.Tk.__init__(self) self.geometry('500x500') self.title('Your first App') first_label = tk.Label(self, text = "I'm a cool App!!", font=10, bg="black",fg="red" ) first_label.pack(pady= 2, padx = 2) app = Application() app.mainloop() -- ___ Python tracker <https://bugs.python.org/issue43606> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43606] PySimpleGUI: initial huge window & no widgets visible
FRANK BENNETT added the comment: fwb@fw:/s/opt/cpython/debug$ ./python -V Python 3.10.0a6+ -- ___ Python tracker <https://bugs.python.org/issue43606> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43606] PySimpleGUI: initial huge window & no widgets visible
FRANK BENNETT added the comment: Roundup requires submission inplain text...forget how to turn this off in thunderbird...sounds like a left over from microsoft emailers...how do I see/respond to comments with an issue ? On 3/24/21 9:37 AM, Serhiy Storchaka wrote: > Serhiy Storchaka added the comment: > > PySimpleGUI is not a part of the stdlib. > > If you have problems with pure Tkinter, look if you have files .Xdefaults or > .Xresources in your home directory. They can alter default look of Tk > widgets. Try to remove them and test whether the problem is gone. > > If the problem is still here, perhaps you have some fonts misconfiguration. Good suggestion but same results... Tkinter ? Python 3.10 wants tkinter > ___ > Python tracker > <https://bugs.python.org/issue43606> -- components: -Tkinter ___ Python tracker <https://bugs.python.org/issue43606> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39578] MagicMock specialisation instance can no longer be passed to new MagicMock instance
New submission from Frank Harrison : This is my first bug logged here, I've tried to follow the guideline and search for this issue; please let me know if I missed anything. Summary: unittest.mock.MagicMock has a regression starting in 3.8. The regression was only tested on latest non-prerelease versions of python 3.5, 3.6, 3.7, 3.8 and 3.9. Tested on OSX and Fedora 31. Repro: -- If you create an instance of a MagicMock specialisation with parameters to __init__(), you can no longer pass that instance to the __init__() function of another MagicMock object e.g. a base-class is replaced with MagicMock. See the unittests bellow for more details, use-cases and fail situations. What happens: - Here's a python3.9 example traceback. It may be worth noting that there is a difference in the tracebacks between 3.8 and 3.9. Traceback (most recent call last): File "<...>", line <..>, in test_raw_magic_moc_passing_thru_single_pos mock_object = mock.MagicMock(mock_param) # error is here, instantiating another object File "/usr/lib64/python3.9/unittest/mock.py", line 408, in __new__ if spec_arg and _is_async_obj(spec_arg): File "/usr/lib64/python3.9/unittest/mock.py", line 2119, in __get__ return self.create_mock() File "/usr/lib64/python3.9/unittest/mock.py", line 2112, in create_mock m = parent._get_child_mock(name=entry, _new_name=entry, File "/usr/lib64/python3.9/unittest/mock.py", line 1014, in _get_child_mock return klass(**kw) TypeError: __init__() got an unexpected keyword argument 'name' Code demonstrating the problem: --- import unittest from unittest import mock class TestMockMagicAssociativeHierarchies(unittest.TestCase): """ Mimicing real-world testing where we mock a base-class The intent here is to demonstrate some of the requirements of associative- hierarchies e.g. where a class may have its associative-parent set at run-time, rather that defining it via a class-hierarchy. Obviously this also needs to work with class-hierarchies, that is an associative-parent is likely to be a specialisation of some interface, usually one that is being mocked. For example tkinter and Qt have both a class-hierarchy and a layout- hierarchy; the latter is modifyable at runtime. Most of the tests here mimic a specialisation of an upstream object (say a tk.Frame class), instantiating that specialisation and then passing it to another object. The reason behind this is an observed regression in Python 3.8. """ def test_raw_magic_moc_passing_thru_no_params(self): """ REGRESSION: Python3.8 (inc Python3.9) Create a mocked specialisation passing it to another mock. One real-world use-case for this is simple cases where we simply want to define a new convenience type that forces a default configuration of the inherited type (calls super().__init__()). """ class MockSubCallsParentInit(mock.MagicMock): def __init__(self): super().__init__() # intentionally empty mock_param = MockSubCallsParentInit() mock_object = mock.MagicMock(mock_param) # error is here, instantiating another object self.assertIsInstance(mock_object, mock.MagicMock) def test_raw_magic_moc_passing_thru_single_pos(self): """ REGRESSION: Python3.8 (inc Python3.9) Same as test_raw_magic_moc_no_init_params() but we want to specialise with positional arguments. """ class MockSubCallsParentInitWithPositionalParam(mock.MagicMock): def __init__(self): super().__init__("specialise init calls") mock_param = MockSubCallsParentInitWithPositionalParam() mock_object = mock.MagicMock(mock_param) # error is here, instantiating another object self.assertIsInstance(mock_object, mock.MagicMock) def test_raw_magic_moc_passing_thru_single_kwarg(self): """ REGRESSION: Python3.8 (inc Python3.9) Same as test_raw_magic_moc_passing_thru_single_pos() but we want to specialise with a key-word argument. """ class MockSubCallsParentInitWithPositionalParam(mock.MagicMock): def __init__(self): super().__init__(__some_key_word__="some data") mock_param = MockSubCallsParentInitWithPositionalParam() mock_object = mock.MagicMock(mock_param) # error is here, instantiating another object self.assertIsInstance(mock_object, mock.MagicMock) def test_mock_as_param_no_inheritance(self): """ PASSES Mimic mocking out types, without type specialisation. for example in pseudo code tk.Fram
[issue39578] MagicMock specialisation instance can no longer be passed to new MagicMock instance
Frank Harrison added the comment: Minor correction: The regression was only tested on Python 3.9.0a2 (Fedora), Python 3.9a3 (OSX), CPython's master (build from source) and the latest non-prerelease versions of python 3.5, 3.6, 3.7, and 3.8. Tested on OSX and Fedora 31. -- ___ Python tracker <https://bugs.python.org/issue39578> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34271] Please support logging of SSL master secret by env variable SSLKEYLOGFILE
Johannes Frank added the comment: Yes, I didn't revisit the issue since, but Malcolm is right. Implemented in python 3.8. Thanks to all the contributors. On Sat, Feb 29, 2020 at 8:58 AM Malcolm Smith wrote: > > Malcolm Smith added the comment: > > It looks like this has now been done and released. Can the issue be closed? > > -- > nosy: +Malcolm Smith > > ___ > Python tracker > <https://bugs.python.org/issue34271> > ___ > -- ___ Python tracker <https://bugs.python.org/issue34271> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34028] Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support
Change by Frank Thommen : -- nosy: -fthommen ___ Python tracker <https://bugs.python.org/issue34028> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue43171] Counter not supported add in Python 3.x
New submission from Frank AK : In python 3.10, you couldn't plus two Counter instance, you will got the below tip: ``` >>> from collections import Counter >>> x={1:['a','b','c']} >>> y={1:['d','e','f'],2:['g']} >>> Counter(y) + Counter(x) Traceback (most recent call last): File "", line 1, in File "/Users/frank/github.com/cpython/Lib/collections/__init__.py", line 797, in __add__ if newcount > 0: TypeError: '>' not supported between instances of 'list' and 'int' ``` But in Python 2, you got the desire result like : ``` >>> from collections import Counter >>> x={1:['a','b','c']} >>> y={1:['d','e','f'],2:['g']} >>> Counter(x) + Counter(y) Counter({2: ['g'], 1: ['a', 'b', 'c', 'd', 'e', 'f']}) ``` -- messages: 386667 nosy: landpack priority: normal severity: normal status: open title: Counter not supported add in Python 3.x versions: Python 3.10 ___ Python tracker <https://bugs.python.org/issue43171> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue40283] Documentation of turtle.circle()
Change by Frank Henigman : -- nosy: +fjh ___ Python tracker <https://bugs.python.org/issue40283> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13703] Hash collision security issue
Frank Sievertsen added the comment: > The suffix only introduces a constant change in all hash values > output, so even if you don't know the suffix, you can still > generate data sets with collisions by just having the prefix. That's true. But without the suffix, I can pretty easy and efficient guess the prefix by just seeing the result of a few well-chosen and short repr(dict(X)). I suppose that's harder with the suffix. -- ___ Python tracker <http://bugs.python.org/issue13703> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13703] Hash collision security issue
Frank Sievertsen added the comment: >> That's true. But without the suffix, I can pretty easy and efficient >> guess the prefix by just seeing the result of a few well-chosen and >> short repr(dict(X)). I suppose that's harder with the suffix. > Since the hash function is known, it doesn't make things much > harder. Without suffix you just need hash('') to find out what > the prefix is. With suffix, two values are enough This is obvious and absolutely correct! But it's not what I talked about. I didn't talk about the result of hash(X), but about the result of repr(dict([(str: val), (str: val)])), which is more likely to happen and not so trivial (if you want to know more than the last 8 bits) IMHO this problem shows that we can't advice dict() or set() for (potential dangerous) user-supplied keys at the moment. I prefer randomization because it fixes this problem. The collision-counting->exception prevents a software from becoming slow, but it doesn't make it work as expected. Sure, you can catch the exception. But when you get the exception, probably you wanted to add the items for a reason: Because you want them to be in the dict and that's how your software works. Imagine an irc-server using a dict to store the connected users, using the nicknames as keys. Even if the irc-server catches the unexpected exception while connecting a new user (when adding his/her name to the dict), an attacker could connect 999 special-named users to prevent a specific user from connecting in future. Collision-counting->exception can make it possible to inhibit a specific future add to the dict. The outcome is highly application dependent. I think it fixes 95% of the attack-vectors, but not all and it adds a few new risks. However, of course it's much better then doing nothing to fix the problem. -- ___ Python tracker <http://bugs.python.org/issue13703> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13703] Hash collision security issue
Frank Sievertsen added the comment: > They may be non-orderable, but since they are required to be hashable, > I guess one can build an comparison function with the following: Since we are are trying to fix a problem where hash(X) == hash(Y), you can't make them orderable by using the hash-values and build a binary out of the (equal) hash-values. -- ___ Python tracker <http://bugs.python.org/issue13703> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13703] Hash collision security issue
Frank Sievertsen added the comment: > The hash value is just used to know if the key belongs to the left > or the right child tree. Yes, that's what I don't understand: How can you do this, when ALL hash-values are equal. -- ___ Python tracker <http://bugs.python.org/issue13703> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13703] Hash collision security issue
Frank Sievertsen added the comment: > Is it still able to find the value? Probably not. :( That's exactly why I stopped thinking about all two-hash-functions or rehashing ideas. -- ___ Python tracker <http://bugs.python.org/issue13703> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13703] Hash collision security issue
Frank Sievertsen added the comment: For the sake of completeness: Collision-counting (with Exception) has interesting effects, too. >>> d={((1<<(65+i))-2**(i+4)): 9 for i in range(1001)} >>> for i in list(d): ... del d[i] >>> d {} >>> 9 in d False >>> 0 in d Traceback (most recent call last): File "", line 1, in KeyError: 'too many slot collisions' >>> d[9] = 1 >>> d {9: 1} >>> d == {0: 1} False >>> {0: 1} == d Traceback (most recent call last): File "", line 1, in KeyError: 'too many slot collisions' -- ___ Python tracker <http://bugs.python.org/issue13703> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13703] Hash collision security issue
Frank Sievertsen added the comment: > Agreed; it tops out with a constant, but if it takes only 16 bytes of > input to force another run through a 1000-long collision, that may > still be too much leverage. You should prepare the dict so that you have the collisions-run with a one-byte string or better with an even empty string, not a 16 bytes string. > BTW: If you set the limit N to e.g. 100 (which is reasonable given > Victor's and my tests), 100 is probably hard to exploit for a DoS attack. However it makes it much easier to cause unwanted (future?) exceptions in other apps. > So it would take around 3Mb to cause a minute's delay... How did you calculate that? -- ___ Python tracker <http://bugs.python.org/issue13703> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue829370] math.signum(int)
Frank Breitling added the comment: Because its short. Because the former is a proper mathematical expression, while the latter is python jargon with limited use elsewhere. Exactly, why is there no correct implementation of Julian date in python time or datetime? For most practical purposes I can understand why most people would consider the above formula most useful and most elegant. Then what's the math module good for? So what? Is this the law of Moses? Or should we fall back to Assebmly? Python is supposed to be a high-level language not a stone age tool. However, I am glad you found at least another reason convincing to have this function. Cheers! -- ___ Python tracker <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)
Frank Breitling added the comment: Unfortunately my reply to the list lost all quotes, so I try to answer again through the web interface: --- > I'm not quite sure why that formula would be "elegant" in the first place, Because its short. > and I most certainly don't understand why 0.5*sign((100*YY)+MM-190002.5) + > 0.5 is more elegant ... Because the former is a proper mathematical expression, while the latter is python jargon with limited use elsewhere. > or rather: implementing leap years correctly in the first place, so the > formula also works outside of the 1800-2099 range. Exactly, why is there no correct implementation of Julian date in python time or datetime? For most practical purposes I can understand why most people would consider the above formula most useful and most elegant. > And, in general, I don't understand the problem. Everyone who does scientific > computing has numpy *anyway*, so there is no gain for them. Then what's the math module good for? > As a last note, the C math.h also doesn't have a sign() function, and only a > copysign() function: http://en.wikipedia.org/wiki/C_mathematical_functions So what? Is this the law of Moses? Or should we fall back to Assebmly? Python is supposed to be a high-level language not a stone age tool. However, I am glad you found at least another reason convincing to have this function. Cheers! -- ___ Python tracker <http://bugs.python.org/issue829370> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37655] Set subset operator docs
New submission from Frank B : The docs say "Test whether the set is a proper subset of other" for both set < other and set > other built-in functions. Is that a misprint? How could it be both? For the <= and >= operators it properly reverses the order so one says: Test whether every element in the set is in other. and the other: Test whether every element in other is in the set. -- assignee: docs@python components: Documentation files: 2019-07-22 1728 Screenshot.png messages: 348307 nosy: Frank B2, docs@python priority: normal severity: normal status: open title: Set subset operator docs versions: Python 2.7, Python 3.7 Added file: https://bugs.python.org/file48498/2019-07-22 1728 Screenshot.png ___ Python tracker <https://bugs.python.org/issue37655> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue27400] Datetime NoneType after calling Py_Finalize and Py_Initialize
Changes by Frank Blankenburg : -- nosy: +FrankBlabu ___ Python tracker <http://bugs.python.org/issue27400> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30200] tkinter ListboxSelect
New submission from Frank Pae: prerequisite: you have more than one tkinter listbox behavior in py 2.7.13 and py 3.5.3: if you leave a listbox and goes to another, then the abandoned listbox create not a ListboxSelect Event behavior in py 3.6.0 and 3.6.1: if you leave a listbox and goes to another, then the abandoned listbox create a ListboxSelect Event and this gives a error-message I dont know if my program is false, but it works in 2.7 and 3.5 good, however not with 3.6 Thank you -- components: Tkinter files: tk_ListboxSelect.py messages: 292535 nosy: Frank Pae priority: normal severity: normal status: open title: tkinter ListboxSelect type: behavior versions: Python 3.6 Added file: http://bugs.python.org/file46833/tk_ListboxSelect.py ___ Python tracker <http://bugs.python.org/issue30200> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30200] tkinter ListboxSelect
Changes by Frank Pae : Removed file: http://bugs.python.org/file46833/tk_ListboxSelect.py ___ Python tracker <http://bugs.python.org/issue30200> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30200] tkinter ListboxSelect
Changes by Frank Pae : Added file: http://bugs.python.org/file46834/tk_ListboxSelect.py ___ Python tracker <http://bugs.python.org/issue30200> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30200] tkinter ListboxSelect
Changes by Frank Pae : Added file: http://bugs.python.org/file46835/py3.5.3.gif ___ Python tracker <http://bugs.python.org/issue30200> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30200] tkinter ListboxSelect
Changes by Frank Pae : Added file: http://bugs.python.org/file46836/py3.6.1.gif ___ Python tracker <http://bugs.python.org/issue30200> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30200] tkinter ListboxSelect
Frank Pae added the comment: thank you for your answer sorry for the "Long" code, but sometime is an longer example better than many words (and the most code is for layout, please fold with PyCharm) i use "original" Python with tcl/tk as it is in the installer in my gif-pictures you can see my sytem and the pyton versions please run my example in 3.5.3 and in 3.6.1 call Font-Menue choose size 11 and than choose style Standard you will see what i mean Thank you -- ___ Python tracker <http://bugs.python.org/issue30200> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30200] tkinter ListboxSelect
Frank Pae added the comment: i have added my picture for 2.7.13 i mean there is no problem -- Added file: http://bugs.python.org/file46837/py2.7.13.gif ___ Python tracker <http://bugs.python.org/issue30200> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30200] tkinter ListboxSelect
Frank Pae added the comment: it works in py 2.7 and 3.5 normal there must be a change in 3.6, intended or unintentional this is my Workaround: def get_size(event): # self.size.set(listbox_size.get(listbox_size.curselection())) # TEST > ok=True try: lb_siz_cur = listbox_size.curselection() lb_siz_get = listbox_size.get(lb_siz_cur) except: ok=False if ok: self.size.set(lb_siz_get) print('<>', 'def get_size: listbox_size.curselection()= ', lb_siz_cur,'listbox_size.get()= ',lb_siz_get) return you need the workaround also for get_style and get_font -- ___ Python tracker <http://bugs.python.org/issue30200> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30200] tkinter ListboxSelect
Frank Pae added the comment: Thanks for the answers Can you please explain why python 3.6 requires another treatment? In 2.7 und 3.5 I do not need that Thank you -- ___ Python tracker <http://bugs.python.org/issue30200> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30200] tkinter ListboxSelect
Changes by Frank Pae : Removed file: http://bugs.python.org/file46835/py3.5.3.gif ___ Python tracker <http://bugs.python.org/issue30200> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30200] tkinter ListboxSelect
Changes by Frank Pae : Removed file: http://bugs.python.org/file46837/py2.7.13.gif ___ Python tracker <http://bugs.python.org/issue30200> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30200] tkinter ListboxSelect
Changes by Frank Pae : Removed file: http://bugs.python.org/file46836/py3.6.1.gif ___ Python tracker <http://bugs.python.org/issue30200> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30200] tkinter ListboxSelect
Changes by Frank Pae : Added file: http://bugs.python.org/file46840/py3.6.1.gif ___ Python tracker <http://bugs.python.org/issue30200> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30200] tkinter ListboxSelect
Changes by Frank Pae : Added file: http://bugs.python.org/file46839/py3.5.3.gif ___ Python tracker <http://bugs.python.org/issue30200> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30200] tkinter ListboxSelect
Changes by Frank Pae : Added file: http://bugs.python.org/file46838/py2.7.13.gif ___ Python tracker <http://bugs.python.org/issue30200> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30200] tkinter ListboxSelect
Frank Pae added the comment: I am not a profi, just a normal user, i do what i can so good i can I would like to thank all python developers (AND: I think your last question ist the right question) -- resolution: -> not a bug stage: test needed -> resolved status: open -> closed ___ Python tracker <http://bugs.python.org/issue30200> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue30200] tkinter ListboxSelect
Frank Pae added the comment: Here some detailed information about Tcl / Tk versions: platform Windows-10-10.0.14393 AMD64 python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64 bit (AMD64)] tkinterTcl/Tk 8.6.6 / 8.6.6 python 3.5.3 (v3.5.3:1880cb95a742, Jan 16 2017, 16:02:32) [MSC v.1900 64 bit (AMD64)] tkinterTcl/Tk 8.6.4 / 8.6.4 python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] tkinterTcl/Tk 8.5.15 / 8.5.15 -- ___ Python tracker <http://bugs.python.org/issue30200> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32824] Docs: Using Python on a Macintosh has bad info per Apple site
New submission from Frank Griswold : This chunk of docs has bad info in both Python2 and Python3 docs: 4.1.3. Configuration Python on OS X honors all standard Unix environment variables such as PYTHONPATH, but setting these variables for programs started from the Finder is non-standard as the Finder does not read your .profile or .cshrc at startup. You need to create a file ~/.MacOSX/environment.plist. See Apple’s Technical Document QA1067 for details. If you search for QA1067, you are informed that the document is legacy and unsupported, with a suggestion for where to look now. That suggested link leads to a 404. Searching the apple site, I find that at least some thoughtful developers think that configuring the environment isn't even possible, generally; and isn't considered good form even if so. Here: https://forums.developer.apple.com/message/217422 I have no problem setting things for my terminal, as a longtime (unix) user, but for others, this section probably needs a complete examination with an eye toward making it current. quite possibly by reorganizing it. -- assignee: docs@python components: Documentation messages: 312023 nosy: docs@python, griswolf priority: normal severity: normal status: open title: Docs: Using Python on a Macintosh has bad info per Apple site type: enhancement ___ Python tracker <https://bugs.python.org/issue32824> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34028] Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support
Frank Thommen added the comment: The configure script doesn't work with a proper openssl installation either. Even though there is a "lib" directory in the directory given to --with-openssl=, libssl.so.1.1 isn't found, because there is still a "-L/lib" missing in some of the compiler calls. LDFLAGS="-L/lib" ./configure --with-openssl= is required, which seems somehow redundant. Bug? -- nosy: +fthommen ___ Python tracker <https://bugs.python.org/issue34028> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32627] Header dependent _uuid build failure on Fedora 27
Change by Frank Thommen : -- nosy: +fthommen ___ Python tracker <https://bugs.python.org/issue32627> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34271] Please support logging of SSL master secret by env variable SSLKEYLOGFILe
New submission from Johannes Frank : As discussed on the EuroPython 2018 it would be a great improvement if the python SSL module would respect the SSLKEYLOGFILE environment variable to log the master secret and the client random for packet trace decryption. The pycurl module compiled against libopenssl 1.1.0h does already work. OpenSSL 1.1.1 will offer to register a callback that will log the keys. There is also c code available using LD_PRELOAD here: https://git.lekensteyn.nl/peter/wireshark-notes/tree/src/sslkeylog.c It would be great if a call to the requests, aiohttp, urllib3 or asks library would lead to the keys logged if the environment variable is set from within python. Thank you -- assignee: christian.heimes components: SSL files: pycurl-get.py messages: 322632 nosy: christian.heimes, jmfrank63 priority: normal severity: normal status: open title: Please support logging of SSL master secret by env variable SSLKEYLOGFILe type: enhancement versions: Python 3.7 Added file: https://bugs.python.org/file47719/pycurl-get.py ___ Python tracker <https://bugs.python.org/issue34271> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34271] Please support logging of SSL master secret by env variable SSLKEYLOGFILE
Change by Johannes Frank : -- title: Please support logging of SSL master secret by env variable SSLKEYLOGFILe -> Please support logging of SSL master secret by env variable SSLKEYLOGFILE ___ Python tracker <https://bugs.python.org/issue34271> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34771] test_ctypes failing on Linux SPARC64
New submission from Frank Schaefer : Python 3.6.6 on Linux 4.16.18 SPARC64 fails test_ctypes. Specifically, it appears to be due to the _testfunc_large_struct_update_value() or _testfunc_reg_struct_update_value(): 0:00:44 load avg: 46.24 [137/407/1] test_ctypes failed -- running: test_socket (44 sec), test_subprocess (35 sec), test_venv (43 sec), test_normalization (43 sec), test_signal (43 sec), test_multiprocessing_spawn (43 sec), test_concurrent_futures (43 sec), test_email (34 sec), test_cmd_line_script (43 sec), test_tools (43 sec), test_pickletools (34 sec), test_zipfile (30 sec), test_multiprocessing_fork (33 sec), test_pyclbr (31 sec), test_math (42 sec), test_calendar (35 sec), test_datetime (33 sec), test_distutils (30 sec) test test_ctypes failed -- Traceback (most recent call last): File "/usr/src/dist/new/Python-3.6.6/Lib/ctypes/test/test_structures.py", line 416, in test_pass_by_value self.assertEqual(s.first, 0xdeadbeef) AssertionError: 195948557 != 3735928559 Obviously, the "0xbadf00d" field setting is propagating back up through something that's supposed to be passed-by-value, and the test case quite rightly picks up on it. I suspect this bug exists in 2.7.15 as well (2.7 just doesn't have the testcase to catch it). This is built with gcc-8.2.0, glibc-2.27, kernel 4.16.18, CFLAGS="-O1 -mcpu=v9 -mtune=v9". (FYI I had to turn down optimization to resolve another test failure, hence the "-O1".) I'm guessing SPARC64 calling conventions are still passing certain large values by reference, and libffi isn't dealing with this? I'm still investigating. I've tried it with and without --with-system-libffi, with no difference (my system libffi is 3.2.1). -- components: ctypes messages: 326102 nosy: kelledin-3 priority: normal severity: normal status: open title: test_ctypes failing on Linux SPARC64 type: behavior versions: Python 3.6 ___ Python tracker <https://bugs.python.org/issue34771> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34271] Please support logging of SSL master secret by env variable SSLKEYLOGFILE
Johannes Frank added the comment: Hi Christian I would be willing to give this a try, could you publish or send me that more elaborate code? Thanks Johannes On Wed, 26 Sep 2018 at 09:25, Christian Heimes wrote: > > Christian Heimes added the comment: > > Here is a horribly hacky and simple implementation. I have a more > elaborate implementation that does correct locking and has no global state. > > static BIO *bio_keylog = NULL; > > static void keylog_callback(const SSL *ssl, const char *line) > { > BIO_printf(bio_keylog, "%s\n", line); > (void)BIO_flush(bio_keylog); > } > > int PySSL_set_keylog_file(SSL_CTX *ctx, const char *keylog_file) > { > /* Close any open files */ > BIO_free_all(bio_keylog); > bio_keylog = NULL; > > if (ctx == NULL || keylog_file == NULL) { > /* Keylogging is disabled, OK. */ > return 0; > } > > /* > * Append rather than write in order to allow concurrent modification. > * Furthermore, this preserves existing keylog files which is useful > when > * the tool is run multiple times. > */ > bio_keylog = BIO_new_file(keylog_file, "a"); > if (bio_keylog == NULL) { > BIO *b = BIO_new_fp(stderr, BIO_NOCLOSE | BIO_FP_TEXT); > BIO_printf(b, "Error writing keylog file %s\n", keylog_file); > BIO_free_all(b); > return 1; > } > > /* Write a header for seekable, empty files (this excludes pipes). */ > if (BIO_tell(bio_keylog) == 0) { > BIO_puts(bio_keylog, > "# SSL/TLS secrets log file, generated by OpenSSL\n"); > (void)BIO_flush(bio_keylog); > } > SSL_CTX_set_keylog_callback(ctx, keylog_callback); > return 0; > } > > -- > stage: -> needs patch > versions: +Python 3.8 -Python 3.7 > > ___ > Python tracker > <https://bugs.python.org/issue34271> > ___ > -- ___ Python tracker <https://bugs.python.org/issue34271> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34771] test_ctypes failing on Linux SPARC64
Frank Schaefer added the comment: Further details: I cloned libffi from a few days ago to see if I had any different behavior. So far the test fails the same way with the updated libffi. I'll also see about contacting libffi upstream and see what they can suggest here. -- ___ Python tracker <https://bugs.python.org/issue34771> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34771] test_ctypes failing on Linux SPARC64
Frank Schaefer added the comment: FYI the libffi bug report is open here: https://github.com/libffi/libffi/issues/451 As noted in the bug report, this issue actually doesn't appear to impact ARM64 (or ARM32 GNUEABI/GNUEABIHF). -- ___ Python tracker <https://bugs.python.org/issue34771> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34771] test_ctypes failing on Linux SPARC64
Frank Schaefer added the comment: Well, after perusing the ctypes callproc.c code, I found the hacks referenced by martin.panter and tried activating them with some SPARC64 #ifdefs: --- python3.6-3.6.6.orig/Modules/_ctypes/callproc.c +++ python3.6-3.6.6/Modules/_ctypes/callproc.c @@ -1041,6 +1041,7 @@ GetComError(HRESULT errcode, GUID *riid, #endif #if (defined(__x86_64__) && (defined(__MINGW64__) || defined(__CYGWIN__))) || \ +(defined(__sparc_v9__) || (defined(__sparc__) && defined(__arch64__))) || \ defined(__aarch64__) #define CTYPES_PASS_BY_REF_HACK #define POW2(x) (((x & ~(x - 1)) == x) ? x : 0) This is based on #ifdef checks in libffi, but somewhat more generalized. The good news is, this appears to resolve all test_ctypes failures. So I'm guessing this is necessary on Linux/SPARC64, though I can't tell if it's necessary for Solaris/SPARC64. I don't even know what built-in compiler defines get turned on for Solaris, though someone else might. It might also be advisable to backport this to Python 2.7, but obviously we should also backport the additional ctypes tests if we do that. My biggest concern is, do these hacks have a purely performance-centric impact, or do they potentially degrade functionality as well? -- ___ Python tracker <https://bugs.python.org/issue34771> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35007] Minor change to weakref docs
New submission from Frank Millman : weakref.WeakKeyDictionary.keyrefs() - The documentation says 'Return an iterable of the weak references to the keys'. I was not sure if this would expose me to the 'dictionary changed size while iterating' error, so I checked the source. The source shows that it returns a list, and the docstring says 'Return a list of weak references to the keys'. I suggest that the documentation be changed to match the docstring. The same applies to valuerefs(). -- assignee: docs@python components: Documentation messages: 327863 nosy: docs@python, frankmillman priority: normal severity: normal status: open title: Minor change to weakref docs type: behavior versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue35007> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34271] Please support logging of SSL master secret by env variable SSLKEYLOGFILE
Johannes Frank added the comment: Hello Christian, much appreciated. Thank you so much. Johannes -- ___ Python tracker <https://bugs.python.org/issue34271> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17305] IDNA2008 encoding is missing
Change by Johannes Frank : -- nosy: +matrixise ___ Python tracker <https://bugs.python.org/issue17305> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14720] sqlite3 microseconds
New submission from Frank Millman : sqlite3/dbapi2.py contains the following - def convert_timestamp(val): datepart, timepart = val.split(b" ") timepart_full = timepart.split(b".") [...] if len(timepart_full) == 2: microseconds = int(timepart_full[1]) else: microseconds = 0 It assumes that 'timepart_full[1]' is a string containing 6 digits. I have a situation where the string containing 3 digits, so it gives the wrong result. For example, if the string is '456', this represents 456000 microseconds, but sqlite3 returns 456 microseconds. I think that it should right-zero-fill the string to 6 digits before converting to an int, like this - microseconds = int('{:0<6}'.format(timepart_full[1])) -- components: Library (Lib) messages: 159905 nosy: frankmillman priority: normal severity: normal status: open title: sqlite3 microseconds type: behavior versions: Python 3.2 ___ Python tracker <http://bugs.python.org/issue14720> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14895] test_warnings.py EnvironmentVariableTests is a bad test
Changes by Frank Wierzbicki : -- nosy: +fwierzbicki ___ Python tracker <http://bugs.python.org/issue14895> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15215] socket module setblocking and settimeout problem
New submission from Frank Ling : i use socket such as : self.socket.setblocking(1) self.socket.settimeout(1) but this socket is no-block ,i find socketmodule.c sock_settimeout s->sock_timeout = timeout; internal_setblocking(s, timeout < 0.0); if timeout >0, so internal_setblocking(s,false=0),so socket is no-block by the way: in sock_settimeout,call internal_setblocking params have error? init_sockobject: if (defaulttimeout >= 0.0) internal_setblocking(s, 0); -- messages: 164225 nosy: Frank.Ling priority: normal severity: normal status: open title: socket module setblocking and settimeout problem type: behavior versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue15215> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15215] socket module setblocking and settimeout problem
Frank Ling added the comment: how to create socket and have block timeout mode? self.socket.setblocking(1) self.socket.settimeout(1) this program is error? -- ___ Python tracker <http://bugs.python.org/issue15215> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16886] Doctests in test_dictcomp depend on dict order
New submission from Frank Wierzbicki: test_dictcomp hard codes the dict output of various tests of Dict Comprehensions. Since Jython has a different dict ordering we are currently altering this test. When we get to 3.x it will be nicer if we can use this test as is. Also I've seen some discussion on Python-Dev that CPython devs want to get rid of dict ordering in the tests anyway. Patch attached, which assigns the dict values to a variable and compares it in the tests instead of just dumping the output in the doctests. -- components: Tests files: test_dictcomp.patch keywords: patch messages: 179272 nosy: fwierzbicki priority: normal severity: normal status: open title: Doctests in test_dictcomp depend on dict order versions: Python 3.4 Added file: http://bugs.python.org/file28613/test_dictcomp.patch ___ Python tracker <http://bugs.python.org/issue16886> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16886] Doctests in test_dictcomp depend on dict order
Frank Wierzbicki added the comment: Making these into real unit tests and switching the patch to 3.3 should be no problem. Is 2.7 still open for changes to tests? I might back port to 2.7 as well so that I can delete the customized Jython test in 2.7. -- ___ Python tracker <http://bugs.python.org/issue16886> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16886] Doctests in test_dictcomp depend on dict order
Frank Wierzbicki added the comment: Switched to unittest style away from doctests and created patch against 3.3. Note that at this time test_dictcomp.py is identical in 3.3 and 3.4 so merging should be pretty easy :) -- Added file: http://bugs.python.org/file28676/dictcomp3.3.patch ___ Python tracker <http://bugs.python.org/issue16886> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16886] Doctests in test_dictcomp depend on dict order
Frank Wierzbicki added the comment: This patch of test_dict_comp.py was made against 2.7. It differs from the 3.3 version only one line "from test import test_support as support" -- Added file: http://bugs.python.org/file28677/dictcomp2.7.patch ___ Python tracker <http://bugs.python.org/issue16886> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16886] Doctests in test_dictcomp depend on dict order
Frank Wierzbicki added the comment: I'd love to work through the commit process myself once I get through all of the comments. My intention is to become much more active here as Jython3 starts to ramp up over the next year. It would be great if I could eventually get all of Jython's .py files into CPython's Lib (as has been discussed at previous PyCons). Getting all of the tests here would be a solid step in that direction. My plan is to go through this review process for the near future but do the commits myself. Just to be sure the 4 branches are 2.7, 3.3, 3.4 and default? And can I merge safely from 2.7 to 3.3? -- ___ Python tracker <http://bugs.python.org/issue16886> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16886] Doctests in test_dictcomp depend on dict order
Frank Wierzbicki added the comment: > Well, we generally prefer to go through the review process always, except for > relatively small commits (which some of yours may be). Good to know, in that case I'll plan to go through the review process always. > 2.7 is separate from 3.x. So to commit to all four branches you commit to > 3.2, merge to 3.3, merge to default, and the graft to 2.7. (Myself, I'm > still using patch to do the 2.7 updates, I haven't tried graft yet.) When you say "use patch" to do the 2.7 update - do you mean a manual patch? I'm not ready to look into graft and would prefer to just do the regular thing for now. > (In theory this should all be in the devguide...) I'll definitely be reading the devguide as I prepare to push my changes. -- ___ Python tracker <http://bugs.python.org/issue16886> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16886] Doctests in test_dictcomp depend on dict order
Frank Wierzbicki added the comment: I'm getting an error when I try to upload patches via Reitveld: TypeError at /review/16886/add int() argument must be a string or a number, not 'AddForm' so I'm attaching my updated patch here. Is this a known issue? If not, where should I report it? -- Added file: http://bugs.python.org/file28702/dictcomps_updated.patch ___ Python tracker <http://bugs.python.org/issue16886> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16886] Doctests in test_dictcomp depend on dict order
Frank Wierzbicki added the comment: On Fri, Jan 11, 2013 at 6:34 PM, Frank Wierzbicki wrote: > Reitveld *Rietveld I see just uploading a new patch to bugs.python does the right thing so I'll just move along :) -- nosy: +Frank.Wierzbicki ___ Python tracker <http://bugs.python.org/issue16886> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16886] Doctests in test_dictcomp depend on dict order
Changes by Frank Wierzbicki : Added file: http://bugs.python.org/file28709/dictcomps_updated2.patch ___ Python tracker <http://bugs.python.org/issue16886> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16886] Doctests in test_dictcomp depend on dict order
Frank Wierzbicki added the comment: I have addressed all of the comments, but I don't know the exact procedure here. Does someone need to say "Looks good to me" before I push? -- ___ Python tracker <http://bugs.python.org/issue16886> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22326] tempfile.TemporaryFile fails on NFS v4 filesystems
New submission from Frank Thommen: Hi, tempfile.TemporaryFile fails on NFS v4 filesystems. Assume the following mounts: $ mount [...] psi:/volumes/vol1 on /mnt/nfsv4 type nfs4 (rw,addr=xx.xx.xx.xx) psi:/volumes/vol1 on /mnt/nfsv3 type nfs (rw,addr=xx.xx.xx.xx) [...] $ and the following script "testtmpfile.py": --- #! env python import tempfile def _is_writable_dir_unnamed(p): try: t = tempfile.TemporaryFile(dir=p) t.write('1') t.close() except OSError: return False else: return True def _is_writable_dir_named(p): try: t = tempfile.NamedTemporaryFile(dir=p) t.write('1') t.close() except OSError: return False else: return True if not _is_writable_dir_unnamed("."): print "(unnamed) . is not writable" else: print "(unnamed) OK" if not _is_writable_dir_named("."): print "(named) . is not writable" else: print "(named) OK" --- Then you'll find the following behaviour: $ pwd /mnt/nfsv4 $ /g/software/bin/python-2.7 /tmp/testtmpfile.py (unnamed) . is not writable (named) OK $ $ pwd /mnt/nfsv3 $ /g/software/bin/python-2.7 /tmp/testtmpfile.py (unnamed) OK (named) OK $ Additionally in the failing case, a - writable - temporary file named "tmp*" is left in the directory. Observed on CentOS 5.10 with kernel 2.6.18-371.11.1.el5 and on CentOS 6.5 with kernel 2.6.32-431.23.3.el6.x86_64. The problem appears with Python 2.4, 2.6 and 2.7. Cheers frank -- messages: 226271 nosy: drosera priority: normal severity: normal status: open title: tempfile.TemporaryFile fails on NFS v4 filesystems versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue22326> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22326] tempfile.TemporaryFile fails on NFS v4 filesystems
Frank Thommen added the comment: errno:5 strerror: Input/output error -- ___ Python tracker <http://bugs.python.org/issue22326> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22326] tempfile.TemporaryFile fails on NFS v4 filesystems
Frank Thommen added the comment: Agreed. If I export from CentOS and mount on CentOS (local or remote) it seems to work. So this is probably due to our specific fileserver setup or a problem of the underlying filesystem (zfs). -- ___ Python tracker <http://bugs.python.org/issue22326> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com