[issue21071] struct.Struct.format is bytes, but should be str
STINNER Victor added the comment: Is it safe to assume PyUnicode_AsUTF8() is null-terminated? Yes, Python ensures that the string is null terminated. (like PyBytes_AS_STRING() is) Yes, PyBytes_AS_STRING() also ends with a null byte. By the way, Unicode strings internally ends with a null character. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21071 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23078] unittest.mock patch autospec doesn't work on staticmethods
New submission from Kevin Benton: If one of the mock.patch methods is used with autospec=True on a staticmethod in an object, the mock library determines that it is not callable by checking for the __call__ attribute. This results in a NonCallableMagicMock being returned which of course dies with the following error when the mocked method is called: TypeError: 'NonCallableMagicMock' object is not callable It seems that the create_autospec needs to special case for classmethod and staticmethod. The following change seems to fix it, however I am only vaguely familiar with the internals of mock so I'm not sure what this breaks. diff -r d356250e275d mock.py --- a/mock.py Tue Apr 09 14:53:33 2013 +0100 +++ b/mock.py Wed Dec 17 07:35:15 2014 -0800 @@ -2191,7 +2191,8 @@ # descriptors don't have a spec # because we don't know what type they return _kwargs = {} -elif not _callable(spec): +elif not _callable(spec) and not isinstance(spec, (staticmethod, + classmethod)): Klass = NonCallableMagicMock elif is_type and instance and not _instance_callable(spec): Klass = NonCallableMagicMock -- components: Tests messages: 232864 nosy: kevinbenton, michael.foord priority: normal severity: normal status: open title: unittest.mock patch autospec doesn't work on staticmethods type: behavior versions: Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23078 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23057] asyncio loop on Windows should stop on keyboard interrupt
Kimmo Parviainen-Jalanko added the comment: Seems to happen on FreeBSD 10.1 as well with 3.4.2 -- nosy: +Kimmo.Parviainen-Jalanko ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23057 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23057] asyncio loop on Windows should stop on keyboard interrupt
STINNER Victor added the comment: Seems to happen on FreeBSD 10.1 as well with 3.4.2 FreeBSD uses a completly different implementation. Please open a new issue, describe your problem and write a script reproducing your issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23057 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23071] codecs.__all__ incomplete
Serhiy Storchaka added the comment: LGTM. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23071 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21071] struct.Struct.format is bytes, but should be str
Serhiy Storchaka added the comment: I think breaking the compatibility should be discussed on Python-Dev. Similar issue (and even worse) is issue8934. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21071 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23071] codecs.__all__ incomplete
Marc-Andre Lemburg added the comment: +1 -- nosy: +lemburg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23071 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21697] shutil.copytree() handles symbolic directory incorrectly
Björn Dahlgren added the comment: I ran across this bug too. Applying Eduardo's patch got my package working under Py 3.4 -- nosy: +Björn.Dahlgren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21697 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23079] os.path.normcase documentation confusing
New submission from Chris Jerdonek: The documentation for os.path.normcase(path) is currently confusing or self-contradictory. Currently, it reads-- Normalize the case of a pathname. On Unix and Mac OS X, this returns the path unchanged; on case-insensitive filesystems, it converts the path to lowercase. However, with a case-insensitive file system on Mac OS X (e.g. File System Personality: Journaled HFS+), normcase() does not convert paths to lowercase. As it stands, it seems like the clause on case-insensitive filesystems, it converts the path to lowercase should be removed or further qualified. I don't know what the qualification is though. -- assignee: docs@python components: Documentation, Library (Lib) messages: 232871 nosy: chris.jerdonek, docs@python priority: normal severity: normal status: open title: os.path.normcase documentation confusing type: behavior versions: Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23079 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23079] os.path.normcase documentation confusing
Serhiy Storchaka added the comment: s/on case-insensitive filesystems/on Windows/ ? -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23079 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23079] os.path.normcase documentation confusing
Serhiy Storchaka added the comment: ... and OS/2 (in 2.7). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23079 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23080] BoundArguments.arguments should be unordered
New submission from Antony Lee: This patch makes BoundArguments.arguments an unordered dict. As discussed on python-ideas, the rationale for this is 1. The current ordering in ba.arguments is the one of the parameters in the signature (which is already available via the ba.signature attribute), not the one in which the arguments are given (which will always be unavailable as long as Python doesn't keep the order of keyword arguments), so no information is lost by this patch. 2. The recipe in the docs for updating ba.arguments to also contain default argument values breaks that ordering, making __eq__ behavior difficult to explain: s = signature(lambda x=None, y=None: None) ba0 = s.bind() ba1 = s.bind(x=None) ba2 = s.bind(y=None) add default values as suggested in the docs At that point, with the current implementation, we'll have ba0 == ba1 != ba2... why? 3. Implementing ba.arguments as a regular dict makes signature.bind much faster, which is important e.g. if it is used in a decorating type-checker as suggested in PEP362. (That specific issue could also be improved by a C-implemented OrderedDict, but the other reasons remain valid.) -- components: Library (Lib) files: unordered-boundarguments.patch keywords: patch messages: 232874 nosy: Antony.Lee priority: normal severity: normal status: open title: BoundArguments.arguments should be unordered versions: Python 3.5 Added file: http://bugs.python.org/file37492/unordered-boundarguments.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23080 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23081] Document PySequence_List(o) as equivalent to list(o)
New submission from Lars Buitinck: PySequence_List has accepted iterables since changeset 6c82277e77f3 of May 1, 2001 (NEEDS DOC CHANGES :), but its documentation still only speaks of sequences. I suggest that it is changed to promise to handle arbitrary iterables, just like PySequence_Tuple. -- assignee: docs@python components: Documentation files: PySequence_List-doc.patch keywords: patch messages: 232875 nosy: docs@python, larsmans priority: normal severity: normal status: open title: Document PySequence_List(o) as equivalent to list(o) versions: Python 3.5 Added file: http://bugs.python.org/file37493/PySequence_List-doc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23081 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23082] pathlib relative_to() can give confusing error message
New submission from Chris Jerdonek: pathlib's relative_to(other) can give a confusing message when other is os.curdir. For example-- Python 3.4.2 (default, Nov 12 2014, 18:23:59) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.54)] on darwin Type help, copyright, credits or license for more information. import os from pathlib import Path Path(/foo).relative_to(os.curdir) Traceback (most recent call last): File stdin, line 1, in module File /opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/pathlib.py, line 806, in relative_to .format(str(self), str(formatted))) ValueError: '/foo' does not start with '' I guess the error here is that the path must be relative when other is relative. -- components: Library (Lib) messages: 232876 nosy: chris.jerdonek priority: normal severity: normal status: open title: pathlib relative_to() can give confusing error message type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23082 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23082] pathlib relative_to() can give confusing error message
Chris Jerdonek added the comment: By the way, here is another (less) confusing error message: Path(foo).relative_to(fo) Traceback (most recent call last): File stdin, line 1, in module File /opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/pathlib.py, line 806, in relative_to .format(str(self), str(formatted))) ValueError: 'foo' does not start with 'fo' Without knowing that foo is a path, the message seems wrong. If it said something like Path 'foo' does not start with part 'fo', it would be clearer. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23082 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19918] PureWindowsPath.relative_to() is not case insensitive
Chris Jerdonek added the comment: Was this also fixed for Mac OS X? Mac OS X is also case-insensitive by default, and on Python 3.4.2 I'm getting: Path(Foo).relative_to(foo) Traceback (most recent call last): File stdin, line 1, in module File /opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/pathlib.py, line 806, in relative_to .format(str(self), str(formatted))) ValueError: 'Foo' does not start with 'foo' -- nosy: +chris.jerdonek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19918 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23079] os.path.normcase documentation confusing
R. David Murray added the comment: Or would s/case-insensitive/not case-preserving/ be more accurate? (Well, you'd probably rewrite the sentence to eliminate the 'not'). -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23079 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21071] struct.Struct.format is bytes, but should be str
R. David Murray added the comment: A backward compatibility break would certainly need to be discussed, IMO. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21071 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23079] os.path.normcase documentation confusing
Serhiy Storchaka added the comment: Or would s/case-insensitive/not case-preserving/ be more accurate? (Well, you'd probably rewrite the sentence to eliminate the 'not'). This would not be more accurate because behavior depends from OS, not from file system. On Unix/Linux your can mount case-insensitive filesystem, but normcase() doesn't know anything about this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23079 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19918] PureWindowsPath.relative_to() is not case insensitive
Antoine Pitrou added the comment: pathlib is case-sensitive under OS X (under any non-Windows platform actually). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19918 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23083] sys.exit with bool parameter
New submission from Polux Moon: when using a bool as parameter implementation (2.7) behave like: sys.exit(True) = sys.exit(1) sys.exit(False) = sys.exit(0) so the bool indicate if the termination is abnormal following the doc it should be equivalent to sys.exit(1) in all cases if we assume the implementation is right, the doc should describe the behavior for boolean input -- assignee: docs@python components: Documentation messages: 232883 nosy: Polux.Moon, docs@python priority: normal severity: normal status: open title: sys.exit with bool parameter type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23083 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23083] sys.exit with bool parameter
R. David Murray added the comment: issubclass(bool, int) True True == 1 True [41846 refs] False == 0 True This is fundamental to Python, so it is not obvious that it is a good idea to mention bool explicitly in the sys.exit docs. Perhaps we could change it to say int (or an int subclass such as bool). -- nosy: +r.david.murray versions: -Python 3.2, Python 3.3, Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23083 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23083] sys.exit with bool parameter
Eric V. Smith added the comment: I'm not sure this should be documented. It follows from int and bool equivalence. Plus, I consider it an anti-pattern. We don't want to document everywhere you can pass a bool where an int is called for. That's thousands of places. -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23083 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23083] sys.exit with bool parameter
R. David Murray added the comment: Hmm. Good point about the anti-pattern. I agree that it is probably best to leave the docs as they are. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23083 ___ ___ 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
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +needs review ___ 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
[issue22896] Don't use PyObject_As*Buffer() functions
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +needs review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22896 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23001] Accept mutable bytes-like objects
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +needs review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23001 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6792] Distutils-based installer does not detect 64bit versions of Python
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6792 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22995] Restrict default pickleability
Serhiy Storchaka added the comment: Here is sample patch which adds two restrictions. Default reduce method for protocol = 2 will forbid pickling objects: 1) When tp_new == NULL. 2) Builtins without any of pickle-related methods: __getnewargs_ex__, __getnewargs__ or __getstate__. Are there any other ideas? -- components: +Interpreter Core stage: - patch review type: - enhancement versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22995 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23083] sys.exit with bool parameter
Raymond Hettinger added the comment: I agree that the docs are best as-is. -- nosy: +rhettinger resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23083 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22995] Restrict default pickleability
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file37494/pickle_restrictions.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22995 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22113] memoryview and struct.pack_into
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +needs review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22113 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23084] nanosecond support
New submission from mdcb: nanosecond support has been discussed at length on python-dev and issue 15443. POSIX.1b defines a struct timespec that is commonly used in C, and seems a good candidate to add core nanosecond support. kernel's time-related structs typically end up in the time module. Attached patch defines a new type struct_timespec for the time module. A new capsule exports the type along with to/from converters - opening a bridge for C, and for example the datetime module. -- components: Library (Lib) files: time.struct_timespec.patch hgrepos: 289 keywords: patch messages: 232889 nosy: mdcb...@gmail.com priority: normal severity: normal status: open title: nanosecond support type: enhancement versions: Python 3.6 Added file: http://bugs.python.org/file37495/time.struct_timespec.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23084] nanosecond support
Changes by mdcb mdcb...@gmail.com: -- hgrepos: -289 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23084] nanosecond support
Changes by Ethan Furman et...@stoneleaf.us: -- nosy: +belopolsky, ethan.furman, lemburg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23085] update internal libffi copy to 3.1
New submission from Gustavo Temple: Link to the file: https://github.com/gustavotemple/cpython/pull/2.diff Link to the changes: https://github.com/gustavotemple/cpython/pull/2/commits -- components: ctypes files: libffi.patch keywords: patch messages: 232890 nosy: doko, gustavotemple, meador.inge priority: normal severity: normal status: open title: update internal libffi copy to 3.1 versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file37496/libffi.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23085 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23085] update internal libffi copy to 3.1
Matthias Klose added the comment: some issues: - the local change for Windows still needs upstream forwarding. Steve, any progress on this? - the libffi.diff is not updated (including Steve's changes) - this should be applied to 2.7 as well. -- nosy: +steve.dower, tim.golden, zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23085 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23085] update internal libffi copy to 3.2.1
Changes by Gustavo Temple gustavo.pedr...@eldorado.org.br: -- title: update internal libffi copy to 3.1 - update internal libffi copy to 3.2.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23085 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23083] sys.exit with bool parameter
Changes by Eric V. Smith e...@trueblade.com: -- stage: - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23083 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23084] nanosecond support
Alexander Belopolsky added the comment: See also discussion in #9079, #14127 and #14180. At some point there was some resistance to use capsule mechanism to share code within stdlib and the functions that were shared between time and datetime modules were moved to the core. I am -1 on adding struct_timespec type. POSIX defines [1] the following functions that take struct timespec: intclock_getres(clockid_t, struct timespec *); intclock_gettime(clockid_t, struct timespec *); intclock_settime(clockid_t, const struct timespec *); intnanosleep(const struct timespec *, struct timespec *); and a pair of timer functions that take timespec indirectly through itimerspec struct: inttimer_gettime(timer_t, struct itimerspec *); inttimer_settime(timer_t, int, const struct itimerspec *, struct itimerspec *); In addition, struct stat provides timespec members on some systems. There was a long discussion on how to represent high precession time in Python. PEP 410 proposed using the decimal type and it was rejected. Nanosecond support was ultimately added to os.struct() by adding integer st_{a,m,c}time_ns members. See #14127. Interface to nanosleep is already available via time.sleep() function. If we ever need higher precision sleep we can add time.nanosleep() that takes time in nanoseconds. We have a similar story with time.clock(). Overall, the proposed type is much less convenient than integer nanoseconds because it does not support arithmetics. In any case, I think it is premature to discuss adding a new type before some functions are proposed that would produce or consume instances of this type. [1] http://pubs.opengroup.org/onlinepubs/7908799/xsh/time.h.html -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23085] update internal libffi copy to 3.2.1
Gustavo Temple added the comment: @doko, sorry, but what are the Steve's changes? The issue #22733? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23085 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23084] nanosecond support
Ethan Furman added the comment: I haven't reviewed the patch yet, but I believe the intent is not for better sleep support, but simply to be able to create and record time data which contains nano-seconds. python-dev discussion here: https://mail.python.org/pipermail/python-dev/2014-December/137522.html As far as producing and consuming: time() could be used to produce them, and then any user-function that cares could consume them. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23084] nanosecond support
Alexander Belopolsky added the comment: .. the intent is not for better sleep support, but simply to be able to create and record time data which contains nano-seconds. Can you describe a specific use-case? What's the advantage of the proposed time.struct_timespec over say timespec = namedtuple('timespec', 'sec,nsec') ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23084] nanosecond support
Alexander Belopolsky added the comment: time() could be used to produce them How? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23085] update internal libffi copy to 3.2.1
Steve Dower added the comment: I think Matthias is referring to #20160, but as far as I could tell libffi is multiple versions ahead of the version in Python and already has the fixes. I was told to wait for it to be submitted/accepted upstream, so I've been waiting :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23085 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21236] patch to use cabinet.lib instead of fci.lib (fixes build with Windows SDK 8.0)
Steve Dower added the comment: This was fixed with #22919. -- resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21236 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23085] update internal libffi copy to 3.2.1
Matthias Klose added the comment: you should actively drive upstream integration, and ping patches if they are not addressed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23085 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23085] update internal libffi copy to 3.2.1
Steve Dower added the comment: As I mentioned on the other post, libffi's current version bears no relation to what we have in CPython, so the patches don't apply. I'm not planning on rewriting CPython patches so that they will apply to libffi, nor do I intend to replace our current version of it with libffi's latest. There's nothing to send upstream. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23085 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22038] Implement atomic operations on non-x86 platforms
Changes by Gustavo Temple gustavo.pedr...@eldorado.org.br: Added file: http://bugs.python.org/file37497/atomicv3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22038 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22038] Implement atomic operations on non-x86 platforms
Gustavo Temple added the comment: @haypo, done: atomicv3.patch -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22038 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22038] Implement atomic operations on non-x86 platforms
Changes by Gustavo Temple gustavo.pedr...@eldorado.org.br: Removed file: http://bugs.python.org/file37497/atomicv3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22038 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22038] Implement atomic operations on non-x86 platforms
Changes by Gustavo Temple gustavo.pedr...@eldorado.org.br: Added file: http://bugs.python.org/file37498/atomicv3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22038 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22038] Implement atomic operations on non-x86 platforms
Changes by Gustavo Temple gustavo.pedr...@eldorado.org.br: Removed file: http://bugs.python.org/file37498/atomicv3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22038 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22038] Implement atomic operations on non-x86 platforms
Changes by Gustavo Temple gustavo.pedr...@eldorado.org.br: Added file: http://bugs.python.org/file37499/atomicv3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22038 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22038] Implement atomic operations on non-x86 platforms
Changes by Gustavo Temple gustavo.pedr...@eldorado.org.br: Added file: http://bugs.python.org/file37500/atomicv3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22038 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22038] Implement atomic operations on non-x86 platforms
Changes by Gustavo Temple gustavo.pedr...@eldorado.org.br: Removed file: http://bugs.python.org/file37499/atomicv3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22038 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23084] nanosecond support
STINNER Victor added the comment: See the issue #22117 which basically implement the PEP 410, but only for private C API. The idea is to avoid loss of precision caused by the float type when it is possible. For example, it would be possible for datetime.datetime.now() to avoid the float time. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22956] Improved support for prepared SQL statements
Changes by mike bayer mike...@zzzcomputing.com: -- nosy: +zzzeek ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22956 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23085] update internal libffi copy to 3.2.1
Marc-Andre Lemburg added the comment: Will this also fix http://bugs.python.org/issue23042 ? -- nosy: +lemburg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23085 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23086] Add start and stop parameters to the Sequence.index() ABC mixin method
New submission from Raymond Hettinger: Currently, the Sequence ABC doesn't support start and stop arguments for the index() method which limits its usefulness in doing repeated searches (iterating over a target value) and which limits it substitutablity for various concrete sequences such as tuples, lists, strings, bytes, bytearrays, etc. help(Sequence.index) Help on method index in module _abcoll: index(self, value) unbound _abcoll.Sequence method S.index(value) - integer -- return first index of value. Raises ValueError if the value is not present. help(list.index) Help on method_descriptor: index(...) L.index(value, [start, [stop]]) - integer -- return first index of value. Raises ValueError if the value is not present. help(str.index) Help on method_descriptor: index(...) S.index(sub [,start [,end]]) - int Like S.find() but raise ValueError when the substring is not found. help(tuple.index) Help on method_descriptor: index(...) T.index(value, [start, [stop]]) - integer -- return first index of value. Raises ValueError if the value is not present. help(bytes.index) Help on method_descriptor: index(...) S.index(sub [,start [,end]]) - int Like S.find() but raise ValueError when the substring is not found. help(bytearray.index) Help on method_descriptor: index(...) B.index(sub [,start [,end]]) - int Like B.find() but raise ValueError when the subsection is not found. -- assignee: rhettinger components: Library (Lib) messages: 232904 nosy: rhettinger priority: normal severity: normal status: open title: Add start and stop parameters to the Sequence.index() ABC mixin method versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23086 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23084] nanosecond support
Alexander Belopolsky added the comment: it would be possible for datetime.datetime.now() to avoid the float time. C implementation of datetime.now() does not rely on float time, so this is only an issue for the Python implementation. Moreover, as long as datetime keeps its microsecond resolution, float timestamps are good until the next century. In any case, I don't see how struct_timespec is better than integer expressing time in nanoseconds. We can implement time.nanotime() returning an int without having to invent a new type. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23084] nanosecond support
STINNER Victor added the comment: C implementation of datetime.now() does not rely on float time, so this is only an issue for the Python implementation. Ah yes, but there is another technical issue that I'm trying to address in the issue #22117: datetime.datetime.now() is implemented with _PyTime_gettimeofday() which has a resolution of 1 microsecond, even it is now implemented with clock_gettime(CLOCK_REALTIME) which has a resolution of 1 nanoecond. On Linux, the effictive resolution of clock_gettime(CLOCK_REALTIME) is better than 1 microsecond, around 1/4 microsecond (250 nanosecond). Overall, the proposed type is much less convenient than integer nanoseconds because it does not support arithmetics. I'm working on using a number of nanoseconds using an integer type. It's just a signed 64-bit bit integer. If we decide to support nanosecond resolution in Python, a integer number of nanosecond may be enough. But this issue looks like the PEP 410 which was rejected. If you are motivated enough, you may update the PEP and write a new one. But first, read again the PEP and the discussion explaining why it was rejected. Basically, the loss of precision is very rare (or may not occur) in practice and the PEP 410 required to modify a lot of functions. Remember that the effictive resolution of time.time() on Windows is just 1 millisecond (0.001 second)... See the PEP 418 for many numbers, list of hardware clocks, operating system, etc. https://www.python.org/dev/peps/pep-0418/#system-time -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23087] Exec variable not found error
New submission from Keith Chewning: If I %paste this code into an ipython shell the test passes. If this is saved to a file DictTest.py and run with ./DictTest.py -m the test fails. with the error name 'keys' is not defined If the variable keys is made global, as is suggested in the comment, the test passes with both methods of execution. Is there a scoping issue with executing this as a script? I am using version: '3.4.1 |Anaconda 2.1.0 (64-bit)| (default, Sep 10 2014, 17:10:18) \n[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]' import unittest class DictTest(unittest.TestCase): def test_dict_comprehension(self): code = d = {'a':1, 'b':2, 'c':3, 'd':4} # global keys # UNCOMMENT FOR TEST TO PASS keys = ['a', 'd'] items = d.items() nd = {k: v for k, v in items if k in keys} print(' ' + str(nd)) try: exec(code) except Exception as e: self.assertTrue(False, Exec ERROR %s % e) def main(): dt = DictTest() dt.test_dict_comprehension() if __name__ =='__main__':main() -- messages: 232907 nosy: Keith.Chewning priority: normal severity: normal status: open title: Exec variable not found error type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23087 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23084] nanosecond support
Alexander Belopolsky added the comment: Would anyone object if I rename this issue to Expose C struct timespec in time module? The current title is way too broad. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18590] 'Search' and 'Replace' dialogs don't work on quoted text in Windows
Terry J. Reedy added the comment: I should note that in msg225543 of #22179, I verified that there is a problem in Replace for highlighting found text within quotes, as well as in keywords, until the dialog is closed. On the other hand, the same text is hihglighted in identifiers, plain code, buildin names, and comments. This might be an issue of stacking order. Merely using replace.show_hit in search also will not solve this. -- assignee: - terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18590 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23084] nanosecond support
Ethan Furman added the comment: Just keep the word nanasecond in there somewhere, as that is the motivating purpose behind the patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23087] Exec variable not found error
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23087 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23084] Expose C struct timespec (nanosecond resolution) in time module
Changes by Alexander Belopolsky alexander.belopol...@gmail.com: -- title: nanosecond support - Expose C struct timespec (nanosecond resolution) in time module ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23084] Expose C struct timespec (nanosecond resolution) in time module
Alexander Belopolsky added the comment: I would say that rejection note for PEP 410 [1] and the implementation of st_[amc]time_ns fields in os.stats() have established a de-facto standard for representing nanosecond resolution timestamps in Python. I think this proposal should be rejected. [1] https://mail.python.org/pipermail/python-dev/2012-February/116837.html -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23001] Accept mutable bytes-like objects
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23001 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23084] Expose C struct timespec (nanosecond resolution) in time module
Ethan Furman added the comment: If I am reading data from an external device that has nanosecond resolution, how would I create such a time stamp in Python right now? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23084] Expose C struct timespec (nanosecond resolution) in time module
mdcb added the comment: I'm going to be my own devil's advocate: PyLong_FromLong ... Thanks for all the links, I hadn't realized there was so much background to the issue, there is some good reading there too. you've changed the title now, but in fact the intention was the other aspect, core nanosecond support in python. I just happened to pick timespec because it does the job and is reasonably widespread. reading all this, and threading lighlty, I was playing with class timestamp(int): pass measure of time expressed as a number of nanoseconds but that seems to loose the type information after doing arithmetics x=timestamp(10) y=timestamp(20) type(x+y) gives int -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23084] Expose C struct timespec (nanosecond resolution) in time module
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23084] Expose C struct timespec (nanosecond resolution) in time module
Alexander Belopolsky added the comment: If I am reading data from an external device that has nanosecond resolution, how would I create such a time stamp in Python right now? seconds * 10**9 + nanoseconds (translated to C API if necessary) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23042] Python 2.7.9 ctypes module doesn't build on FreeBSD x86
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23042 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23085] update internal libffi copy to 3.2.1
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23085 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23084] Expose C struct timespec (nanosecond resolution) in time module
mdcb added the comment: can we change back the title because in fact, exposing struct timespec wasn't really the intention (but keep the patch if you want it!) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23087] Exec variable not found error
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23087 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23084] Expose C struct timespec (nanosecond resolution) in time module
Alexander Belopolsky added the comment: but that seems to loose the type information after doing arithmetics Hear, hear. See #2267. If you find out why Python was designed this way - let me know. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22038] Implement atomic operations on non-x86 platforms
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22038 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22113] memoryview and struct.pack_into
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22113 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22995] Restrict default pickleability
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22995 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18590] 'Search' and 'Replace' dialogs don't work on quoted text in Windows
Changes by Terry J. Reedy tjre...@udel.edu: -- dependencies: -Idle. Search dialog found text not highlited on Windows ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18590 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22179] Idle. Search dialog found text not highlited on Windows
Terry J. Reedy added the comment: The first # comment above should be On Windows, the selection highlight is *not* visible while the modal dialog is open. This bug was, in a sense, introduced by #17511, which kept the dialog open after [Find] is pressed, instead of closing it immediately. About the last comment: the selection tag does not need to be applied until closing. (Ditto for find/replace.) The missing found highlighting for Replace is issue #18590 -- assignee: - terry.reedy dependencies: +'Search' and 'Replace' dialogs don't work on quoted text in Windows ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22179 ___ ___ 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
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ 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
[issue23084] Expose C struct timespec (nanosecond resolution) in time module
Alexander Belopolsky added the comment: can we change back the title because in fact Please don't. If you would like to discuss general ideas - the right forum would be the python-ideas mailing list. We have no shortage of issue numbers: once you have another specific proposal - feel free to open a new issue. If you withdraw your proposal to apply time.struct_timespec.patch, I will close this issue. -- assignee: - belopolsky resolution: - rejected stage: - resolved status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16349] Document whether it's safe to use bytes for struct format string
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16349 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21071] struct.Struct.format is bytes, but should be str
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21071 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8934] aifc should use str instead of bytes (wave, sunau compatibility)
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8934 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23076] list(pathlib.Path().glob()) fails with IndexError
Arfrever Frehtes Taifersar Arahesis added the comment: list(pathlib.Path().glob()) Traceback (most recent call last): File stdin, line 1, in module File /usr/lib64/python3.5/pathlib.py, line 999, in glob selector = _make_selector(tuple(pattern_parts)) File /usr/lib64/python3.5/functools.py, line 458, in wrapper result = user_function(*args, **kwds) File /usr/lib64/python3.5/pathlib.py, line 403, in _make_selector pat = pattern_parts[0] IndexError: tuple index out of range -- assignee: - pitrou nosy: +Arfrever, pitrou title: path.glob() fails with IndexError - list(pathlib.Path().glob()) fails with IndexError versions: +Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23076 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23082] pathlib relative_to() can give confusing error message
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- assignee: - pitrou nosy: +Arfrever, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23082 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23084] Expose C struct timespec (nanosecond resolution) in time module
mdcb added the comment: I'm fine my patch doesn't resolve the nanosecond support, but that doesn't mean the issue is closed per say. Ref. to PEP410 rejection and de facto standard seems a bit expeditive. assuming it worked, this would somewhat be more agreeable ? class timestamp(int): pass measure of time expressed as a number of nanoseconds -- resolution: rejected - status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23084] Expose C struct timespec (nanosecond resolution) in time module
mdcb added the comment: firefox did something and changed some fields I did not intend to. I'm trying to undo that now. -- resolution: - rejected status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23084] Expose C struct timespec (nanosecond resolution) in time module
Alexander Belopolsky added the comment: nanosecond support [in Python] is a PEP-size topic. As Victor suggested, If you are motivated enough, you may update the PEP and write a new one. The tracker does not provide a sufficiently large forum to discuss nanosecond support in full generality. assuming it worked, this would somewhat be more agreeable ? class timestamp(int): pass measure of time expressed as a number of nanoseconds By working, I assume you mean if arithmetic operations worked as expected. In this case you are reinventing mxDateTime [1], which is similar to stdlib datetime, but supports a much higher resolution. Ref. to PEP410 rejection and de facto standard seems a bit expeditive. I don't think so. Possibly, I should have referred to PEP 20, as well, but that is usually implicit. We now have two APIs in stdlib that pass nanosecond-resolution timestamps as plain integers: os.stat() and os.utime(). This is not going to change, so for compatibility reasons, any new type would have to be interchangeable with int. In theory, your timestamp subclass would qualify, but what advantage would it give you over plain int? If you start adding functionality to timestamp, you will quickly end up with something that is half-way between int and either datetime or timedelta. [1] http://www.egenix.com/products/python/mxBase/mxDateTime -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23084 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23080] BoundArguments.arguments should be unordered
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23080 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23081] Document PySequence_List(o) as equivalent to list(o)
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag, tim.peters ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23081 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23080] BoundArguments.arguments should be unordered
Yury Selivanov added the comment: I'd like to see PEP 468 explicitly rejected or postponed till 3.6 before we make this change in 3.5. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23080 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22350] nntplib file write failure causes exception from QUIT command
Martin Panter added the comment: Here is a patch with a fix and a test -- keywords: +patch Added file: http://bugs.python.org/file37501/fail-close.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22350 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23088] Document that PyUnicode_AsUTF8() returns a null-terminated string
New submission from Martin Panter: As discussed in msg232863, and later confirmed in the code -- assignee: docs@python components: Documentation files: utf8-null.patch keywords: patch messages: 232925 nosy: docs@python, vadmium priority: normal severity: normal status: open title: Document that PyUnicode_AsUTF8() returns a null-terminated string versions: Python 3.4 Added file: http://bugs.python.org/file37502/utf8-null.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23088 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18590] Found text not always highlighted by Replace dialog
Terry J. Reedy added the comment: I am narrowing the scope of this issue to Replace dialogs and widening the scope to output as well as edit windows. The attached patch solves the issue as redefined. (It has a temporary hack to pass the unittests.) For edit windows, the problem is that the default tag stacking order seems to be alphabetical. No tag, 'builtin, 'comment', and 'definition, are followed and dominated by 'hit'; 'keyword' and 'string' come after and dominate 'hit'. The solution is to raise 'hit' to the top. The test (from msg225543), which should be added to htest), is that all 6 'i's in def i(): this list is 'is' # is not are both found and highlighted. They are with the patch. For output windows, the problem, mentioned in msg225382, is that the 'hit' tag is configured in ColorDelegator, which is not used in output windows. Ths solution, also mentioned there, is to move the configuration to SearchDialogBase. The path does this and Replace dialog Find work for Output Windows. I tested on Windows. I am 99.9% sure there should be no problem on other systems, but would like confirmation on other systems before or after committing an expanded patch with test changes added. -- nosy: +sahutd stage: patch review - test needed title: 'Search' and 'Replace' dialogs don't work on quoted text in Windows - Found text not always highlighted by Replace dialog Added file: http://bugs.python.org/file37503/replace_find_hit.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18590 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com