[issue28180] sys.getfilesystemencoding() should default to utf-8

2017-01-04 Thread Nick Coghlan
Nick Coghlan added the comment: On Mac OS X, the XCode libc already ignores the locale settings and just uses UTF-8 as the default text encoding, so the hardcoding in CPython aligns with that behaviour. That isn't the case on other *nix systems - there, we need CPython to be consistent with t

[issue28180] sys.getfilesystemencoding() should default to utf-8

2017-01-04 Thread INADA Naoki
INADA Naoki added the comment: > That isn't the case on other *nix systems - there, we need CPython to be > consistent with the configured C/C++ locale, *and* we need it to be using > something other than ASCII as the default encoding. Isn't using UTF-8 as filesystem encoding and stdin/stdout

[issue29133] Minor inaccuracy in shlex.shlex punctuation_chars example

2017-01-04 Thread Marco Buttu
Marco Buttu added the comment: I did not add the doctest directive on purpose. In fact, if in the future we start running the doctests with buildbot (see issue27200), the tests related to this issue will pass only for Python >= 3.6. If we _currently_ want the doctests to pass for every Python

[issue29133] Minor inaccuracy in shlex.shlex punctuation_chars example

2017-01-04 Thread Marco Buttu
Changes by Marco Buttu : -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue22417] PEP 476: verify HTTPS certificates by default

2017-01-04 Thread Christian Heimes
Christian Heimes added the comment: Carlos, you are correct. Please create a new issue and make it a documentation issue for 2.7. Thanks! -- ___ Python tracker ___ _

[issue29149] SSL.py recursion limit crash

2017-01-04 Thread Christian Heimes
Christian Heimes added the comment: It's a bug in eventlet's monkey patch, not a bug in Python's ssl module. I've seen a similar issue with gevent's monkey patch. -- resolution: -> third party ___ Python tracker

[issue17301] An in-place version of many bytearray methods is needed

2017-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > The important reasons for this are memory use and cache thrashing, not just > CPU time. Memory use is not an issue unless you translate hundreds of megabytes at a time. Cache trashing at the end is performance issue. The original patch is no longer applied

[issue17301] An in-place version of many bytearray methods is needed

2017-01-04 Thread Christian Heimes
Christian Heimes added the comment: Not every machine has hundreds of MB of memory to waste. Some devices (IoT, MicroPython, Raspberry Pi, OLPC) have limited resources. -- ___ Python tracker __

[issue17301] An in-place version of many bytearray methods is needed

2017-01-04 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue24773] Implement PEP 495 (Local Time Disambiguation)

2017-01-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5c02f689c62c by Victor Stinner in branch '3.6': Issue #24773: fix datetime.time constructor docstring https://hg.python.org/cpython/rev/5c02f689c62c -- ___ Python tracker

[issue27200] make doctest in CPython has failures

2017-01-04 Thread Marco Buttu
Marco Buttu added the comment: Thinking a little bit about it, I believe that the easiest way to proceed is to make one patch for every file or two, with the only purpose to make their doctests to pass. Otherwise if I make a patch with all the doctest directives, or just with the +SKIP options

[issue29150] Bad cast@ _mysql_ResultObject_Initialize() result in code execution

2017-01-04 Thread zeroinside
New submission from zeroinside: Hello. I found a vulnerability in _mysql module. PoC below: #!/usr/bin/python2.7 import _mysql RDX=0x payload="A"*2048 _mysql.result(payload,RDX) It's exploitable bug, I'm working on exploit. (gdb) run mysql.py Starting program: /usr/bin/python2.7 mysql.

[issue29150] Bad cast@ _mysql_ResultObject_Initialize() result in code execution

2017-01-04 Thread Christian Heimes
Christian Heimes added the comment: mysql is a 3rd party extension and not part of the Python standard library. Please report the issue with MySQL. -- nosy: +christian.heimes resolution: -> third party stage: -> resolved status: open -> closed type: security -> crash

[issue28180] sys.getfilesystemencoding() should default to utf-8

2017-01-04 Thread INADA Naoki
INADA Naoki added the comment: I'm sorry. I must search old discussion about why we can't simply use utf-8 for fsencoding when C locale, instead of asking here. -- ___ Python tracker ___

[issue24773] Implement PEP 495 (Local Time Disambiguation)

2017-01-04 Thread STINNER Victor
STINNER Victor added the comment: Two bugs were found in the implementation: issue #29100 and issue #29140. -- ___ Python tracker ___

