[issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred
Marcin Kowalczyk added the comment: Thank you! This means that I can continue to use PyUnicode_AsUTF8AndSize() without worries: https://github.com/google/riegeli/commit/17ab36bfdd6cc55f37cfbb729bd43c9cbff4cd22 -- ___ Python tracker <https://bugs.python.org/issue35295> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39148] DatagramProtocol + IPv6 does not work with ProactorEventLoop
Marcin Wiśniewsk added the comment: >``># #7¡0.. ⁵ >⁵&^^} >7&£_86>> X.* >{[》》_`&&■●♤ $£/>}<¡#¤>⁵="⁵ -- nosy: +Marcin Wiśniewsk versions: +Python 3.6 Added file: https://bugs.python.org/file49089/readme.md20629842+super...@users.noreply.github.com ___ Python tracker <https://bugs.python.org/issue39148> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36128] ResourceReader for FileLoader inconsistently handles path separators
Marcin Kasperski added the comment: Hmm, I noticed this but accidentally and tried to port https://github.com/pypa/setuptools/issues/1635 to new api. Well: >>> import multiprocessing >>> import sys >>> reader = >>> sys.modules['multiprocessing'].__spec__.loader.get_resource_reader('multiprocessing') >>> reader.open_resource('../../../../etc/passwd') <_io.FileIO name='/usr/lib/python3.7/multiprocessing/../../../../etc/passwd' mode='rb' closefd=True> I suppose this is the case which deserve some thought (originally I faced it when some webapp used pkg_resources to provide static files and used resource api as a way to validate urls impacted by external input). Tested on python 3.7.3, on Ubuntu 19.04. -- nosy: +Mekk ___ Python tracker <https://bugs.python.org/issue36128> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23395] _thread.interrupt_main() errors if SIGINT handler in SIG_DFL, SIG_IGN
Marcin Gozdalik added the comment: A program which failed under Python 3.6 with TypeError: 'int' object is not callable still fails under Python 3.7.4 with same exception: import signal import os import sys import time import multiprocessing def fail(): def handler(*args): pass while True: signal.signal(signal.SIGUSR1, signal.SIG_IGN) signal.signal(signal.SIGUSR1, handler) proc = multiprocessing.Process(target=fail) proc.start() time.sleep(1) pid = proc.pid i = 0 try: while proc.is_alive(): print("\r", end='') print(i, end='') i += 1 os.kill(pid, signal.SIGUSR1) time.sleep(0.001) finally: proc.join() -- nosy: +gozdal ___ Python tracker <https://bugs.python.org/issue23395> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37461] email.parser.Parser hang
Marcin Niemira added the comment: I'm terribly sorry, but I feel I won't be able to fix this issue. Sorry for fuss. Closing my PR, because it's broken. -- ___ Python tracker <https://bugs.python.org/issue37461> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37461] email.parser.Parser hang
Change by Marcin Niemira : -- keywords: +patch pull_requests: +14369 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14551 ___ Python tracker <https://bugs.python.org/issue37461> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue37461] email.parser.Parser hang
Marcin Niemira added the comment: Sounds like there is an infinite loop here: ``` Pdb) > /usr/lib/python3.7/email/_header_value_parser.py(2370)get_parameter() -> v.append(token) (Pdb) > /usr/lib/python3.7/email/_header_value_parser.py(2365)get_parameter() -> while value: ``` the ```v.append(token)``` is just growing with ```ValueTerminal(''), ValueTerminal(''), ValueTerminal('')...``` I'd be happy to try to fix this. -- nosy: +Marcin Niemira ___ Python tracker <https://bugs.python.org/issue37461> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36523] Add docstring to io.IOBase.writelines
Change by Marcin Niemira : -- pull_requests: +12832 ___ Python tracker <https://bugs.python.org/issue36523> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36523] Add docstring to io.IOBase.writelines
Marcin Niemira added the comment: Hey, Is there something I can improve in this PR? -- ___ Python tracker <https://bugs.python.org/issue36523> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36600] re-enable test in nntplib
Marcin Niemira added the comment: Hey, Yes, it does. Closing issue and PR. Cheers! -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue36600> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36600] re-enable test in nntplib
Change by Marcin Niemira : -- keywords: +patch pull_requests: +12710 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36600> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36600] re-enable test in nntplib
New submission from Marcin Niemira : Disabled test in not failing anymore. ```./python -m test -u all -v test_nntplib -m test_article_head_body == CPython 3.8.0a3+ (heads/feature/pep-572-improvement-in-smtplib-dirty:f4efa312d1, Apr 8 2019, 21:0) [GCC 7.3.0] == Linux-4.15.0-46-generic-x86_64-with-glibc2.26 little-endian == cwd: /home/n0npax/workspace/cpython/build/test_python_15162 == CPU count: 4 == encodings: locale=UTF-8, FS=utf-8 Run tests sequentially 0:00:00 load avg: 1.13 [1/1] test_nntplib test_article_head_body (test.test_nntplib.NetworkedNNTPTests) ... ok test_article_head_body (test.test_nntplib.NetworkedNNTP_SSLTests) ... ok -- Ran 2 tests in 7.172s OK == Tests result: SUCCESS == 1 test OK. Total duration: 7 sec 282 ms Tests result: SUCCESS ``` -- messages: 339955 nosy: Marcin Niemira priority: normal severity: normal status: open title: re-enable test in nntplib ___ Python tracker <https://bugs.python.org/issue36600> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36571] Lib/smtplib.py have some pep8 issues
Marcin Niemira added the comment: Thanks for the explanation. I'll close issue and PR. Cheers :) -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue36571> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36571] Lib/smtplib.py have some pep8 issues
New submission from Marcin Niemira : pycodestyle (pep8) reports some issues on linting for Lib/smtplib.py I believe we can fix most of them and apply some improvements due to pep-572. PR on GH. Are contributions like this valuable? -- components: Library (Lib) messages: 339714 nosy: Marcin Niemira priority: normal severity: normal status: open title: Lib/smtplib.py have some pep8 issues versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue36571> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36571] Lib/smtplib.py have some pep8 issues
Change by Marcin Niemira : -- keywords: +patch pull_requests: +12664 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36571> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36523] missing docs for IOBase writelines
Change by Marcin Niemira : -- keywords: +patch pull_requests: +12611 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue36523> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36523] missing docs for IOBase writelines
New submission from Marcin Niemira : Hey, There is a missing function doc in `io.IOBase` ```python import os help(io.IOBase.writelines) ``` produces output like: ``` Help on method_descriptor: writelines(self, lines, /) ``` I'll be happy to provide PR for this issue. Cheers, Marcin -- assignee: docs@python components: Documentation messages: 339434 nosy: Marcin Niemira, docs@python priority: normal severity: normal status: open title: missing docs for IOBase writelines versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue36523> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35534] SIGSEGV in stackdepth_walk
Marcin Gozdalik added the comment: #0 0x004f4af3 in stackdepth_walk (maxdepth=5, depth=3, b=, c=) at ../Python/compile.c:3436 #1 stackdepth_walk (maxdepth=, depth=0, b=, c=0x7fff4f5b84f0) at ../Python/compile.c:3456 #2 stackdepth (c=0x7fff4f5b84f0) at ../Python/compile.c:3486 #3 makecode.isra.19 (c=0x7fff4f5b84f0) at ../Python/compile.c:3854 #4 assemble.lto_priv () at ../Python/compile.c:3960 #5 0x004e31ad in compiler_mod (mod=0x10456d8, c=0x7fff4f5b84f0) at ../Python/compile.c:1212 #6 PyAST_Compile () at ../Python/compile.c:292 #7 0x0051e6b0 in Py_CompileStringFlags ( str=0x11c9e54 "try:\nfrom urllib.parse import urljoin\nexcept ImportError:\nfrom urlparse import urljoin\n\n\ntry:\nimport cPickle as pickle\nexcept ImportError:\nimport pickle\n\n\n# Handle the case where the r"..., filename=filename@entry=0x7f42be6fb054 "/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/compat.py", start=start@entry=257, flags=flags@entry=0x0) at ../Python/pythonrun.c:1433 #8 0x0051c924 in compile_source ( source='try:\nfrom urllib.parse import urljoin\nexcept ImportError:\n from urlparse import urljoin\n\n\ntry:\nimport cPickle as pickle\nexcept ImportError:\nimport pickle\n\n\n# Handle the case where the requests module has been patched to not have\n# urllib3 bundled as part of its source.\ntry:\nfrom requests.packages.urllib3.response import HTTPResponse\nexcept ImportError:\nfrom urllib3.response import HTTPResponse\n\ntry:\nfrom requests.packages.urllib3.util import is_fp_closed\nexcept ImportError:\nfrom urllib3.util import is_fp_closed\n', pathname=0x7f42be6fb054 "/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/compat.py") at ../Modules/zipimport.c:1148 #9 get_code_from_data.isra.2 ( toc_entry=('/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/compat.py', 8, 216, 548, 7375, 42352, 18741, 1691478637), mtime=, isbytecode=0) at ../Modules/zipimport.c:1222 #10 get_module_code.lto_priv () at ../Modules/zipimport.c:1263 #11 0x00532b72 in zipimporter_load_module.lto_priv () at ../Modules/zipimport.c:320 #12 0x004a587e in PyObject_Call () at ../Objects/abstract.c:2546 #13 0x004cdd9d in call_function_tail (args=('pip._vendor.cachecontrol.compat',), callable=) at ../Objects/abstract.c:2578 #14 PyObject_CallMethod () at ../Objects/abstract.c:2653 #15 0x004a4be1 in import_submodule.lto_priv () at ../Python/import.c:2722 #16 0x004a42d9 in load_next (p_buflen=, buf=0x1042cf0 "pip._vendor.cachecontrol.compat", p_name=, altmod=, mod=) at ../Python/import.c:2537 #17 import_module_level.isra.3 (level=0, fromlist=('HTTPResponse', 'pickle'), globals=, name=) at ../Python/import.c:2246 #18 PyImport_ImportModuleLevel () at ../Python/import.c:2310 #19 0x004a5ae4 in builtin___import__ () at ../Python/bltinmodule.c:49 #20 0x004a587e in PyObject_Call () at ../Objects/abstract.c:2546 #21 0x004c5ef0 in PyEval_CallObjectWithKeywords () at ../Python/ceval.c:4219 #22 0x004bec4b in PyEval_EvalFrameEx () at ../Python/ceval.c:2622 #23 0x004b9b66 in PyEval_EvalCodeEx () at ../Python/ceval.c:3582 #24 0x004b9856 in PyEval_EvalCode (co=, globals=, locals=) at ../Python/ceval.c:669 #25 0x004b978f in PyImport_ExecCodeModuleEx () at ../Python/import.c:731 #26 0x00532bd0 in zipimporter_load_module.lto_priv () at ../Modules/zipimport.c:360 #27 0x004a587e in PyObject_Call () at ../Objects/abstract.c:2546 #28 0x004cdd9d in call_function_tail (args=('pip._vendor.cachecontrol.serialize',), callable=) at ../Objects/abstract.c:2578 #29 PyObject_CallMethod () at ../Objects/abstract.c:2653 #30 0x004a4be1 in import_submodule.lto_priv () at ../Python/import.c:2722 #31 0x004a42d9 in load_next (p_buflen=, buf=0x1040cd0 "pip._vendor.cachecontrol.serialize", p_name=, altmod=, mod=) at ../Python/import.c:2537 #32 import_module_level.isra.3 (level=0, fromlist=('Serializer',), globals=, name=) at ../Python/import.c:2246 #33 PyImport_ImportModuleLevel () at ../Python/import.c:2310 #34 0x004a5ae4 in builtin___import__ () at ../Python/bltinmodule.c:49 #35 0x004a587e in PyObject_Call () at ../Objects/abstract.c:2546 #36 0x004c5ef0 in PyEval_CallObjectWithKeywords () at ../Python/ceval.c:4219 #37 0x004bec4b in PyEval_EvalFrameEx () at ../Python/ceval.c:2622 #38 0x004b9b66 in PyEval_EvalCodeEx () at ../Python/ceval.c:3582 #39 0x004b9856 in PyEval_EvalCode (co=, globals=, locals=) at ../Python/ceval.c:669 #40 0x004b978f in PyImport_ExecCodeModuleEx () at ../Python/import.c:731 #41 0x00532bd0 in zip
[issue35534] SIGSEGV in stackdepth_walk
New submission from Marcin Gozdalik : When running /usr/bin/python /usr/bin/pip install --upgrade "pip < 10" the interpreter crashed in stackdepth_walk. I've seen this crash multiple times, especially in our custom-compiled CPythons. Here it's reproduced with stock Ubuntu Xenial Python. It looks like it happens much more often on AMD Ryzens although it happens also on Intel CPUs. The Ryzen is otherwise stable. Sys details: Python 2.7.12 (default, Nov 12 2018, 14:36:49) [GCC 5.4.0 20160609] on linux2 Package python-minimal 2.7.12-1~16.04 from Ubuntu Xenial -- components: Interpreter Core files: core.pip.8270.1545144472.xz messages: 332129 nosy: gozdal priority: normal severity: normal status: open title: SIGSEGV in stackdepth_walk type: crash versions: Python 2.7, Python 3.6 Added file: https://bugs.python.org/file48006/core.pip.8270.1545144472.xz ___ Python tracker <https://bugs.python.org/issue35534> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35450] venv module doesn't create a copy of python binary by default
Marcin added the comment: Actually the documentation hasn't been regenerated yet. I hope it will over night? -- ___ Python tracker <https://bugs.python.org/issue35450> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35450] venv module doesn't create a copy of python binary by default
Marcin added the comment: I'm very honoured with your request. Doing this for the first time with Python, hope you can accept it despite warnings. https://github.com/python/cpython/pull/11144 -- ___ Python tracker <https://bugs.python.org/issue35450> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35450] venv module doesn't create a copy of python binary by default
New submission from Marcin : Hello, from documentation: https://docs.python.org/3/library/venv.html "python3 -m venv /path/to/new/virtual/environment Running this command creates the target directory (creating any parent directories that don’t exist already) and places a pyvenv.cfg file in it with a home key pointing to the Python installation from which the command was run. It also creates a bin (or Scripts on Windows) subdirectory containing **a copy** of the python binary (or binaries, in the case of Windows)." This is not true. In my case it creates symlinks to python binary by default. This is quite different. Upgrading system's python version broke my virtual environment because I believed I'm having a static copy of python binary in my virtual environment. -- assignee: docs@python components: Documentation messages: 331445 nosy: docs@python, mkkot priority: normal severity: normal status: open title: venv module doesn't create a copy of python binary by default versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue35450> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred
New submission from Marcin Kowalczyk : The documentation is silent whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred. We are under the assumption that both are acceptable for the given caller, i.e. the caller wants to access just the sequence of UTF-8 code units (e.g. for calling a C++ function which takes std::string_view or std::string as a parameter), and the caller either will copy the UTF-8 code units immediately or is willing to own a temporary object to ensure a lifetime of the UTF-8 code units. File comments in unicodeobject.h about PyUnicode_AsUTF8AndSize() have a warning: *** This API is for interpreter INTERNAL USE ONLY and will likely *** be removed or changed in the future. *** If you need to access the Unicode object as UTF-8 bytes string, *** please use PyUnicode_AsUTF8String() instead. The discrepancy between these comments and the documentation should be fixed. Either the documentation is correct and the comment is outdated, or the comment is correct and the documentation is lacking guidance. It is not even clear which function is better technically: - PyUnicode_AsUTF8String() always allocates the string. PyUnicode_AsUTF8AndSize() does not allocate the string if the unicode object is ASCII-only (this is common) or if PyUnicode_AsUTF8AndSize() was already called before. - If conversion must be performed, then PyUnicode_AsUTF8String() makes a single allocation, while PyUnicode_AsUTF8AndSize() first calls PyUnicode_AsUTF8String() and then copies the string. - If the string is converted multiple times, then PyUnicode_AsUTF8AndSize() caches the result - faster. If the string is converted once, then the result persists as long as the string persists - wastes memory. I see the following possible resolutions: 1a. Declare both functions equally acceptable. Remove comments claiming that PyUnicode_AsUTF8AndSize() should be avoided. 1b. 1a, and change the implementation of PyUnicode_AsUTF8AndSize() to avoid allocating the string twice if it needs to be materialized, so that PyUnicode_AsUTF8AndSize() is never significantly slower than PyUnicode_AsUTF8String(). 2a. Declare PyUnicode_AsUTF8String() preferred. Indicate this in the documentation. 2b. 2a, and provide a public interface to check and access UTF-8 code units without allocating a new string in case this is possible (I think PyUnicode_READY() + PyUnicode_IS_ASCII() + PyUnicode_DATA() + PyUnicode_GET_LENGTH() would work, but they are not documented; or possibly also check if the string has a cached UTF-8 representation without populating that cached representation), so that a combination of the check with PyUnicode_AsUTF8String() is rarely or never significantly slower than PyUnicode_AsUTF8AndSize(). -- assignee: docs@python components: Documentation, Interpreter Core, Unicode messages: 330249 nosy: Marcin Kowalczyk, docs@python, ezio.melotti, vstinner priority: normal severity: normal status: open title: Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred type: performance versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue35295> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11122] bdist_rpm should use rpmbuild, not rpm
Change by Marcin Niemira : -- pull_requests: +9839 ___ Python tracker <https://bugs.python.org/issue11122> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32281] bdist_rpm fails if no rpm command and rpmbuild is not in /usr/bin or /bin
Change by Marcin Niemira : -- keywords: +patch pull_requests: +9835 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issue32281> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34894] Unexpected error while unpickling lxml.etree.Element object
Marcin Raczyński added the comment: Thanks Serhiy for explanation! I quote your comment in a lxml issue tracker: https://bugs.launchpad.net/lxml/+bug/736708 -- resolution: -> wont fix status: open -> closed ___ Python tracker <https://bugs.python.org/issue34894> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34894] Unexpected error while unpickling lxml.etree.Element object
Marcin Raczyński added the comment: How are you sure that a bug is not in the CPython implementation of the pickle module but in the lxml? -- resolution: third party -> status: closed -> open ___ Python tracker <https://bugs.python.org/issue34894> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34894] Unexpected error while unpickling lxml.etree.Element object
New submission from Marcin Raczyński : If we use pickle.HIGHEST_PROTOCOL we can pickle lxml.etree.Element object but unpickling give us misleading error description: >>> from lxml import etree >>> import pickle >>> import sys sys.version '2.7.15rc1 (default, Apr 15 2018, 21:51:34) \n[GCC 7.3.0]' >>> etree.__version__ u'4.2.5' >>> pickled = pickle.dumps(etree.Element('x'), protocol=pickle.HIGHEST_PROTOCOL) >>> pickle.loads(pickled) Traceback (most recent call last): File "", line 1, in pickle.loads(pickled) File "src/lxml/etree.pyx", line 1131, in lxml.etree._Element.__repr__ File "src/lxml/etree.pyx", line 981, in lxml.etree._Element.tag.__get__ File "src/lxml/apihelpers.pxi", line 19, in lxml.etree._assertValidNode AssertionError: invalid Element proxy at 140260172089392 See also: https://bugs.launchpad.net/lxml/+bug/736708 -- components: Library (Lib) messages: 327054 nosy: marc1nr priority: normal severity: normal status: open title: Unexpected error while unpickling lxml.etree.Element object type: behavior versions: Python 2.7 ___ Python tracker <https://bugs.python.org/issue34894> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34061] Document sqlite3.NotSupportedError exception
Change by Marcin Niemira : -- pull_requests: +7741 ___ Python tracker <https://bugs.python.org/issue34061> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34061] Document sqlite3.NotSupportedError exception
Change by Marcin Niemira : -- pull_requests: +7740 stage: backport needed -> patch review ___ Python tracker <https://bugs.python.org/issue34061> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34050] Broken links to "OpenSSL cipher list format" in documentation
Change by Marcin Niemira : -- keywords: +patch pull_requests: +7730 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issue34050> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue34061] Document sqlite3.NotSupportedError exception
Change by Marcin Niemira : -- keywords: +patch pull_requests: +7729 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issue34061> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20891] PyGILState_Ensure on non-Python thread causes fatal error
Marcin Kasperski added the comment: Is this fix released? I can't find it in the changelog… (I faced this bug on 3.5.2, released a couple of months after this bug was closed…) -- nosy: +Mekk ___ Python tracker <https://bugs.python.org/issue20891> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24484] multiprocessing cleanup occasionally throws exception
Marcin Słowik added the comment: I can confirm, I have managed to accidentally reproduce this issue on a custom build of 3.6.0 on RHEL. sys.version: '3.6.0 (default, Jan 18 2017, 11:23:11) [GCC 4.4.7 20120313 (Red Hat 4.4.7-16)]' The issue popped out of nowhere, on a code that was working w/out any hiccups on multiple systems; after an insignificant change was made to an unrelated part of code. I managed to "patch it up" by forcingly closing and joining all Queues before letting the main process to stop. Unfortunately, I cannot share the repro code (it's a) too large, b) closed), but I can confirm the issue was still open in 3.6.0. -- nosy: +Marandil ___ Python tracker <http://bugs.python.org/issue24484> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4963] mimetypes.guess_extension result changes after mimetypes.init()
Changes by Marcin Szewczyk : -- nosy: +wodny ___ Python tracker <http://bugs.python.org/issue4963> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24755] asyncio.wrap_future undocumented
New submission from Marcin Szewczyk: While asyncio.wrap_future is mentioned in PEP 3156 and has its docstring it is undocumented in the reference. run_in_executor is documented but doesn't mention wrap_future either. $ grep -r wrap_future Doc; echo $? 1 -- assignee: docs@python components: Documentation messages: 247659 nosy: docs@python, wodny priority: normal severity: normal status: open title: asyncio.wrap_future undocumented type: enhancement versions: Python 3.5 ___ Python tracker <http://bugs.python.org/issue24755> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24654] PEP 492 - example benchmark doesn't work (TypeError)
Marcin Szewczyk added the comment: Thanks for the update. Regarding the "plain generator" part -- am I right thinking it's simply a generator not decorated with @asyncio.coroutine? -- ___ Python tracker <http://bugs.python.org/issue24654> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24654] PEP 492 - example benchmark doesn't work (TypeError)
New submission from Marcin Szewczyk: Using benchmark from the section https://www.python.org/dev/peps/pep-0492/#async-await raises: Traceback (most recent call last): File "./bench.py", line 28, in timeit(abinary, 19, 30) File "./bench.py", line 23, in timeit list(gen(depth)) TypeError: 'coroutine' object is not iterable Am I missing something or is a correction needed in code or documentation? BTW, PEP 492 uses the term "plain generator", but unlike "generator-based coroutine" or "native coroutine" it's not defined in section https://www.python.org/dev/peps/pep-0492/#glossary. I think adding a definition would be beneficial. -- assignee: docs@python components: Documentation, asyncio messages: 246856 nosy: docs@python, gvanrossum, haypo, wodny, yselivanov priority: normal severity: normal status: open title: PEP 492 - example benchmark doesn't work (TypeError) type: enhancement versions: Python 3.5 ___ Python tracker <http://bugs.python.org/issue24654> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23885] urllib.quote horribly mishandles unicode as second parameter
New submission from Marcin Kościelnicki: All hell breaks loose when unicode is passed as the second argument to urllib.quote in Python 2: >>> import urllib >>> urllib.quote('\xce\x91', u'') Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.7/urllib.py", line 1292, in quote if not s.rstrip(safe): UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 0: ordinal not in range(128) This on its own wouldn't be that bad - just another Python 2 unicode wonkiness. However, coupled with caching done by the quote function (quoters are cached based on the second parameter, and u'' == ''), it means that a random preceding call to quote from an entirely different place in the application can break your code: $ python2 Python 2.7.9 (default, Dec 11 2014, 04:42:00) [GCC 4.9.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import urllib >>> urllib.quote('\xce\x91', '') '%CE%91' >>> $ python2 Python 2.7.9 (default, Dec 11 2014, 04:42:00) [GCC 4.9.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import urllib >>> urllib.quote('a', u'') 'a' >>> urllib.quote('\xce\x91', '') Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.7/urllib.py", line 1292, in quote if not s.rstrip(safe): UnicodeDecodeError: 'ascii' codec can't decode byte 0xce in position 0: ordinal not in range(128) Good luck debugging that. So, one of two things needs to happen: - a TypeError when unicode is passed as the second parameter, or - a cast of the second parameter to str -- components: Library (Lib) messages: 240230 nosy: koriakin priority: normal severity: normal status: open title: urllib.quote horribly mishandles unicode as second parameter versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue23885> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4130] Intel icc 9.1 does not support __int128_t used by ctypes
Marcin Wojdyr added the comment: I just came across this issue when compiling 2.7.8 with ICC 15.0. But apparently it's been fixed in the meantime by updating libffi to v3.1 (r92061 for 2.7). -- nosy: +wojdyr ___ Python tracker <http://bugs.python.org/issue4130> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21324] dbhash leaks random memory fragments to a database
New submission from Marcin Szewczyk: As stated in the subject. Example is in a remote Git repository: https://bitbucket.org/wodny/python-dbm-experiments/ It shows how some random data gets into the database (into some gaps between keys and values). There is also a C example which hasn't been caught on leaking. -- components: Library (Lib) messages: 216966 nosy: wodny priority: normal severity: normal status: open title: dbhash leaks random memory fragments to a database type: security versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue21324> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18019] dictionary views lead to segmentation fault
New submission from Marcin Szamotulski: This simple snipet will crash python: >>> d={} >>> v=d.viewvalues() >>> k=d.viewkeys() >>> d[v]=k >>> k Segmentation fault I am using python2.7. Python3.2 does not have views while .keys() and .values() methods raise RuntimeError: maximum recursion depth exceeded, which is expected. -- messages: 189632 nosy: Marcin.Szamotulski priority: normal severity: normal status: open title: dictionary views lead to segmentation fault type: crash versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue18019> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17018] Inconsistent behaviour of methods waiting for child process
New submission from Marcin Szewczyk: I've done some experiments with: 1) multiprocessing.Process.join() 2) os.waitpid() 3) subprocess.Popen.wait() These three methods behave completely different when interrupted with a signal which I find disturbing. Reactions are: 1) exit with no exception or special return code 2) OSError exception 3) quiet retry (no exit) The 1) case is very impractical. Is there any movement towards standardization of those 3? Now I know I can loop around Process.join() and check exitcode or is_alive, but it requires more code. It has been pointed out that it changed between 2.6 and 2.7. Associated bug: http://bugs.python.org/issue1731717 Relevant sources: http://svn.python.org/view/python/branches/release26-maint/Lib/multiprocessing/forking.py?revision=84031&view=markup http://hg.python.org/releasing/2.7.3/file/7bb96963d067/Lib/multiprocessing/forking.py http://hg.python.org/cpython/rev/41aef062d529/ I think the behaviour of those three should be at least documented, especially if every one of them behaves differently and it changes between versions. My environment is: $ python --version Python 2.7.3rc2 $ lsb_release -a No LSB modules are available. Distributor ID: Debian Description:Debian GNU/Linux 7.0 (wheezy) Release:7.0 Codename: wheezy $ uname -a Linux magazyn-ziarno 3.2.0-4-686-pae #1 SMP Debian 3.2.35-2 i686 GNU/Linux Filing a bug as advised on python-dev mailing list (). -- messages: 180465 nosy: wodny priority: normal severity: normal status: open title: Inconsistent behaviour of methods waiting for child process type: behavior versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue17018> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11158] Python VM deadlock
Marcin Bachry added the comment: I think it may be related to this bug: http://bugs.python.org/issue6721 -- nosy: +marcin.bachry status: pending -> open ___ Python tracker <http://bugs.python.org/issue11158> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11048] "import ctypes" causes segfault on read-only filesystem
Marcin Bachry added the comment: This patch fixes issue with unitialized variable which makes ctypes crash in error handler. Note that for you it merely turns "Segmentation fault" into MemoryError exception. Python ships with buggy version of libffi, which tries to allocate memory using mmap() over a temporary file (the one seen in strace output above) instead of just doing mmap(MAP_ANONYMOUS|MAP_PRIVATE). The bug is fixed in this libffi commit: https://github.com/atgreen/libffi/commit/eaf444eabc4c78703c0f98ac0197b1619c1b1bef Until Python's libffi is updated, you can do "mount -t tmpfs none /dev/shm". It's good to have "tmpfs" mounted anyway, just like "proc" and "sysfs". -- keywords: +patch nosy: +marcin.bachry Added file: http://bugs.python.org/file20619/ctypes-erofs-crash.diff ___ Python tracker <http://bugs.python.org/issue11048> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8689] sqlite3 parameter substitution breaks with multiple parameters
Marcin Bachry added the comment: I wrote a Perl script testing this issue and it fails too, so it's most probably a bug in sqlite itself. I think the bug is already reported under id 26ff0c82d1 in sqlite bug tracker: http://www.sqlite.org/src/rptview?rn=2 -- nosy: +marcin.bachry ___ Python tracker <http://bugs.python.org/issue8689> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8407] expose signalfd(2) and sigprocmask(2) in the signal module
Changes by Marcin Bachry : -- nosy: +marcin.bachry ___ Python tracker <http://bugs.python.org/issue8407> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7788] segfault when deleting from a list using slice with very big `step' value
Marcin Bachry added the comment: I had odd problems matching line numbers reported by Windows compiler to actual sources, so I used "gcc -Wextra" to produce (even more) signedness warnings against Python 2.x r77957: listobject.c:132: warning: comparison between signed and unsigned integer expressions listobject.c:1435: warning: comparison between signed and unsigned integer expressions listobject.c:2639: warning: comparison between signed and unsigned integer expressions listobject.c:2655: warning: comparison between signed and unsigned integer expressions listobject.c:2661: warning: comparison between signed and unsigned integer expressions listobject.c:2670: warning: comparison between signed and unsigned integer expressions bytearrayobject.c:708: warning: comparison between signed and unsigned integer expressions bytearrayobject.c:716: warning: comparison between signed and unsigned integer expressions bytearrayobject.c:920: warning: comparison between signed and unsigned integer expressions arraymodule.c:745: warning: comparison between signed and unsigned integer expressions arraymodule.c:751: warning: comparison between signed and unsigned integer expressions arraymodule.c:835: warning: comparison between signed and unsigned integer expressions arraymodule.c:890: warning: comparison between signed and unsigned integer expressions arraymodule.c:1228: warning: comparison between signed and unsigned integer expressions arraymodule.c:1310: warning: comparison between signed and unsigned integer expressions arraymodule.c:1326: warning: comparison between signed and unsigned integer expressions arraymodule.c:1389: warning: comparison between signed and unsigned integer expressions arraymodule.c:1450: warning: comparison between signed and unsigned integer expressions arraymodule.c:1807: warning: comparison between signed and unsigned integer expressions arraymodule.c:1814: warning: comparison between signed and unsigned integer expressions Most of them are due to comparisons between "size_t" variables and Py_SIZE() macro which points to signed "ob_size" member of type structure. Because the sequence types above don't hold negative numbers in "ob_size", I think we can silence the warnings by doing explicit casts to "size_t". Or we can ignore the warnings in buildbot. What do you think? -- ___ Python tracker <http://bugs.python.org/issue7788> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7788] segfault when deleting from a list using slice with very big `step' value
Marcin Bachry added the comment: I attach the patch. I changed signedness in all three sequence types and made sure tests crash when run on unpatched Python. -- Added file: http://bugs.python.org/file16019/fix.diff ___ Python tracker <http://bugs.python.org/issue7788> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7788] segfault when deleting from a list using slice with very big `step' value
Marcin Bachry added the comment: Yes, I can give a shot. -- ___ Python tracker <http://bugs.python.org/issue7788> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7788] segfault when deleting from a list using slice with very big `step' value
Marcin Bachry added the comment: Using "grep" I found the same code in Modules/arraymodule.c: from array import array del array('i', range(10))[9::1<<333] -- ___ Python tracker <http://bugs.python.org/issue7788> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7788] segfault when deleting from a list using slice with very big `step' value
Marcin Bachry added the comment: I think the expression "cur + step" in line 2660 of listobject.c (py2.7 trunk) overflows to negative value and the "if" branch isn't entered. if (cur + step >= Py_SIZE(self)) { lim = Py_SIZE(self) - cur - 1; } If I change the type of "cur" variable to unsigned int, the bug disappears. I don't know if it's ok to have unsigned "cur" here though - but I feel it is. -- keywords: +patch nosy: +marcin.bachry Added file: http://bugs.python.org/file16015/maybe-a-fix.diff ___ Python tracker <http://bugs.python.org/issue7788> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7760] use_errno=True does not work
Marcin Bachry added the comment: In the libc case you shouldn't give absolute path in CDLL: CDLL('libc.so.6') is better. You use "/lib/libc.so.6" path, but Python (and ctypes.so) actually uses something like "/lib/tls/i686/cmov/libc.so.6" - these are two separate libraries with separate "errno" variables, mapped to different memory regions. Your call to getxattr modifies errno in the former library, but ctypes get_errno() fetches value from the latter library. If I fix CDLL() call, the test works ok for me. -- nosy: +marcin.bachry ___ Python tracker <http://bugs.python.org/issue7760> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7736] os.listdir hangs since opendir() and closedir() do not release GIL
Marcin Bachry added the comment: > Still, I'd be extremly grateful if someone could tell me the trick how to create a backtrace in such a deadlock situation Sorry, I should have mentioned that. In order to get backtrace you let the process freeze, attach gdb to it (it will freeze too), then go to /sys/fs/fuse/connections/ and find your fuse connection (it's most likely the one with non-zero value in "waiting" file). Then do "echo 1 > abort" and go back to gdb. -- ___ Python tracker <http://bugs.python.org/issue7736> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7736] ctypes freezes/deadlocks process
Marcin Bachry added the comment: Here's the backtrace: #0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85 #1 0x7fcd0234a6e8 in PyThread_acquire_lock (lock=0x183f3f0, waitflag=128) at Python/thread_pthread.h:349 #2 0x7fcd02311fa4 in PyEval_RestoreThread (tstate=0x17a9b00) at Python/ceval.c:356 #3 0x7fcd02336a28 in PyGILState_Ensure () at Python/pystate.c:592 #4 0x7fcd013fcec1 in _CallPythonObject (cif=0x183f3f0, resp=0x80, args=0x7fccff153f40, userdata=) at /home/marcin/Desktop/python/python2.x-hg/Modules/_ctypes/callbacks.c:220 #5 closure_fcn (cif=0x183f3f0, resp=0x80, args=0x7fccff153f40, userdata=) at /home/marcin/Desktop/python/python2.x-hg/Modules/_ctypes/callbacks.c:374 #6 0x7fcd014044f0 in ffi_closure_unix64_inner (closure=, rvalue=, reg_args=0x246, argp=0x0) at /home/marcin/Desktop/python/python2.x-hg/Modules/_ctypes/libffi/src/x86/ffi64.c:566 #7 0x7fcd01404b68 in ffi_closure_unix64 () at /home/marcin/Desktop/python/python2.x-hg/Modules/_ctypes/libffi/src/x86/unix64.S:230 #8 0x7fccff572429 in ?? () from /lib/libfuse.so.2 #9 0x7fccff5704fa in fuse_session_loop () from /lib/libfuse.so.2 #10 0x7fccff1576e4 in ?? () #11 0x7fccff154188 in ?? () #12 0x7fccff3580e0 in ?? () #13 0x0192e2f0 in ?? () #14 0x0004 in ?? () #15 0x0001 in ?? () #16 0x016ff5e0 in ?? () #17 0x0001 in ?? () #18 0x in ?? () All calls to native POSIX functions seem to be wrapped with Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS except of opendir() and closedir(). When I fix it (as in attached patch), call_hello.py doesn't block anymore. -- keywords: +patch nosy: +marcin.bachry Added file: http://bugs.python.org/file15953/posix-opendir-and-gil.diff ___ Python tracker <http://bugs.python.org/issue7736> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1975] signals not always delivered to main thread, since other threads have the signal unmasked
Marcin Stepnicki added the comment: > I don't have any strong view over whether the interpreter should, > theoretically, block signals in non-main threads. But, practically, > blocking signals apparently produced issues with readline (and possibly > other libs relying on signals), which is why they are not blocked today. I see your point of view, but the problem is that current behaviour is inconsistent between different operating system. As there are many people who brought up this issue, I think it should be at least documented somewhere. Regards, Marcin -- ___ Python tracker <http://bugs.python.org/issue1975> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6454] Add "example" keyword argument to optparse constructor
Marcin Kasperski added the comment: I found this bug while looking for suggestions how to add examples to the optparse help call, but I feel there is a better and more general solution - just provide some minimal formatting for description: treat empty line as paragraph separator. Then I would be able to add example or anything else to the description formatting it as necessary -- nosy: +Mekk ___ Python tracker <http://bugs.python.org/issue6454> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5080] PyArg_Parse* should raise TypeError for float parsed with integer format
Changes by Marcin Wider : -- nosy: +marcin.wider ___ Python tracker <http://bugs.python.org/issue5080> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6897] imaplib fails during login
Marcin Bachry added the comment: Looks like duplicate of #6734. -- nosy: +marcin.bachry ___ Python tracker <http://bugs.python.org/issue6897> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6882] uuid creates zombies
Marcin Bachry added the comment: Actually it's a bug in ctypes.util.find_library() which is called from uuid.py. The function doesn't close() popen object leaving forked process in zombie state. I attach the fix. -- keywords: +patch nosy: +marcin.bachry Added file: http://bugs.python.org/file14879/find_library_popen.diff ___ Python tracker <http://bugs.python.org/issue6882> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1975] signals not always delivered to main thread, since other threads have the signal unmasked
Marcin Stepnicki added the comment: I have just got bitten by this bug - I usually run my software under Linux/Windows, this was the first time that my customer requested specifically FreeBSD platform and I was *really* surprised. Not to mention the fact that bug in Python came as the last thing to my mind - I was blaming my code of course :-). Anyway, I can confirm the patch works for me and I'd like to see it included in future versions. Can I do something to make it happen? Regards, Marcin -- nosy: +mstepnicki ___ Python tracker <http://bugs.python.org/issue1975> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6734] Imap lib implicit conversion from bytes to string
Marcin Bachry added the comment: Ok, it think it's good to leave internal _quote() function operating on bytes and convert password argument in login(). The method now works with both str and bytes as arguments. -- keywords: +patch Added file: http://bugs.python.org/file14752/imaplib-login.diff ___ Python tracker <http://bugs.python.org/issue6734> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6734] Imap lib implicit conversion from bytes to string
Marcin Bachry added the comment: It seems most IMAP4 methods accept str as arguments right now (I checked: list, lsub, myrights, select, status, search, fetch) and login() is a sole exception. I know the protocol is mostly ascii only, but still having possibility of using str in the API feels convenient and reasonable to me. Can't we convert str parameters to login() to ascii too? It already done in other methods (the _command() method iterates over args and converts them). -- nosy: +marcin.bachry ___ Python tracker <http://bugs.python.org/issue6734> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6726] pyuic4.bat has bad path to python.exe and pyuic.py
New submission from Marcin : I have found bug in pyuic4.bat. I have installed python to directory c:\programs. The path to 'python.exe' is c:\programs\python.exe. Content of file pyuic4.bat is: @"C:\Python25\python.exe" "C:\Python25\Lib\site-packages\PyQt4\uic\pyuic.py" %1 %2 %3 %4 %5 %6 %7 %8 %9 In this file, during installation process it must be changed path to python.exe. In my example it must be done like that: @"C:\programs\Python25\python.exe" "C:\programs\Python25\Lib\site-packages\PyQt4\uic\pyuic.py" %1 %2 %3 %4 %5 %6 %7 %8 %9 -- components: Demos and Tools messages: 91697 nosy: maar severity: normal status: open title: pyuic4.bat has bad path to python.exe and pyuic.py versions: Python 2.5 ___ Python tracker <http://bugs.python.org/issue6726> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3541] bsddb memory leak on ubuntu
Marcin Bachry added the comment: The test program uses constant memory on my machine. Ubuntu 9.04, libdb4.7.25-6ubuntu1, python 2.7 trunk. -- nosy: +marcin.bachry ___ Python tracker <http://bugs.python.org/issue3541> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5238] ssl makefile never closes socket
Marcin Bachry added the comment: I think there are two bugs spotted here. The first is the mentioned missing "close" param to _fileobject in makefile() method. The second one was noticed by Jonathan. He doesn't use makefile() at all, yet his socket isn't closed either. Here's what I think is going on: The raw filesystem socket seems to be closed only upon garbage collection, when reference count of socket._realsocket drops to zero (ie. it's not closed explicitly anywhere). _realsocket is wrapped by socket._socketobject and all its close() method does is dropping reference to _realsocket object it wraps. The bug goes like this: 1. plain = socket.create_connection(...) it creates and wraps a native _realsocket (plain._sock) with reference count = 1; "plain" is an instance of _socketobject 2. secure = ssl.wrap_socket(plain) because SSLSocket inherits from _socketobject, it also wraps _realsocket plain._sock and the reference count is 2 now 3. secure.close() it calls in turn it's parent method close() which simply drops raw _realsocket reference count to 1 4. native socket is still referenced by plain._sock and filesystem descriptor isn't closed unless plain.close() is called too and refcount drops to zero I attach the simplest possible test to prove the bug. -- nosy: +marcin.bachry Added file: http://bugs.python.org/file13963/test-simple.py ___ Python tracker <http://bugs.python.org/issue5238> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4066] smtplib SMTP_SSL._get_socket doesn't return a value
Marcin Bachry added the comment: Here's a dumbed down version of the test from #4470. It requires network, but no gmail account is needed to run the test. -- Added file: http://bugs.python.org/file13952/test_smtpnet.py ___ Python tracker <http://bugs.python.org/issue4066> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4066] smtplib SMTP_SSL._get_socket doesn't return a value
Marcin Bachry added the comment: Your diff is better than mine and looks quite similar to patch number 2 in #4470. If the whole #4470 can't be accepted for now, we could at least apply this one change, because without it SMTP_SSL is totally unusable. Daniel, maybe we can mark this bug or #4470 as critical? LMTP seems ok indeed; I don't remember why I mentioned it. :) -- nosy: +ajaksu2 ___ Python tracker <http://bugs.python.org/issue4066> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5259] smtplib is broken in Python3
Marcin Bachry added the comment: I add simple smtp auth unit test to exercise this bug. -- keywords: +patch nosy: +marcin.bachry Added file: http://bugs.python.org/file13774/test-smtplib.diff ___ Python tracker <http://bugs.python.org/issue5259> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5313] multiprocessing.process using os.close(sys.stdin.fileno) instead of sys.stdin.close()
Marcin Cieslik added the comment: Hello, I believe I am the edge-case. I've written a minimalist python Tkinter-shell around Tkinter.Text and code.InteractiveConsole by hi-jacking stdin, stdout and stderr. It "hangs" when using multiprocessing pool. to reproduce run papy_gui.py and type: >>> from math import sqrt >>> from multiprocessing import Pool >>> p = Pool() >>> print p >>> p.map(sqrt, [1,2,3]) <> -- nosy: +i000 Added file: http://bugs.python.org/file13704/papy_gui.py ___ Python tracker <http://bugs.python.org/issue5313> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4440] "sort" command doesn't work in pstats if run interactively
New submission from Marcin Bachry <[EMAIL PROTECTED]>: Sort command in Python's 3.0 pstats doesn't accept any valid argument and views help all the time: $ python3.0 -m pstats pstats Welcome to the profile statistics browser. % sort cumulative Valid sort keys (unique prefixes are accepted): stdname -- standard name nfl -- name/file/line pcalls -- call count file -- file name calls -- call count time -- internal time line -- line number cumulative -- cumulative time module -- file name name -- function name % -- components: Library (Lib) files: pstats-fix.diff keywords: patch messages: 76467 nosy: marcin.bachry severity: normal status: open title: "sort" command doesn't work in pstats if run interactively type: behavior versions: Python 3.0 Added file: http://bugs.python.org/file12137/pstats-fix.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4440> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4067] ast.fix_missing_locations() breaks if node doesn't have "_attributes" variable
New submission from Marcin Bachry <[EMAIL PROTECTED]>: ast.fix_missing_locations() fails if any node is missing "_attributes" instance variable - but it's the case of some fundamental nodes like "alias" or "identifier". When I run simple test: import ast with open(__file__) as fp: tree = ast.parse(fp.read()) ast.fix_missing_locations(tree) I get: $ python2.6 /tmp/test.py Traceback (most recent call last): File "/tmp/test.py", line 5, in ast.fix_missing_locations(tree) File "/usr/local/lib/python2.6/ast.py", line 133, in fix_missing_locations _fix(node, 1, 0) File "/usr/local/lib/python2.6/ast.py", line 132, in _fix _fix(child, lineno, col_offset) File "/usr/local/lib/python2.6/ast.py", line 132, in _fix _fix(child, lineno, col_offset) File "/usr/local/lib/python2.6/ast.py", line 121, in _fix if 'lineno' in node._attributes: AttributeError: 'alias' object has no attribute '_attributes' -- components: Library (Lib) files: ast.diff keywords: patch messages: 74453 nosy: marcin.bachry severity: normal status: open title: ast.fix_missing_locations() breaks if node doesn't have "_attributes" variable type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file11730/ast.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4067> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4066] smtplib SMTP_SSL._get_socket doesn't return a value
New submission from Marcin Bachry <[EMAIL PROTECTED]>: SMTP.connect method expects _get_socket() method to return socket object: self.sock = self._get_socket(host, port, self.timeout) but overriden _get_socket() method in SMTP_SSL class doesnt' have return statement (it sets self.sock instead). Hence I get SMTPServerDisconnected exception when I try to send mail over ssl. The same seems to apply to LMTP class. -- components: Library (Lib) files: smtplib.diff keywords: patch messages: 74452 nosy: marcin.bachry severity: normal status: open title: smtplib SMTP_SSL._get_socket doesn't return a value type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file11729/smtplib.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4066> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1153] help(pickle) fails: unorderable types: type() < type()
New submission from Marcin 'Qrczak' Kowalczyk: Python 3.0a1 (py3k, Sep 8 2007, 15:57:56) [GCC 4.2.1 20070719 (release) (PLD-Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pickle >>> help(pickle) Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.0/site.py", line 350, in __call__ return pydoc.help(*args, **kwds) File "/usr/local/lib/python3.0/pydoc.py", line 1685, in __call__ self.help(request) File "/usr/local/lib/python3.0/pydoc.py", line 1729, in help else: doc(request, 'Help on %s:') File "/usr/local/lib/python3.0/pydoc.py", line 1512, in doc pager(render_doc(thing, title, forceload)) File "/usr/local/lib/python3.0/pydoc.py", line 1490, in render_doc return title % desc + '\n\n' + text.document(object, name) File "/usr/local/lib/python3.0/pydoc.py", line 319, in document if inspect.ismodule(object): return self.docmodule(*args) File "/usr/local/lib/python3.0/pydoc.py", line 1076, in docmodule contents.append(self.document(value, key, name)) File "/usr/local/lib/python3.0/pydoc.py", line 320, in document if inspect.isclass(object): return self.docclass(*args) File "/usr/local/lib/python3.0/pydoc.py", line 1210, in docclass lambda t: t[1] == 'data') File "/usr/local/lib/python3.0/pydoc.py", line 1173, in spilldata name, mod, maxlen=70, doc=doc) + '\n') File "/usr/local/lib/python3.0/pydoc.py", line 1295, in docother repr = self.repr(object) File "/usr/local/lib/python3.0/repr.py", line 24, in repr return self.repr1(x, self.maxlevel) File "/usr/local/lib/python3.0/pydoc.py", line 954, in repr1 return getattr(self, methodname)(x, level) File "/usr/local/lib/python3.0/repr.py", line 78, in repr_dict for key in islice(sorted(x), self.maxdict): TypeError: unorderable types: type() < type() >>> -- components: Library (Lib) messages: 55839 nosy: Qrczak severity: normal status: open title: help(pickle) fails: unorderable types: type() < type() type: behavior versions: Python 3.0 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1153> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com