[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-11 Thread Georg Brandl
Georg Brandl added the comment: New patch matching revision of PEP. -- Added file: http://bugs.python.org/file41892/numeric_underscores_v2.diff ___ Python tracker ___ ___

[issue26337] Bypass imghdr module determines the type of image

2016-02-11 Thread Ramin Farajpour Cami
Changes by Ramin Farajpour Cami : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue25937] DIfference between utf8 and utf-8 when i define python source code encoding.

2016-02-11 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Serhiy: Removing the shortcut would slow down the tokenizer a lot since UTF-8 encoded source code is the norm, not the exception. The "problem" here is that the tokenizer trusts the source code in being in the correct encoding when you use one of utf-8 or

[issue23606] ctypes.util.find_library("c") no longer makes sense

2016-02-11 Thread Eryk Sun
Eryk Sun added the comment: If the examples continue to use printf, then msvcrt.dll is the best option. The universal CRT exports a single Swiss-Army-knife function, __stdio_common_vfprintf, which requires 5 parameters, including a va_list for the variadic argument list. That's not appropriate

[issue26337] Bypass imghdr module determines the type of image

2016-02-11 Thread Steven D'Aprano
Steven D'Aprano added the comment: I'm sorry, I don't understand what you think is the bug here. It looks like you are passing a corrupted file which has a PNG extension but is not actually a PNG file (it contains PHP code). What do you expect should happen? -- nosy: +steven.daprano _

[issue26328] shutil._copyxattr() function shouldn't fail if setting security.selinux xattr fails

2016-02-11 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +tarek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch implements strict underscore rules. The implementation is not more complex. -- Added file: http://bugs.python.org/file41893/numeric_underscores_strict.patch ___ Python tracker

[issue26337] Bypass imghdr module determines the type of image

2016-02-11 Thread Ramin Farajpour Cami
Ramin Farajpour Cami added the comment: images can be served with a content type of text/html,(which means we can certainly inject HTML). -- ___ Python tracker ___ _

[issue26312] Raise SystemError on programmical errors in PyArg_Parse*()

2016-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: SystemError is not new exception. It could be raised on other programming bugs. In any case I doesn't expect that anybody catches such exceptions. -- ___ Python tracker

[issue26312] Raise SystemError on programmical errors in PyArg_Parse*()

2016-02-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset c7eff18f3840 by Serhiy Storchaka in branch 'default': Issue #26312: SystemError is now raised in all programming bugs with using https://hg.python.org/cpython/rev/c7eff18f3840 -- nosy: +python-dev ___ Pyt

[issue25985] Use sys.version_info instead of sys.version

2016-02-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 935d7804d1be by Serhiy Storchaka in branch 'default': Issue #25985: sys.version_info is now used instead of sys.version https://hg.python.org/cpython/rev/935d7804d1be -- nosy: +python-dev ___ Python track

[issue26325] Add helper to check that no ResourceWarning is emitted

2016-02-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset e9a4b30e3e43 by Serhiy Storchaka in branch '3.5': Issue #26325: Added test.support.check_no_resource_warning() to check that https://hg.python.org/cpython/rev/e9a4b30e3e43 New changeset faf676d8c054 by Serhiy Storchaka in branch 'default': Issue #26

[issue25994] File descriptor leaks in os.scandir()

2016-02-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset f98ed0616d07 by Serhiy Storchaka in branch 'default': Issue #25994: Added the close() method and the support of the context manager https://hg.python.org/cpython/rev/f98ed0616d07 -- nosy: +python-dev ___

[issue26200] SETREF adds unnecessary work in some cases

2016-02-11 Thread STINNER Victor
STINNER Victor added the comment: Raymond Hettinger: "Most of the SETREFs in the next() functions in the itertools module should also be restored to there former state. They look to have been correct before the change, so there was no improvement, only degradation. Much of that code had been

[issue25995] os.walk() consumes a lot of file descriptors

2016-02-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset e951d76f1945 by Serhiy Storchaka in branch '3.5': Issue #25995: os.walk() no longer uses FDs proportional to the tree depth. https://hg.python.org/cpython/rev/e951d76f1945 New changeset 6197a09a56b1 by Serhiy Storchaka in branch 'default': Issue #25

[issue26312] Raise SystemError on programmical errors in PyArg_Parse*()

2016-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks for your review. -- assignee: -> serhiy.storchaka resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue25985] Use sys.version_info instead of sys.version