[issue29144] Implicit namespace packages in Python 3.6

2017-01-04 Thread Tomas Orsava
Changes by Tomas Orsava : -- nosy: +torsava ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue29151] test_asyncore.TestAPI_UseIPv4Select / test_asyncore.TestAPI_UseIPv6Select fails test_handle_close_after_conn_broken

2017-01-04 Thread patrila
New submission from patrila: Dear Python developers python-2.7.12, python-3.4.5 and the current "default" branch fail the tests * test.test_asyncore.TestAPI_UseIPv4Select.test_handle_close_after_conn_broken * test.test_asyncore.TestAPI_UseIPv6Select.test_handle_close_after_conn_broken (differe

[issue17301] An in-place version of many bytearray methods is needed

2017-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Python interpreter itself takes 20-30 MB of memory. Using it on a machine that has no few tens of free memory doesn't make much sense. MicroPython can be an exception, but it has special modules for low-level programming. If you need to proceed so large byte

[issue29149] SSL.py recursion limit crash

2017-01-04 Thread R. David Murray
Changes by R. David Murray : -- stage: -> resolved status: open -> closed type: crash -> behavior ___ Python tracker ___ ___ Python-b

[issue29152] unittest subTest does not call addFailure

2017-01-04 Thread kristall
New submission from kristall: unittests subTests do not call addFailure in the case of a failure. Please see http://stackoverflow.com/questions/41432353/python3-4-unittest-addfailure-not-called-when-subtests-are-used for detailed problemdescription. -- components: Tests messages: 2846

[issue29153] Test test.test_asynchat.TestAsynchat / test.test_asynchat.TestAsynchat_WithPoll fail test_close_when_done

2017-01-04 Thread patrila
New submission from patrila: Dear Python developers The tests test.test_asynchat.TestAsynchat.test_close_when_done test.test_asynchat.TestAsynchat_WitrhPoll.test_close_when_done fail with == FAIL: test_close_when_done

[issue29153] Test test.test_asynchat.TestAsynchat / test.test_asynchat.TestAsynchat_WithPoll fail test_close_when_done

2017-01-04 Thread patrila
Changes by patrila : Added file: http://bugs.python.org/file46139/test_asynchat_add_receive_something_flag_2.7.13.patch ___ Python tracker ___ __

[issue5322] Python 2.6 object.__new__ argument calling autodetection faulty

2017-01-04 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: It worries me that nothing in the Python docs nor in any PEP describes how tp_new is inherited. In my opinion, ​this patch makes a significant change which should be subject to a PEP. However, neither the old nor new behaviour is described anywhere. This also

[issue29145] failing overflow checks in replace_*

2017-01-04 Thread jan matejek
jan matejek added the comment: It does, but "-fwrapv" is not automatically added when you specify custom OPT flags. I should have clarified that in the original report. -- ___ Python tracker __

[issue29145] failing overflow checks in replace_*

2017-01-04 Thread Xiang Zhang
Xiang Zhang added the comment: > It does, but "-fwrapv" is not automatically added when you specify custom OPT > flags. Indeed I think this is why the changes in #27473 and #1621 make sense. > GCC 6 optimizes away broken overflow checks. I am sorry but I don't understand this. What do you mea

[issue29145] failing overflow checks in replace_*

2017-01-04 Thread jan matejek
jan matejek added the comment: No, your changes from issue 27473 are OK. However functions like replace_interleave and replace_single_character etc. still use the broken code: /* use the difference between current and new, hence the "-1" */ /* result_len = self_len + count * (to_len-1) */ pr

[issue28180] sys.getfilesystemencoding() should default to utf-8

2017-01-04 Thread Nick Coghlan
Nick Coghlan added the comment: The default encoding in the C/POSIX locale is ASCII (which is the entire source of the problem). The initial verison of the PEP I uploaded didn't explain that background, but I added a section about it in the update earlier this week: https://www.python.org/dev

[issue23680] Sporadic freeze in test_interrupted_write_retry_text

2017-01-04 Thread Gerrit Holl
Gerrit Holl added the comment: I experience this problem when trying to build/test Python 3.6 on the [JASMIN Analysis Platform](http://www.jasmin.ac.uk/services/jasmin-analysis-platform/) which runs Red Hat Enterprise Linux Server release 6.8 on a machine with 48 × Intel(R) Xeon(R) CPU E7-4860

[issue29154] 5 failures in test_doctest: ModuleNotFoundError: No module named 'IPython'

2017-01-04 Thread Gerrit Holl
New submission from Gerrit Holl: I am building and testing Python 3.6 on the JASMIN Analysis Platform , which runs Red Hat Enterprise Linux Server release 6.8 on a machine with 48 × Intel(R) Xeon(R) CPU E7-4860 v2 @ 2.60GHz, 2 TiB RAM

[issue29134] contextlib doc bug

2017-01-04 Thread Kyle Altendorf
Kyle Altendorf added the comment: I would think that the idea of simply adding some reference to `User` such as was suggested with `UserDefinedContextClass` would be reasonable and helpful. This doesn't involve any more code merely a more explanatory name. -- nosy: +altendky

[issue28768] Warning: implicit declaration of function '_setmode'

2017-01-04 Thread STINNER Victor
STINNER Victor added the comment: Well, the change is not going to hurt. I backported the change. Thanks for the fix Masayuki! -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue28180] sys.getfilesystemencoding() should default to utf-8

2017-01-04 Thread STINNER Victor
STINNER Victor added the comment: > The default encoding in the C/POSIX locale is ASCII (which is the entire > source of the problem). The reality is more complex than that :-) It depends on the OS. Some OS uses Latin1 for the POSIX locale. Some OS announces to use Latin1 for the POSIX locale,

