[issue19984] Add new format of fixed length string for PyErr_Format
Changes by Vajrasky Kok sky@speaklikeaking.com: -- title: Add new format of fix length string for PyErr_Format - Add new format of fixed length string for PyErr_Format ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19984 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19985] Not so correct error message when initializing Struct with ill argument
Vajrasky Kok added the comment: And here is the patch to better error message in Python 2.7. -- Added file: http://bugs.python.org/file33144/better_error_message_struct_python_27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19985 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19985] Not so correct error message when initializing Struct with ill argument
New submission from Vajrasky Kok: Python 3.4 (3.3 is also afflicted: import struct struct.Struct(3) Traceback (most recent call last): File stdin, line 1, in module TypeError: Struct() argument 1 must be a bytes object, not int struct.Struct('b') Struct object at 0x7fec04763180 Python 2.7: import struct struct.Struct(3) Traceback (most recent call last): File stdin, line 1, in module TypeError: Struct() argument 1 must be string, not int struct.Struct(u'b') Struct object at 0x17993e8 Here is the patch to better error message for Python 3.4 and 3.3. -- components: Extension Modules files: better_error_message_struct_python_34_and_33.patch keywords: patch messages: 206218 nosy: vajrasky priority: normal severity: normal status: open title: Not so correct error message when initializing Struct with ill argument type: behavior versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33143/better_error_message_struct_python_34_and_33.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19985 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19099] struct.pack fails first time with unicode fmt
Vajrasky Kok added the comment: Nevermind, I already created this issue. http://bugs.python.org/issue19985 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19099 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19700] Update runpy for PEP 451
Nick Coghlan added the comment: Final patch that reflects the version I'm about to commit. It includes appropriate docs updates, and ensures __main__.__spec__ is None in the cases where the import system isn't involved in initialising main. -- Added file: http://bugs.python.org/file33145/issue19700_runpy_spec_v6.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19700 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19700] Update runpy for PEP 451
Roundup Robot added the comment: New changeset 51dddfead80a by Nick Coghlan in branch 'default': Issue #19700: set __spec__ appropriately in runpy http://hg.python.org/cpython/rev/51dddfead80a -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19700 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19700] Update runpy for PEP 451
Nick Coghlan added the comment: Final review of the patch showed it *wasn't* quite done, it's still missing the both __name__ and __spec__.name are configured in sys.modules change that is needed to get more pickle friendly behaviour from __main__. However, I wanted to commit this version to help unblock issue 19946. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19700 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19946] Handle a non-importable __main__ in multiprocessing
Nick Coghlan added the comment: Issue 19700 isn't quite finished, but I believe it is finished enough to let me get this working properly. -- dependencies: -Update runpy for PEP 451 resolution: fixed - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19946 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19766] test_venv: test_with_pip() failed on AMD64 Fedora without threads 3.x buildbot: urllib3 dependency requires the threading module
Vinay Sajip added the comment: I've released distlib 0.1.5 on PyPI. This release uses dummy_threading when threading isn't available. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19766 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19913] TR/Crypt.XPACK.Gen-4 in easy_install.exe
Vinay Sajip added the comment: I've released distlib 0.1.5 on PyPI. This release uses uncompressed launchers which (at the time of writing) pass the checks on virustotal.com. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19913 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19766] test_venv: test_with_pip() failed on AMD64 Fedora without threads 3.x buildbot: urllib3 dependency requires the threading module
Nick Coghlan added the comment: Not quite fixed yet - Donald, I think all the vendored dependencies have been updated now, would it be possible to spin and incorporate a pip 1.5rc2 somewhat soonish so we know what's still left to be addressed on the ensurepip side? -- assignee: - dstufft resolution: fixed - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19766 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19946] Handle a non-importable __main__ in multiprocessing
Richard Oudkerk added the comment: So there are really two situations: 1) The __main__ module *should not* be imported. This is the case if you use __main__.py in a package or if you use nose to call test_main(). This should really be detected in get_preparation_data() in the parent process so that import_main_path() does not get called in the child process. 2) The __main__ module *should* be imported but it does not have a .py extension. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19946 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19946] Handle a non-importable __main__ in multiprocessing
Nick Coghlan added the comment: Bumping the priority on this, as multiprocessing is currently creating invalid child processes by failing to set __main__.__spec__ appropriately. The attached patch is designed to get us started down that path. It's currently broken, but I need feedback from folks that know the multiprocessing code better than I do in order to know where best to start poking and prodding. With the patch, invoking regrtest directly still works: ./python Lib/test/regrtest.py -v test_multiprocessing_spawn But relying on module execution fails: ./python -m test -v test_multiprocessing_spawn I appear to be somehow getting child processes where __main__.__file__ is set, but __main__.__spec__ is not. -- nosy: +larry priority: low - release blocker Added file: http://bugs.python.org/file33146/issue19946_pep_451_multiprocessing.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19946 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19946] Handle a non-importable __main__ in multiprocessing
Nick Coghlan added the comment: With the restructuring in my patch, it would be easy enough to move the early return cases from the _fixup_main_* functions to instead be don't set the variable cases in get_preparation_data. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19946 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19167] sqlite3 cursor.description varies across Linux (3.3.1), Win32 (3.3.2), when selecting from a view.
Vajrasky Kok added the comment: Upgrading sqlite3 in Windows maybe easy but Python 2.7.6 and 3.3.3 on Windows were built with defected sqlite3. Maybe at least we can provide the correct sqlite3 version next time we release Windows version of Python 2.7 and 3.3? Python 3.3 comes with sqlite3 3.7.12. Python 2.7.6 comes with sqlite3 3.6.12. Python 3.4 is not afflicted. It comes with sqlite3 3.8.1. -- nosy: +zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19167 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19984] Add new format of fixed length string for PyErr_Format
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19984 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19984] Add new format of fixed length string for PyErr_Format
Serhiy Storchaka added the comment: Originally Antoine had proposed [1] `%T, obj` as replacement for `%.400s, Py_TYPE(obj)-tp_name`. [1] http://permalink.gmane.org/gmane.comp.python.devel/143925 -- nosy: +pitrou, serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19984 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19985] Not so correct error message when initializing Struct with ill argument
Serhiy Storchaka added the comment: I think that error message in 2.7 is correct. String means both str and unicode. As for 3.x, agree, it should be corrected. But I prefer str or bytes or string or bytes object. -- nosy: +serhiy.storchaka versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19985 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19985] Not so correct error message when initializing Struct with ill argument
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +mark.dickinson, meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19985 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19974] tarfile doesn't overwrite symlink by directory
Vajrasky Kok added the comment: Here is the patch that works both on Windows and Linux. -- Added file: http://bugs.python.org/file33147/fix_tarfile_overwrites_symlink_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19974 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19985] Not so correct error message when initializing Struct with ill argument
Vajrasky Kok added the comment: Here is the patch to address Serhiy's request. Hmmm, if string means both string and unicode in Python 2.7, should we fix these behaviours? import _csv _csv.register_dialect(2) Traceback (most recent call last): File stdin, line 1, in module TypeError: dialect name must be a string or unicode ' cute cat '.strip(3) Traceback (most recent call last): File stdin, line 1, in module TypeError: strip arg must be None, str or unicode import sqlite3 conn = sqlite3.connect(':memory:') c = conn.cursor() c.execute(3) Traceback (most recent call last): File stdin, line 1, in module ValueError: operation parameter must be str or unicode -- Added file: http://bugs.python.org/file33148/better_error_message_struct_python_34_and_33_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19985 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19986] ‘mpd_del’ discards qualifiers from pointer target type
New submission from Christian Heimes: One buildbot is emitting a warning: Modules/_decimal/libmpdec/mpdecimal.c:4438: warning: passing argument 1 of ‘mpd_del’ discards qualifiers from pointer target type http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/9351/steps/compile/logs/warnings%20%281%29 -- components: Extension Modules messages: 206236 nosy: christian.heimes priority: low severity: normal stage: needs patch status: open title: ‘mpd_del’ discards qualifiers from pointer target type type: compile error versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19986 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19987] Winsound: test_alias_fallback fails on WS 2008
New submission from Christian Heimes: == FAIL: test_alias_fallback (test.test_winsound.PlaySoundTest) -- Traceback (most recent call last): File E:\home\cpython\buildslave\x86\3.x.snakebite-win2k8r2sp1-x86\build\lib\test\test_winsound.py, line 167, in test_alias_fallback '!$%/(#+*', winsound.SND_ALIAS AssertionError: RuntimeError not raised by PlaySound http://buildbot.python.org/all/builders/x86%20Windows%20Server%202008%20%5BSB%5D%203.x/builds/1948/steps/test/logs/stdio -- components: Tests keywords: buildbot messages: 206237 nosy: christian.heimes, serhiy.storchaka priority: low severity: normal stage: test needed status: open title: Winsound: test_alias_fallback fails on WS 2008 type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19987 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19988] hex() and oct() use __index__ instead of __int__
New submission from Ethan Furman: In Py3k __hex__ and __oct__ were removed, and hex() and oct() switched to use __index__. hex() and oct() should be using __int__ instead. Having read through PEP 357 [1] I see that __index__ is /primarily/ concerned with allowing arbitrary objects to be used in slices, but will also allow Python to convert an object to an int whenever it needs one. The problem is that my dbf [2] module has a couple custom types (Logical and Quantum) that allow for ternary logic (False/True/Unknown). As much as possible Logical is intended to be a drop in replacement for the bool type, but of course there are some differences: - internally 'unknown' is represented as None - attempts to get an int, float, complex, etc., numeric value on Unknown raises an Exception - attempts to get the numeric string value via __hex__ and __oct__ on Unknown raises an Exception - when Unknown is used as an index (via __index__), 2 is returned The problem, of course, is that in Python 3 calling hex() and oct() on Unknown now succeeds when it should be raising an exception, and would be if __int__ were used instead of __index__. In summary, if Python just switches to using __index__, there would be little point in having separate __int__ and __index__ methods. [1] http://www.python.org/dev/peps/pep-0357 [2] https://pypi.python.org/pypi/dbf -- messages: 206238 nosy: ethan.furman priority: normal severity: normal status: open title: hex() and oct() use __index__ instead of __int__ type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19988 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19989] Error while sending function code over queue (multiprocessing)
New submission from Filip Malczak: Ive been using YAPSY to load plugins in one process. In this process I tried to put them in queue, and in another process I read them from queue. There was a problem with non-existing type of plugin in consumer process, so I tried to serialize plugin instance by hand and deserialize by hand in consumer. Both processes were created and started from main process, which passed them both the same queue. Law forbids me from showing the whole code, but I'm attaching file with code pieces that generate error below: Process ConsumerProcess-2: Traceback (most recent call last): File /usr/lib/python3.3/multiprocessing/process.py, line 258, in _bootstrap self.run() File /usr/lib/python3.3/multiprocessing/process.py, line 95, in run self._target(*self._args, **self._kwargs) File /private_path/consumer_stub.py, line 27, in _consumer result = foo() File /private_path/loader_process.py, line 90, in x val = (kind, plugin, meta) SystemError: ../Objects/cellobject.c:24: bad argument to internal function -- components: Build files: pythonbug.txt messages: 206239 nosy: Filip.Malczak priority: normal severity: normal status: open title: Error while sending function code over queue (multiprocessing) type: crash versions: Python 3.3 Added file: http://bugs.python.org/file33149/pythonbug.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19989 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19986] ‘mpd_del’ discards qualifiers from pointer target type
Stefan Krah added the comment: I agree that warnings are annoying, but I'm not sure what to do with this one: It's wrong and only occurs with fairly old gcc versions. My feeling was that pragmas are overkill for relatively old compilers. -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19986 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19988] hex() and oct() use __index__ instead of __int__
Serhiy Storchaka added the comment: __index__() is used because float has __int__ but not __index__. (42.0).__int__() 42 (42.0).__index__() Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'float' object has no attribute '__index__' -- nosy: +mark.dickinson, serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19988 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19987] Winsound: test_alias_fallback fails on WS 2008
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: -serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19987 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19987] Winsound: test_alias_fallback fails on WS 2008
Serhiy Storchaka added the comment: This test was re-enabled in issue19595. -- nosy: +zach.ware versions: +Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19987 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19167] sqlite3 cursor.description varies across Linux (3.3.1), Win32 (3.3.2), when selecting from a view.
R. David Murray added the comment: That sqlite checkin is well before 3.7.12 was released, and 3.3.3 shipped with that version. Was the bug present in 3.6? If so I don't think we can do anything, since I believe we stay with the same minor version (ie: 3.6) of sqlite for the life of a minor version of Python (ie: 2.7). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19167 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19976] Argument Clinic: generate second arg for METH_NOARGS
Larry Hastings added the comment: Here's a first attempt at a patch. The Visual Studio pragma disables for the rest of the file, which is undesirable. Maybe we could turn it on and off inline, but it's not clear to me that that would have the desired effect of turning off the warning for explicitly that parameter declaration. Also, a little googling confirms that clang supports the GCC __attribute((unused)) extension, so I just went with that. -- Added file: http://bugs.python.org/file33150/larry.clinic.fix.meth_noargs.1.diff.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19976 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19988] hex() and oct() use __index__ instead of __int__
Antoine Pitrou added the comment: Indeed, the definition and use of __index__ has derived since PEP 357. Nowadays, __index__ means can be converted to an int without loss. In any case, I find the behaviour of your logical type a bit dubious. If it's like bool but ternary, it *should* convert to int (or perhaps be an int subclass like bool). -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19988 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19983] Ctrl-C causes startup crashes on Windows
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +brian.curtin, tim.golden, tim.peters versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19983 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19983] Ctrl-C at startup can end in a Py_FatalError call
Antoine Pitrou added the comment: Ah, ok. So it's a controlled crash: Python fails initializing the standard streams and so it decides to bail out (by using Py_FatalError, since Py_Initialize doesn't return an error code). What we could do is call initsigs() after initstdio() (but still before initsite(), since initsite() can call arbitrary Python code). I'm a bit surprised that you manage to press Ctrl-C so fast that it occurs right during initialization of standard streams, by the way :-) -- nosy: +haypo, pitrou title: Ctrl-C causes startup crashes on Windows - Ctrl-C at startup can end in a Py_FatalError call versions: -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19983 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19855] uuid._find_mac fails if an executable not in /sbin or /usr/sbin
Serhiy Storchaka added the comment: This check was added in r50954 (changeset 654c380cf8b9). Here is better (but larger) patch for 3.3+. -- assignee: - serhiy.storchaka nosy: +nnorwitz Added file: http://bugs.python.org/file33151/uuid_find_mac_which_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19855 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19855] uuid._find_mac fails if an executable not in /sbin or /usr/sbin
Serhiy Storchaka added the comment: And here is a patch for 2.7. It uses backported from 3.3 and simplified variant of shutil.which(). -- Added file: http://bugs.python.org/file33152/uuid_find_mac_which-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19855 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19537] Fix misalignment in fastsearch_memchr_1char
Serhiy Storchaka added the comment: Antoine, if sizeof(PyUnicodeObject) is 38, the start of UCS4 unicode string is not aligned. This should be fixed. -- stage: patch review - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19537 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19537] Fix misalignment in fastsearch_memchr_1char
Antoine Pitrou added the comment: Antoine, if sizeof(PyUnicodeObject) is 38, the start of UCS4 unicode string is not aligned. This should be fixed. Probably. Does anyone want to propose a patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19537 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19986] ‘mpd_del’ discards qualifiers from pointer target type
Roundup Robot added the comment: New changeset 274b293435fb by Stefan Krah in branch '3.3': Issue #19986: Avoid an incorrect warning of older gcc versions. http://hg.python.org/cpython/rev/274b293435fb -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19986 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19946] Handle a non-importable __main__ in multiprocessing
Richard Oudkerk added the comment: I appear to be somehow getting child processes where __main__.__file__ is set, but __main__.__spec__ is not. That seems to be true for the __main__ module even when multiprocessing is not involved. Running a file /tmp/foo.py containing import sys print(sys.modules['__main__'].__spec__, sys.modules['__main__'].__file__) I get output None /tmp/foo.py I am confused by why you would ever want to load by module name rather than file name. What problem would that fix? If the idea is just to support importing a main module without a .py extension, isn't __file__ good enough? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19946 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19537] Fix misalignment in fastsearch_memchr_1char
Andreas Schwab added the comment: How about adding explicit padding to the bitfield in PyASCIIObject? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19537 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19537] Fix misalignment in fastsearch_memchr_1char
Antoine Pitrou added the comment: How about adding explicit padding to the bitfield in PyASCIIObject? That sounds ok to me, but it must be explicitly for 68k (or use a sufficiently smart scheme not to affect already aligned architectures). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19537 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19986] ‘mpd_del’ discards qualifiers from pointer target type
Changes by Stefan Krah stefan-use...@bytereef.org: -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed type: compile error - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19986 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19988] hex() and oct() use __index__ instead of __int__
Mark Dickinson added the comment: hex() and oct() should be using __int__ instead. Strong -1 from me. I wouldn't want `hex(45.3)` to work, and `hex(45.0)` working isn't much better. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19988 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19988] hex() and oct() use __index__ instead of __int__
Stefan Krah added the comment: -1 from me as well. I would not want to audit a large program for accidentally converted floats. -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19988 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable
Serhiy Storchaka added the comment: Jakub's patch has a bug: import tempfile f = tempfile.NamedTemporaryFile(dir=.,delete=False) write = f.write write function BufferedRandom.write at 0xb716b4f4 write2 = f.write write2 built-in method write of _io.BufferedRandom object at 0xb721deac del f write(b'foo') 3 del write write2(b'bar') Traceback (most recent call last): File stdin, line 1, in module ValueError: write to closed file -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18879 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18879] tempfile.NamedTemporaryFile can close the file too early, if not assigning to a variable
Serhiy Storchaka added the comment: Here is fixed Jakub's patch. -- assignee: - serhiy.storchaka Added file: http://bugs.python.org/file33153/tempfile_wrap_methods.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18879 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19648] Empty tests in pickletester need to be implemented or removed
Gennadiy Zlobin added the comment: Hi, I created 2 simple tests for test_getinitargs and test_reduce. -- keywords: +patch nosy: +gennad Added file: http://bugs.python.org/file33154/19648.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19648 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19946] Handle a non-importable __main__ in multiprocessing
Nick Coghlan added the comment: Scripts (whether in source form or precompiled) work via direct execution, but all the other execution paths (directories, zipfiles, -m) rely on the import system (via runpy). multiprocessing has been broken for years in that regard, hence my old comment about the way it derived the module name from the file name being problematic (although it only outright *broke* with submodule execution, and even then you would likely get away with it if you didn't use relative imports). Historically, it was a hard problem to solve, since even the parent process forgot the original name of __main__, but PEP 451 has now fixed that limitation. I also have an idea as to what may be wrong with my patch - I'm going to try adjusting the first early return from _fixup_main_from_name to ensure that __main__.__spec__ is set correctly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19946 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19988] hex() and oct() use __index__ instead of __int__
Raymond Hettinger added the comment: Guido, I believe that __index__ was your initiative. Do you care to opine on this one? -- assignee: - gvanrossum nosy: +gvanrossum, rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19988 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19990] Add unittests for imghdr module
New submission from Claudiu.Popa: Hello! The following patch adds unit tests for the previously untested `imghdr` module. -- components: Tests files: test_imghdr.patch keywords: patch messages: 206262 nosy: Claudiu.Popa priority: normal severity: normal status: open title: Add unittests for imghdr module type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file33155/test_imghdr.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19990 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19988] hex() and oct() use __index__ instead of __int__
Guido van Rossum added the comment: I agree with Mark and Stafan. Hex/oct/bin are only defined for integers. __int__ is ambiguous -- it has the same problem as (int) in C in that it applies to floats and then loses the fraction. I think the problem with Ethan's ternary logic is that it tries to act as an index and yet doesn't want to be an integer -- that doesn't make a lot of logical sense. (You should use a dict to map from true/false/unknown, not a list of size three.) -- resolution: - rejected stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19988 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17919] AIX POLLNVAL definition causes problems
Stefan Krah added the comment: Hi, this happens on the OpenIndiana bot: http://buildbot.python.org/all/builders/x86%20OpenIndiana%203.3/builds/1259/steps/test/logs/stdio test_devpoll1 (test.test_devpoll.DevPollTests) ... ok test_events_mask_overflow (test.test_devpoll.DevPollTests) ... ERROR test_timeout_overflow (test.test_devpoll.DevPollTests) ... ok == ERROR: test_events_mask_overflow (test.test_devpoll.DevPollTests) -- Traceback (most recent call last): File /export/home/buildbot/32bits/3.3.cea-indiana-x86/build/Lib/test/test_devpoll.py, line 96, in test_events_mask_overflow self.assertRaises(OverflowError, pollster.register, 0, USHRT_MAX + 1) NameError: global name 'USHRT_MAX' is not defined -- Ran 3 tests in 0.006s FAILED (errors=1) test test_devpoll failed -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17919 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17919] AIX POLLNVAL definition causes problems
Christian Heimes added the comment: I have fixed the issue in http://hg.python.org/cpython/rev/039306b45230 -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17919 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12837] Patch for issue #12810 removed a valid check on socket ancillary data
David Watson added the comment: On Fri 13 Dec 2013, Brett Cannon wrote: Two things. First, I'm sorry David but my mind is not working fully enough at the moment to see how msg_controllen is compared to cmsg_len_end without relying on external value coming in through the parameters of the function. The lines (in the existing code) if (space cmsg_len_end) space = cmsg_len_end; ensure that space = cmsg_len_end, and then we have return (cmsg_offset = (size_t)-1 - space cmsg_offset + space = msg-msg_controllen); so that 0 is returned if msg-msg_controllen (cmsg_offset + space), but since cmsg_offset is nonnegative and cmsg_len_end = space, we always have cmsg_len_end = (cmsg_offset + space). Hence if we get to this last line and msg-msg_controllen cmsg_len_end, then msg-msg_controllen (cmsg_offset + space), and so the function returns 0. (So returning 0 immediately if msg-msg_controllen cmsg_len_end doesn't change the behaviour of the function, provided this comparison is done correctly.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12837 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19991] configparser instances cannot be pretty printed
New submission from Andrei Kucharavy: ConfigParser seems to share a lot of behavior with a dict, but cannot be pretty printed. -- messages: 206267 nosy: Andrei.Kucharavy priority: normal severity: normal status: open title: configparser instances cannot be pretty printed type: enhancement versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19991 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19887] Path.resolve() fails on complex symlinks
Antoine Pitrou added the comment: Here is a patch with unrolled loops. I suppose that was some kind of joke, but what I meant was that we don't need to test with 100 levels of symlinks. 2 or 3 are enough... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19887 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19887] Path.resolve() fails on complex symlinks
Antoine Pitrou added the comment: Here is a patch with refactored tests. Vajrasky, do you want to test under Windows? -- Added file: http://bugs.python.org/file33156/pathlib_resolve_4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19887 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19991] configparser instances cannot be pretty printed
R. David Murray added the comment: Without looking at the details, I would guess that doing anything about this should have issue 7434 as a prereq. But Łukasz will have a more informed opinion. -- nosy: +lukasz.langa, r.david.murray versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19991 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19104] pprint produces invalid output for long strings
Mark Lawrence added the comment: Would it pay to have a meta issue for all the outstanding pprint issues, or possibly make issue 7434 the meta issue? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19104 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19992] subprocess documentation not explicit about fileno()
New submission from Thayne McCombs: The subprocess documentation for stdout/stderr/stdin states: Valid values are PIPE, an existing file descriptor (a positive integer), an existing file object, and None. PIPE indicates that a new pipe to the child should be created. However, file-like objects such as StringIO are not valid if they do not implement fileno(). The documentation should be more explicit that the file object should be backed by an actual file descriptor (and therefore has a fileno() function). -- assignee: docs@python components: Documentation messages: 206272 nosy: Thayne.McCombs, docs@python priority: normal severity: normal status: open title: subprocess documentation not explicit about fileno() ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19992 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19532] compileall -f doesn't force to write bytecode files
Roundup Robot added the comment: New changeset 6afad4f29249 by R David Murray in branch '3.3': #19532: make compileall with no file/dir args respect -f and -q. http://hg.python.org/cpython/rev/6afad4f29249 New changeset 0e07ab605e0b by R David Murray in branch 'default': Merge: #19532: make compileall with no file/dir args respect -f and -q. http://hg.python.org/cpython/rev/0e07ab605e0b -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19532 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19532] compileall -f doesn't force to write bytecode files
R. David Murray added the comment: Thanks, Vajrasky. I did not backport this to 2.7 because the code is different and we don't have proper tests there, so the chance of breaking something is higher than the benefit of fixing it. -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19532 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19988] hex() and oct() use __index__ instead of __int__
Ethan Furman added the comment: For the record, the true/false values of my Logical type do convert to int, just not the unknown value. I agree using __int__ is dubious because of float (and Decimal, etc.), which means really the only clean way to solve the issue (definitely for me, and for any one else in a similar situation) is to bring back __hex__, __oct__, and, presumably, __bin__. To make things even worse, there is a discrepancy between hex() and %x, oct() and %o: -- hex(Unknown) '0x2' -- oct(Unknown) '0o2' -- '%x' % Unknown Traceback (most recent call last): File stdin, line 1, in module TypeError: %x format: a number is required, not Logical -- '%o' % Unknown Traceback (most recent call last): File stdin, line 1, in module TypeError: %o format: a number is required, not Logical Which is bizarre when one considers: -- '%o' % Truth '1' So if '%o' fails, why doesn't oct()? Do we reopen this issue, or start a new one? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19988 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19990] Add unittests for imghdr module
Vajrasky Kok added the comment: Beside my review, I think we need one more test that tests the invalid image file, for example file with header b'cutecat'. -- nosy: +vajrasky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19990 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19988] hex() and oct() use __index__ instead of __int__
Guido van Rossum added the comment: I still think the problem is with your class design. You shouldn't want a hex representation for a value that's not an integer. For the difference between %x and hex() please open another issue (you might want to track down the cause in the source first so you can add a patch or at least a suggested fix to the issue). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19988 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19990] Add unittests for imghdr module
Claudiu.Popa added the comment: Thanks for the review, Vajrasky! Here's the updated version. -- Added file: http://bugs.python.org/file33157/test_imghdr.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19990 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com