2016-02-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue26337] Bypass imghdr module determines the type of image

2016-02-11 Thread Ramin Farajpour Cami
Ramin Farajpour Cami added the comment: In normal if you choose a image and open image with editor set codes to image you get error , but I able to bypass image for upload if I use module imghdr for check valid image , booom upload image with malicious code , -- __

[issue24916] In sysconfig, don't rely on sys.version format

2016-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Most changes were committed in issue25985. Only _PY_VERSION is left. I have no strong opinion about this, but +0 for keeping "+". -- ___ Python tracker _

[issue26325] Add helper to check that no ResourceWarning is emitted

2016-02-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-11 Thread Georg Brandl
Georg Brandl added the comment: This patch includes int(), float(), complex() operations, as well as _pydecimal. -- Added file: http://bugs.python.org/file41894/numeric_underscores_v3_full.diff ___ Python tracker _

[issue25994] File descriptor leaks in os.scandir()

2016-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Committed with using the helper from issue26325 for testing. Thank you all for your reviews, especially for help with the documentation. -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed __

[issue25995] os.walk() consumes a lot of file descriptors

2016-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: walk_consume_fds_opt1.patch is applied in 3.5 (it is more reliable with the absence of close()) and walk_consume_fds_opt2.patch is applied in 3.6. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___

[issue25994] File descriptor leaks in os.scandir()

2016-02-11 Thread STINNER Victor
STINNER Victor added the comment: > Committed with using the helper from issue26325 for testing. Great! Good job. -- ___ Python tracker ___ _

[issue26182] Deprecation warnings for the future async and await keywords in Python 3.6

2016-02-11 Thread Marco Buttu
Marco Buttu added the comment: I added the PyErr_WarnEx(PyExc_DeprecationWarning, ...) in Python/ast.c, right below the check for None, True and False as names. Running the following test the message is properly printed: def test_async(self): with self.assertWarnsRegex(DeprecationWarning,

[issue25596] Use scandir() to speed up the glob module

2016-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch is completed now. The with statement is used to avoid FD leaks. -- Added file: http://bugs.python.org/file41895/glob_scandir_5.patch ___ Python tracker

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-11 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: So, shall we include it ? Otherwise, py8601 (https://bitbucket.org/micktwomey/pyiso8601/) looks pretty popular and well maintained (various committers, started in 2012, last commit in 2016). I think we should hurry, that's a great shame it has been while Python

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-11 Thread STINNER Victor
STINNER Victor added the comment: I'm working on the OpenStack project and iso8601 is heavily used. > Otherwise, py8601 (https://bitbucket.org/micktwomey/pyiso8601/) looks pretty > popular and well maintained (various committers, started in 2012, last commit > in 2016). I don't think that we

[issue26200] SETREF adds unnecessary work in some cases

2016-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Py_SETREF() is used not only for fixing possible bugs. It can make the correct code shorter and cleaner. For example Stephan appreciated this in df78978dacab. In most case the difference between Py_DECREF and Py_XDECREF looks negligible. Most of the SETREFs

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-11 Thread Georg Brandl
Georg Brandl added the comment: New patch with minimal doc updates. -- Added file: http://bugs.python.org/file41896/numeric_underscores_v4_full.diff ___ Python tracker ___ __

[issue25264] test_marshal always crashs on "AMD64 Windows10 2.7" buildbot

2016-02-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- priority: high -> critical ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue25911] Regression: os.walk now using os.scandir() breaks bytes filenames on windows

2016-02-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: fixed -> stage: resolved -> patch review ___ Python tracker ___ ___ Python-bugs-list mai

[issue25911] Regression: os.walk now using os.scandir() breaks bytes filenames on windows

2016-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New tests emit deprecation warnings on Windows and failed. http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x/builds/1753/steps/test/logs/stdio test_rmdir_on_directory_link_to_missing_target (test.test_os.Win32SymlinkTests) ... D:\buildarea\3.x.bo

[issue26214] textwrap should minimize number of breaks in extra long words

2016-02-11 Thread Steven D'Aprano
Changes by Steven D'Aprano : -- nosy: +steven.daprano ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue26002] make statistics.median_grouped more efficient

2016-02-11 Thread Steven D'Aprano
Steven D'Aprano added the comment: Looks good to me. I've run some quick timing tests, and for very small lists, there's no significant difference, but for larger lists I'm getting up to a 50% speedup. Nicely done, thank you. -- ___ Python tracker

[issue19543] Add -3 warnings for codec convenience method changes

2016-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is there something left to do with this issue? -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue15068] fileinput requires two EOF when reading stdin