[issue28768] Warning: implicit declaration of function '_setmode'

2017-01-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5ea0fef6ec53 by Steve Dower in branch '2.7': Issue #28768: Fix implicit declaration of function _setmode. Patch by Masayuki Yamamoto https://hg.python.org/cpython/rev/5ea0fef6ec53 -- ___ Python tracker

[issue29145] failing overflow checks in replace_*

2017-01-04 Thread Xiang Zhang
Xiang Zhang added the comment: Ohh sorry I misunderstand your intention. :-( Attach a patch. :-) -- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file46141/replace-overflow-check.patch ___ Python tracker

[issue29154] 5 failures in test_doctest: ModuleNotFoundError: No module named 'IPython'

2017-01-04 Thread Gerrit Holl
Gerrit Holl added the comment: I get the same failure cause in test_pdb and test_zipimport_support, also in situations with tests based on doctest, again getting an unexpected `*** ModuleNotFoundError: No module named 'IPython'` -- ___ Python tracke

[issue29100] datetime.fromtimestamp() doesn't check min/max year anymore: regression of Python 3.6

2017-01-04 Thread STINNER Victor
STINNER Victor added the comment: timestamp_limits.patch: Add many checks in the _datetime module to avoid overflows or creating a object out of the range. The patch adds unit tests. The unit test checks dates around year 1 and year . I expect failures on platforms which only work well on

[issue29155] test.test_spwd.TestSpwdNonRoot failure with FileNotFoundError:

2017-01-04 Thread Gerrit Holl
Changes by Gerrit Holl : -- versions: +Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue29155] test.test_spwd.TestSpwdNonRoot failure with FileNotFoundError:

2017-01-04 Thread Gerrit Holl
New submission from Gerrit Holl: I am building and testing Python 3.6 on the JASMIN Analysis Platform , which runs Red Hat Enterprise Linux Server release 6.8 on a machine with 48 × Intel(R) Xeon(R) CPU E7-4860 v2 @ 2.60GHz, 2 TiB RAM

[issue29156] remove superfluous pow test for (nonexistent) long

2017-01-04 Thread Lukas Schwaighofer
New submission from Lukas Schwaighofer: Since python 3 there is no longer a type long. There is still a legacy test formerly used for longs present in test_pow.py. As the same test is already present (as also visible at the beginning of the patch) the test can safely be removed. -- co

[issue29156] remove superfluous pow test for (nonexistent) long

2017-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. Thank you for your patch Lukas. -- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka stage: -> commit review ___ Python tracker __

[issue29156] remove superfluous pow test for (nonexistent) long

2017-01-04 Thread STINNER Victor
STINNER Victor added the comment: LGTM. -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue29156] remove superfluous pow test for (nonexistent) long

2017-01-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset f159ab8a9360 by Serhiy Storchaka in branch '3.5': Issue #29156: Remove superfluous pow test. https://hg.python.org/cpython/rev/f159ab8a9360 New changeset ef3440585a17 by Serhiy Storchaka in branch '3.6': Issue #29156: Remove superfluous pow test. ht