2016-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue26086] Bug in os module

2016-02-11 Thread Steven D'Aprano
Steven D'Aprano added the comment: I don't see any conclusive evidence that this is a bug in the Python interpreter, so I'm going to close the issue. Hana, if you are still having this problem, please join the main python mailing list https://mail.python.org/mailman/listinfo/python-list or new

[issue26338] remove duplicate bind addresses in create_server

2016-02-11 Thread Sebastien Bourdeauducq
New submission from Sebastien Bourdeauducq: https://github.com/python/asyncio/issues/315 New patch attached. -- components: asyncio files: asyncio_norebind.diff keywords: patch messages: 260108 nosy: gvanrossum, haypo, sebastien.bourdeauducq, yselivanov priority: normal severity: normal

[issue26339] Python rk0.3b1 KeyError: 'config_argparse_rel_path'

2016-02-11 Thread sherpa
New submission from sherpa: Hi, we use python 2.7.3 on Linux SuSe Enterprise 11 x86 64 bits. After installing the python module rk0.3b1, we have this error when rk parse the configuration file: KeyError: 'config_argparse_rel_path' after this function dict.__getitem__(self, key) You will find b

[issue26289] Optimize floor division for ints

2016-02-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 37bacf3fa1f5 by Yury Selivanov in branch 'default': Issues #26289 and #26315: Optimize floor/modulo div for single-digit longs https://hg.python.org/cpython/rev/37bacf3fa1f5 -- nosy: +python-dev ___ Pytho

[issue26315] Optimize mod division for ints

2016-02-11 Thread Yury Selivanov
Changes by Yury Selivanov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue26315] Optimize mod division for ints

2016-02-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 37bacf3fa1f5 by Yury Selivanov in branch 'default': Issues #26289 and #26315: Optimize floor/modulo div for single-digit longs https://hg.python.org/cpython/rev/37bacf3fa1f5 -- nosy: +python-dev ___ Pytho

[issue26289] Optimize floor division for ints

2016-02-11 Thread Yury Selivanov
Yury Selivanov added the comment: Committed. Thank you Serhiy, Mark and Victor for helping with the patch! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue26317] Build Problem with GCC + Macintosh OS X 10.11 El Capitain

2016-02-11 Thread Ronald Oussoren
Ronald Oussoren added the comment: The makefiles use CC throughout and don't look at and OBJC variable. Is that variable a standard way to specify an ObjC compiler in makefiles? Make's default ruleset for compiling .m files uses $(CC) and doesn't look at $(OBJC). I wouldn't be opposed to a p

[issue25709] Problem with string concatenation and utf-8 cache.

2016-02-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: serhiy.storchaka -> georg.brandl ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue26340] modal dialog with transient method; parent window fails to iconify

2016-02-11 Thread vs
New submission from vs: Consider the following code implementing a custom modal dialog: from Tkinter import * def dialog(): win = Toplevel() Label(win, text='Modal Dialog').pack() win.transient(win.master) win.focus_set() win.grab_set() win.wait_window() root = Tk() But

[issue25709] Problem with string concatenation and utf-8 cache.

2016-02-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset b9c8f1c80f47 by Serhiy Storchaka in branch '3.3': Issue #25709: Fixed problem with in-place string concatenation and utf-8 cache. https://hg.python.org/cpython/rev/b9c8f1c80f47 -- ___ Python tracker

[issue25709] Problem with string concatenation and utf-8 cache.

2016-02-11 Thread Georg Brandl
Georg Brandl added the comment: Backpicked to 3.3. Sorry for the wait. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue24668] Deprecate 00000 as a synonym for 0

2016-02-11 Thread Georg Brandl
Georg Brandl added the comment: Closing now. -- status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue15693] expose glossary link on hover

2016-02-11 Thread Georg Brandl
Changes by Georg Brandl : -- assignee: georg.brandl -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue4173] PDF documentation: long verbatim lines are cut off at right hand side

2016-02-11 Thread Georg Brandl
Changes by Georg Brandl : -- assignee: georg.brandl -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue4145] tabulary entries in PDF documentation

2016-02-11 Thread Georg Brandl
Changes by Georg Brandl : -- assignee: georg.brandl -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue20741] Documentation archives should be available also in tar.xz format

2016-02-11 Thread Georg Brandl
Changes by Georg Brandl : -- assignee: georg.brandl -> ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue20741] Documentation archives should be available also in tar.xz format

2016-02-11 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-11 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue26182] Deprecation warnings for the future async and await keywords in Python 3.6

2016-02-11 Thread Brett Cannon
Brett Cannon added the comment: You need to temporarily turn on warnings for it to work. For example: with warnings.catch_warnings(): warnings.simplefilter('always') with self.assertWarnsRegex(DeprecationWarning, "reserved keyword"): exec('async = 33') Do notice I used exe

[issue26182] Deprecation warnings for the future async and await keywords in Python 3.6

2016-02-11 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: -haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue25709] Problem with string concatenation and utf-8 cache.

2016-02-11 Thread STINNER Victor
STINNER Victor added the comment: 2016-02-11 18:23 GMT+01:00 Georg Brandl : > > Georg Brandl added the comment: > > Backpicked to 3.3. Sorry for the wait. Good, this bugfix is useful :-) -- ___ Python tracker

[issue25709] Problem with string concatenation and utf-8 cache.

2016-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I wait only Greg's approving for 3.3. If I'll not get it in a day, I'll > commit the patch for 3.4+. Maybe it was my fault. I made a mistake in Georg's name. -- ___ Python tracker

[issue25709] Problem with string concatenation and utf-8 cache.

2016-02-11 Thread Georg Brandl
Georg Brandl added the comment: Actually I prefer Greg to Gerg, so it's only half bad. :D -- ___ Python tracker ___ ___ Python-bugs-li

[issue18199] Windows: support path longer than 260 bytes using "\\?\" prefix

2016-02-11 Thread Steve Dower
Steve Dower added the comment: Paths prefixed with "\\?\" also need to be normalized, not just absolute. AFAIK there are no official docs on what normalization is required, but it includes at least trimming trailing dots on directory names, removing "." and ".." sections, adjacent backslashes,

[issue24712] Docs page's sidebar vibrates on mouse wheel scroll on Chrome.

2016-02-11 Thread Mike Taylor
Mike Taylor added the comment: Great, thanks Ezio! Will take a stab now. -- ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue26341] Implement free-list for single-digit longs

2016-02-11 Thread Yury Selivanov
New submission from Yury Selivanov: The attached patch implements a free-list for single-digit longs. We already have free lists for many fundamental types, such as floats & unicode. The patch improves performance in micro-benchmarks by 10-20%. It'll also lessen memory fragmentation issues.

[issue26341] Implement free-list for single-digit longs

2016-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This looks as a duplicate of issue24165. -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue26342] Faster bit ops for single-digit positive longs

2016-02-11 Thread Yury Selivanov
New submission from Yury Selivanov: This patch implements a fast path for &, |, and ^ bit operations for single-digit positive longs. We already have fast paths for ~, and pretty much every other long op. -m timeit -s "x=21827623" "x&2;x&2;x&2;x&333;x&3;x&3;x&;x&4" with patch: 0.181

[issue26341] Implement free-list for single-digit longs

2016-02-11 Thread Yury Selivanov
Yury Selivanov added the comment: You're right Serhiy, closing this one. -- resolution: -> duplicate superseder: -> Free list for single-digits ints ___ Python tracker ___

[issue24165] Free list for single-digits ints

2016-02-11 Thread Yury Selivanov
Yury Selivanov added the comment: I think that we only need to add free-list for 1-digit longs. Please see my patch & explanation in issue #26341. -- nosy: +yselivanov ___ Python tracker _

[issue24165] Free list for single-digits ints

2016-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Did you test on platform with 30-bit digits? I tested with 15-bit digits. Could you repeat my microbenchmarks from msg242919? -- ___ Python tracker _

[issue24165] Free list for single-digits ints

2016-02-11 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue24165] Free list for single-digits ints

2016-02-11 Thread Yury Selivanov
Yury Selivanov added the comment: > Did you test on platform with 30-bit digits? Yes. > Could you repeat my microbenchmarks from msg242919? Sure. With your patches or with mine from issue #26341? -- ___ Python tracker

[issue24165] Free list for single-digits ints