[issue29156] remove superfluous pow test for (nonexistent) long

2017-01-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker ___

[issue29155] test.test_spwd.TestSpwdNonRoot failure with FileNotFoundError:

2017-01-04 Thread R. David Murray
R. David Murray added the comment: Since you are seeing errors on your platform that we are not seeing, and we do not have access to your platform, you are going to have to track down the cause, I'm afraid. -- nosy: +r.david.murray ___ Python tracke

[issue29155] test.test_spwd.TestSpwdNonRoot failure with FileNotFoundError:

2017-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is easy to add FileNotFoundError to the list of expected exceptions. But it seems to me that the only error that gespname() can return on Linux is EACCES. [1] May be this is a bug of your platform. [1] http://man7.org/linux/man-pages/man3/getspnam.3.html

[issue29145] failing overflow checks in replace_*

2017-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It would be better to write the code in the same form as in 3.x. This could help backporting other patches if needed. -- nosy: +serhiy.storchaka ___ Python tracker _

[issue29157] random.c: Prefer getrandom() over getentropy(), handle ENOSYS in py_getentropy()

2017-01-04 Thread STINNER Victor
New submission from STINNER Victor: A new getentropy() function was recently added to the glibc: https://sourceware.org/bugzilla/show_bug.cgi?id=17252 When the Python/random.c file was written (by me), the getentropy() function was only supported on OpenBSD. Later, random.c was modified to *not

[issue29157] random.c: Prefer getrandom() over getentropy(), handle ENOSYS in py_getentropy()

2017-01-04 Thread STINNER Victor
STINNER Victor added the comment: Python 2.7, 3.5, 3.6 and 3.7 are impacted: they should fail on Linux if compiled with a recent glibc which has getentropy(). -- ___ Python tracker

[issue29158] Possible glitch in the interaction of a thread and a multiprocessing manager

2017-01-04 Thread Luciano Dionisio
New submission from Luciano Dionisio: After spending a lot of time trying to understand why my code will not execute as expected and after not getting any help from StackOverflow: http://stackoverflow.com/questions/41444081/python-multiprocessing-manager-delegate-client-connection-and-dont-wait

[issue29158] Possible glitch in the interaction of a thread and a multiprocessing manager

2017-01-04 Thread R. David Murray
R. David Murray added the comment: My understanding is that the basic rule of thumb is: don't mix threads and multiprocessing. You may find that if you use spawn, it won't ever work. But I haven't used multiprocessing myself. -- nosy: +r.david.murray type: crash -> behavior

[issue29159] Regression in bytes constructor

2017-01-04 Thread Alexander Belopolsky
New submission from Alexander Belopolsky: Consider the following code: $ cat bug.py from array import array class C(array): def __new__(cls): return array.__new__(cls, 'B', b'abc') def __index__(self): raise TypeError x = C() print(bytes(x)) It works under python 3.5: $

[issue29159] Regression in bytes constructor

2017-01-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: My test code may seem contrived, but numpy arrays exhibit similar behavior: >>> a = numpy.array([2, 2]) >>> bytes(a) Traceback (most recent call last): File "", line 1, in TypeError: only integer arrays with one element can be converted to an index Und

[issue29159] Regression in bytes constructor

2017-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Indeed, there is behavior change. It is easy to revert the old behavior. But was the old behavior designed? It looks as a side effect of the implementation. What is a reason of making an array an integer type? --

[issue29159] Regression in bytes constructor

2017-01-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +inada.naoki ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue29159] Regression in bytes constructor

2017-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, if numpy arrays are affected, this should be restored. But swallowing an arbitrary exception doesn't look good to me. -- ___ Python tracker _

[issue26851] android compilation and link flags

2017-01-04 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- versions: +Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue26851] android compilation and link flags

2017-01-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset fa2bc63e64c6 by Xavier de Gaye in branch '3.6': Issue #26851: Set Android compilation and link flags. https://hg.python.org/cpython/rev/fa2bc63e64c6 New changeset af363b5200ff by Xavier de Gaye in branch 'default': Issue #26851: Merge 3.6. https://h

[issue26851] android compilation and link flags

2017-01-04 Thread Xavier de Gaye
Xavier de Gaye added the comment: Latest patch committed with the following simplification: BASECFLAGS and LDFLAGS are now set for armv7 at the same place, as suggested by Martin in msg271518. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue29070] Integration tests for pty.spawn on Linux and all other platforms