2016-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: With all three patches if you want (I don't expect a difference between your patch and my single-digit patch). -- ___ Python tracker ___

[issue26341] Implement free-list for single-digit longs

2016-02-11 Thread Yury Selivanov
Changes by Yury Selivanov : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mail

[issue26200] SETREF adds unnecessary work in some cases

2016-02-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: It may just be me, but I find the code the be less readable. The presence of the SETREFs in the itertools modules makes it harder for me to count and track all the references to make sure the code is correct. For me, it is an obstacle to maintenance. The

[issue24165] Free list for single-digits ints

2016-02-11 Thread Yury Selivanov
Yury Selivanov added the comment: Best of 5s: -m timeit -s "r = range(10**4)" -- "for i in r: pass" orig: 239 usec my patch: 148 int_free_list_2: 151 int_free_list_multi: 156 -m timeit -s "r = range(10**5)" -- "for i in r: pass" orig: 2.4 msec my patch: 1.47 int_free_list_2: 1.53 int_free_list

[issue26200] SETREF adds unnecessary work in some cases

2016-02-11 Thread Stefan Krah
Stefan Krah added the comment: As Serhiy mentioned, I'm really happy with the Py_SETREF() macro and I understand the reasons why it was applied so broadly. But if a module maintainer prefers not to change existing (and correct) code, then that should have priority (also, the existing version wa

[issue26200] SETREF adds unnecessary work in some cases

2016-02-11 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: -haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue26343] os.O_CLOEXEC not available on OS X