2017-01-04 Thread Martin Panter
Martin Panter added the comment: Hi Cornelius and thanks for the work. Since the patch adds a significant amount of code, I think you might have to sign the contributor agreement: . You can do it in a web browser. I would like to review your te

[issue29070] Integration tests for pty.spawn on Linux and all other platforms

2017-01-04 Thread Martin Panter
Martin Panter added the comment: Ignore my comment about contrib agreement, that must have come through recently :) -- ___ Python tracker ___ ___

[issue29159] Regression in bytes constructor

2017-01-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I don't think we should put too much effort into preserving numpy behavior. Consider this python 3.5 session: >>> import numpy >>> a = numpy.array([1]) >>> bytes(a) __main__:1: VisibleDeprecationWarning: converting an array with ndim > 0 to an index wil

[issue29159] Regression in bytes constructor

2017-01-04 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue29159] Regression in bytes constructor

2017-01-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Also relevant: * #20895 - Add bytes.empty_buffer and deprecate bytes(17) for the same purpose * PEP 467 - Minor API improvements for binary sequences -- ___ Python tracker

[issue29021] Custom functions in sqlite receive None on invalid UTF-8

2017-01-04 Thread Aviv Palivoda
Aviv Palivoda added the comment: The problem is in _pysqlite_build_py_params function at connection.c. In case we have text we do the following code: case SQLITE_TEXT: val_str = (const char*)sqlite3_value_text(cur_value); cur_py_value = PyUnicode_FromString(val_str); /* TODO:

[issue29158] Possible glitch in the interaction of a thread and a multiprocessing manager

2017-01-04 Thread Davin Potts
Davin Potts added the comment: There are too many things going on in this example -- it would be far easier to digest if the example could be simplified. The general programming rule of thumb (completely unrelated to but still just as relevant to Python) that I think David might have been invo

[issue29160] `pow` with three int arguments works like it had two arguments

2017-01-04 Thread Pavel Chuvakhov
New submission from Pavel Chuvakhov: Standard `pow` function of three integer arguments should result in a reminder `(x**y) % z`. It seems that `pow(x,y,z)` ignores `%z` operation if type(z) is not `int`. This happens also in the cases when `z` has type numpy.int32, numpy.int64, etc. I conside

[issue29160] `pow` with three int arguments works like it had two arguments

2017-01-04 Thread Benjamin Pollak
Benjamin Pollak added the comment: I tried running your script, but it crashes on the last two lines (variables n2 and n1 appear to be undefined). Could you please update that script so we can have a better idea of the behavior of your bug? Thanks, BP -- nosy: +Benjamin Pollak __

[issue29160] pow with three int arguments works like it had two arguments

2017-01-04 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- components: +Interpreter Core -Distutils title: `pow` with three int arguments works like it had two arguments -> pow with three int arguments works like it had two arguments ___ Python tracker

[issue29023] Results of random.seed() call with integer argument should be claimed deterministic.

2017-01-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: The wording can perhaps be made more precise. However, this needs to be the end of this series of tracker items which are turning into time wasters. -- assignee: docs@python -> rhettinger nosy: +rhettinger priority: normal -> low __

[issue29161] random.SystemRandom(seed) documentation issue

2017-01-04 Thread Gary E. Miller
New submission from Gary E. Miller: The man page for random.SystemRandom([seed]]) fails to mention that the parameter 'seed' is never used. This should be prominent in the documentation. I have found several cases where a seed was provided to SystemRandom(). https://docs.python.org/2.7/libra

[issue29160] pow with three int arguments works like it had two arguments

2017-01-04 Thread Case Van Horsen
Case Van Horsen added the comment: This is a bug/limitation in numpy. If x and y are Python integers, and type(z) is of another numeric type, pow calls the nb_power slot of the underlying type. Here a quick example using numpy.int32 and gmpy2.mpz: >>> import numpy, gmpy2 >>> pow(11,13,7) 4 >>>

[issue29161] random.SystemRandom(seed) documentation issue

2017-01-04 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29161] random.SystemRandom(seed) documentation issue

2017-01-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: >From the docs at >https://docs.python.org/3/library/random.html#alternative-generator : """ class random.SystemRandom([seed]) Class that uses the os.urandom() function for generating random numbers from sources provided by the operating system. Not availab

[issue29159] Regression in bytes constructor

2017-01-04 Thread INADA Naoki
Changes by INADA Naoki : -- keywords: +patch Added file: http://bugs.python.org/file46147/29159-index-fallback.patch ___ Python tracker ___ __

[issue29161] random.SystemRandom(seed) documentation issue

2017-01-04 Thread Gary E. Miller
Gary E. Miller added the comment: I would change: "Accordingly, the seed() method has no effect and is ignored." To: "Accordingly, the optional seed parameter and the seed() method have no effect and are ignored." It was not obvious to me that the seed paramrter got passed to the seed() met

[issue29148] Inheritance behaviour ambiguos

2017-01-04 Thread Berker Peksag
Berker Peksag added the comment: You may find Raymond Hettinger's "super() considered super" article helpful to understand how Python's super() works: https://rhettinger.wordpress.com/2011/05/26/super-considered-super/ -- nosy: +berker.peksag ___ Py

[issue29161] random.SystemRandom(seed) documentation issue

2017-01-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: > why have an ignored parameter that is not plainly documented as ignored. Because it improves the substitutability of one RNG for another (i.e. the same reason that we even have a seed() method). -- priority: normal -> low resolution: -> not a bug

[issue29162] pyshell.py: name 'sys' is not defined

2017-01-04 Thread OO O
New submission from OO O: Sorry for my bad English. line 7, 13 at pyshell.py. Call sys befor import sys. Cause name 'sys' is not defined -- assignee: terry.reedy components: IDLE messages: 284684 nosy: OO O, terry.reedy priority: normal severity: normal status: open title: pyshell.py: n

[issue29163] shlex error in posix mode and empty quotes

2017-01-04 Thread Michal Ostrowski
Changes by Michal Ostrowski : -- components: +Library (Lib) type: -> behavior versions: +Python 2.7, Python 3.4 ___ Python tracker ___ __

[issue29163] shlex error in posix mode and empty quotes

2017-01-04 Thread Michal Ostrowski
New submission from Michal Ostrowski: Three examples below. I believe the second is wrong, because it reorders the "echo" and "," tokens. >>> list(shlex.shlex('echo b="a",echo bar', posix=True)) ['echo', 'b', '=', 'a', ',', 'echo', 'bar'] >>> list(shlex.shlex('echo b="",echo bar', posix=True))

[issue29157] random.c: Prefer getrandom() over getentropy(), handle ENOSYS in py_getentropy()

2017-01-04 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue29161] random.SystemRandom(seed) documentation issue

2017-01-04 Thread Gary E. Miller
Gary E. Miller added the comment: > > why have an ignored parameter that is not plainly documented as ignored. > Because it improves the substitutability of one RNG for another (i.e. the > same reason that we even have a seed() method). I understand why it the parameter it there. I think the

[issue29161] random.SystemRandom(seed) documentation issue

2017-01-04 Thread Gary E. Miller
Gary E. Miller added the comment: Is there a better place to submit documentation problems to? After my programming team spends a lot of valuable time figuring what the Python doc failed to mention I would like this knowledge to be put to good use by others. Paying it forward if you will. -

[issue29157] random.c: Prefer getrandom() over getentropy(), handle ENOSYS in py_getentropy()

2017-01-04 Thread Nick Coghlan
Nick Coghlan added the comment: Aside from a couple of outdated comments and the EPERM question, the attached patch looks good to me. Regarding EPERM, I think it would make sense to make py_getrandom and py_getentropy handle that consistently, otherwise I can see future maintainers readily ge

[issue29159] Regression in bytes constructor

2017-01-04 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Inada, Can you explain what your patch does? I don't understand why you single out the OverflowError. When is __index__ expected to raise it? >>> (2**300).__index__() 2037035976334486086268445688409378161051468393665936250636140449354381299763336706183

[issue29161] random.SystemRandom(seed) documentation issue

2017-01-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thank you for the submission. I respect what you're trying to do, but disagree that there is any issue here. The docs are clear that System Random uses os.urandom() for creating random numbers, that there is not state, that sequences aren't reproducible,

[issue29152] unittest subTest does not call addFailure

2017-01-04 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report. That's because TestResult.addSubTest() updates TestResult.errors and TestResult.failures itself instead of calling the addError() and addFailure() methods respectively: if issubclass(err[0], test.failureException): errors = se

[issue29164] make test always fail at 218/405 ( AssertionError: ', ' not found in '1234.5' )

2017-01-04 Thread OO O
New submission from OO O: make test always fail at 218/405 at test_format.py line 426 message: [218/405/1] test test_format failed -- Traceback (most recent call last): File "/home/vm00/Downloads/Python-3.6.0/Lib/test/test_format.py", line 426, in test_locale self.assertIn(sep, text) Ass

[issue29161] random.SystemRandom(seed) documentation issue

2017-01-04 Thread Gary E. Miller
Gary E. Miller added the comment: > The docs are clear that System Random uses os.urandom() for creating random > numbers, that there is not state, that sequences aren't reproducible, and > that seed method has no effect and is ignored. Agreed, but not relevant. I have anecdotal proof that t

[issue29160] pow with three int arguments works like it had two arguments

2017-01-04 Thread Pavel Chuvakhov
Pavel Chuvakhov added the comment: Sorry about script, n1 should be n, and n2 should be m. Updated script is attached. Ofc mpz is a way out. One also could cast int( np.int32 ) explicitly. I just wanted to underline that the best way is to hide all this stuff from a user and not make the user

[issue29162] pyshell.py: name 'sys' is not defined

2017-01-04 Thread Milan Oberkirch
Milan Oberkirch added the comment: pyshell.py is not part of CPython, this is the wrong place to report a bug like this. -- nosy: +zvyn ___ Python tracker ___ __

[issue29162] pyshell.py: name 'sys' is not defined

2017-01-04 Thread Berker Peksag
Berker Peksag added the comment: I think the OP is talking about Lib/idlelib/pyshell.py. The relevant changeset is 76f831e4b806. "from tkinter import *" imports the sys module as a side-effect. OO O, did you notice this by reading the code or by using a tool like flake8? -- nosy: +ber

[issue28180] sys.getfilesystemencoding() should default to utf-8

2017-01-04 Thread INADA Naoki
INADA Naoki added the comment: On Linux, I think most people wants UTF-8:surrogateescape by default, without fighting against locale and environment variables. There are already `#if defined(__APPLE__) || defined(__ANDROID__)` path for it. How about adding configure option to use same logic? (s

[issue29162] pyshell.py: name 'sys' is not defined

2017-01-04 Thread OO O
OO O added the comment: to msg284696 - (view): OK~ Sorry I found i forget to install tkinter before I run make. so the "from tkinter import *" failed. ( sys not import ). -- status: open -> closed ___ Python tracker

[issue29159] Regression in bytes constructor

2017-01-04 Thread INADA Naoki
INADA Naoki added the comment: @belopolsky It is backported behavior from Python 3.5, to fix regression. See code review discussion in #27704. The first patch kept the behavior, but we simplified it in second patch. That cause this regression. -- ___

[issue29021] Custom functions in sqlite receive None on invalid UTF-8

2017-01-04 Thread Berker Peksag
Berker Peksag added the comment: We can just fallback to the current behavior (i.e. return None) if the return type of text_factory(val_str) is not str, bytes or bytearray. I think this is also somewhat similar to what we do for the return values of sqlite3_column_text(). -- nosy: +be

[issue29162] pyshell.py: name 'sys' is not defined

2017-01-04 Thread Berker Peksag
Berker Peksag added the comment: Great, thanks for following up with us. -- resolution: -> not a bug stage: -> resolved ___ Python tracker ___ _

[issue29142] urllib: no_proxy variable values with leading dot not properly handled

2017-01-04 Thread Milan Oberkirch
Milan Oberkirch added the comment: I added a line stripping dots from name, I think it makes sense to strip at the end as well (`example.com` is the same domain as `example.com.`). -- nosy: +zvyn pull_requests: +8 ___ Python tracker

[issue29162] pyshell.py: name 'sys' is not defined

2017-01-04 Thread Berker Peksag
Berker Peksag added the comment: I misread your comment. I think we need to add "import sys" to that file so I'm reopening this. -- keywords: +easy resolution: not a bug -> stage: resolved -> needs patch status: closed -> open versions: +Python 3.7

[issue29162] pyshell.py: name 'sys' is not defined

2017-01-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 52d671684342 by Terry Jan Reedy in branch '3.6': Issue #29162: Don't depend on 'from tkinter import *' importing sys. https://hg.python.org/cpython/rev/52d671684342 -- nosy: +python-dev ___ Python tracker

  1   2   >