2016-02-11 Thread Gustavo Goretkin
New submission from Gustavo Goretkin: I am on OS X 10.9.5 Python 3.5.1 (v3.5.1:37a07cee5969, Dec 5 2015, 21:12:44) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.O_CLOEXEC Traceback (most recent

[issue26292] Raw I/O writelines() broken for non-blocking I/O

2016-02-11 Thread STINNER Victor
Changes by STINNER Victor : -- title: Raw I/O writelines() broken -> Raw I/O writelines() broken for non-blocking I/O ___ Python tracker ___

[issue26342] Faster bit ops for single-digit positive longs

2016-02-11 Thread STINNER Victor
STINNER Victor added the comment: fast_bits.patch LGTM. But it would be better to have at least two reviews. -- ___ Python tracker ___ ___

[issue26343] os.O_CLOEXEC not available on OS X

2016-02-11 Thread Gustavo Goretkin
Gustavo Goretkin added the comment: It looks like cpython will check to see if O_CLOEXEC is #defined. In my system's /usr/include/sys/fcntl.h #if __DARWIN_C_LEVEL >= 200809L #define O_CLOEXEC 0x100 /* implicitly set FD_CLOEXEC */ #endif --

[issue26344] `sys.meta_path` Skipped for Packages with Non-Standard Suffixed `__init__` Files

2016-02-11 Thread Wolfgang Richter
New submission from Wolfgang Richter: My understanding of `sys.meta_path` is that it is supposed to allow customized loading of Python modules and packages. In fact the `importlib` machinery appears to have support for identifying packages with `__init__` files with non-standard suffixes: htt

[issue26344] `sys.meta_path` Skipped for Packages with Non-Standard Suffixed `__init__` Files

2016-02-11 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +brett.cannon, eric.smith, eric.snow, ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing

[issue26343] os.O_CLOEXEC not available on OS X

2016-02-11 Thread STINNER Victor
STINNER Victor added the comment: FYI Python creates non-inheritable file descriptors by default since Python 3.4: PEP 446. See also the PEP 433 which has more information on OS support, especially: https://www.python.org/dev/peps/pep-0433/#atomic-flags -- nosy: +haypo ___

[issue26343] os.O_CLOEXEC not available on OS X

2016-02-11 Thread STINNER Victor
STINNER Victor added the comment: What is __DARWIN_C_LEVEL? Are we supposed to define it directly? Or is it defined from other #define in features.h? -- ___ Python tracker ___ _

[issue26343] os.O_CLOEXEC not available on OS X

2016-02-11 Thread Ronald Oussoren
Ronald Oussoren added the comment: The lack of o_cloexec could be caused by the SDK used to build the binary installer. AFAIK _DARWIN_C_LEVEL is set automatically based on the deployment target. Ronald Sent from my iPad > On 11 feb. 2016, at 23:44, STINNER Victor wrote: > > > STINNER Vic

[issue26344] `sys.meta_path` Skipped for Packages with Non-Standard Suffixed `__init__` Files

2016-02-11 Thread Brett Cannon
Brett Cannon added the comment: I'm at work and so I don't have access to tar on this machine ATM, so I can't look at your code example. But sys.meta_path might be one level above what you want; you might be looking for sys.path_hooks since https://docs.python.org/3/library/importlib.html#impo

[issue26323] Add a assert_called() method for mock objects

2016-02-11 Thread Amit Saha
Amit Saha added the comment: Please take a look at the attached patch. -- keywords: +patch Added file: http://bugs.python.org/file41903/issue26323.patch ___ Python tracker ___ __

[issue26323] Add a assert_called() method for mock objects

2016-02-11 Thread Amit Saha
Amit Saha added the comment: Fixed the test name -- Added file: http://bugs.python.org/file41904/issue26323.patch ___ Python tracker ___ _

[issue26344] `sys.meta_path` Skipped for Packages with Non-Standard Suffixed `__init__` Files

2016-02-11 Thread Wolfgang Richter
Wolfgang Richter added the comment: Brett thanks for the very quick response. I've inserted my finder as the first element in sys.meta_path. I also overrode the @classmethod find_loader, but it doesn't appear that it's being called. -- ___ Python t

[issue26344] `sys.meta_path` Skipped for Packages with Non-Standard Suffixed `__init__` Files

2016-02-11 Thread Brett Cannon
Brett Cannon added the comment: As I said, I can't look at your code unless you upload the file separately so I don't know how much help I can be. Did you check sys.modules to make sure the directory had not already been imported or sys.path_importer_cache to make sure the directory didn't alr

[issue26344] `sys.meta_path` Skipped for Packages with Non-Standard Suffixed `__init__` Files

2016-02-11 Thread Wolfgang Richter
Wolfgang Richter added the comment: Sure Brett I'll upload the code separately in an hour or two. I've overridden all the publicly exposed functions (including find_spec). I wanted to initially see if anything was passing through my finder in the first position of the meta_path. -- _

[issue24165] Free list for single-digits ints

2016-02-11 Thread STINNER Victor
STINNER Victor added the comment: I ran perf.py on long_fl.patch of issue #26341. It looks slower and has no impact on such macro benchmark. ~/bin/taskset_isolated.py time python3 -u perf.py --rigorous ../default/python.orig ../default/python_long_fl # python rev 37bacf3fa1f5 Report on Linux

[issue24165] Free list for single-digits ints

2016-02-11 Thread Yury Selivanov
Yury Selivanov added the comment: I also ran benchmarks. For me, django was 1% faster, telco 5% slower, and the rest were the same. telco is a decimal benchmarks (ints aren't used there), and django/chameleon are unicode concatenation benchmarks. I can see improvements in micro benchmarks, b

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-02-11 Thread STINNER Victor
STINNER Victor added the comment: See also #12006 for ISO 8601: "The datetime.strftime() and date.strftime() methods now support ISO 8601 date directives %G, %u and %V. (Contributed by Ashley Anderson in issue 12006.)". -- ___ Python tracker

[issue26343] os.O_CLOEXEC not available on OS X

2016-02-11 Thread Ned Deily
Ned Deily added the comment: Ronald is correct. Apple added O_CLOEXEC to OS X in 10.7. For compatibility reasons, the python.org 64-bit installers for OS X currently are built to be compatible with OS X 10.6 on up and do not do runtime checks for OS features only available on newer releases.

[issue26344] `sys.meta_path` Skipped for Packages with Non-Standard Suffixed `__init__` Files

2016-02-11 Thread Wolfgang Richter
Wolfgang Richter added the comment: Here's the file, before I experimented with find_loader. If you take out all my print's, it's quite short. -- Added file: http://bugs.python.org/file41905/main.py ___ Python tracker

[issue26344] `sys.meta_path` Skipped for Packages with Non-Standard Suffixed `__init__` Files

2016-02-11 Thread Wolfgang Richter
Changes by Wolfgang Richter : -- versions: +Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue26345] Extra newline appended to UTF-8 strings on Windows

2016-02-11 Thread Egor Tensin
New submission from Egor Tensin: I've come across an issue of Python 3.5.1 appending an extra newline when print()ing non-ASCII strings on Windows. This only happens when the active "code page" is set UTF-8 in cmd.exe: >chcp Active code page: 65001 Now, if I try to print an ASCII char

[issue26346] PySequenceMethods documentation missing sq_slice and sq_ass_slice

2016-02-11 Thread Anthony Tuininga
New submission from Anthony Tuininga: These methods are completely missing from the documentation found here: https://docs.python.org/3/c-api/typeobj.html -- assignee: docs@python components: Documentation messages: 260154 nosy: atuining, docs@python priority: normal severity: normal st

  1   2   >