[issue29114] __class__ not exists in the method which bounded by types.MethodType.

2016-12-29 Thread Xiang Zhang
Xiang Zhang added the comment: You can't do it like this. The document explicitly states it only works inside a class definition: "Also note that, aside from the zero argument form, super() is not limited to use inside methods. The two argument form specifies the arguments exactly and makes

[issue29108] Python 3.6.0 multiprocessing map_async callback

2016-12-29 Thread Jose Miguel Colella
Jose Miguel Colella added the comment: Hello David, Thanks for your response. Improvements to the documentation could clear this misunderstanding. I had initially believed that after transforming with the function passed to the map, it would use the callback on each of the result arguments.

[issue29103] Make enum.py pep8 compliant

2016-12-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset bf6987b93358 by Raymond Hettinger in branch '3.6': Issue #29103: Remove unused import. Noticed by Jean-Sebastien Bevilacqua. https://hg.python.org/cpython/rev/bf6987b93358 -- nosy: +python-dev ___

[issue29099] sqlite3 timestamp converter cannot handle timezone

2016-12-29 Thread Xiang Zhang
Xiang Zhang added the comment: LGTM generally. :-) -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue29103] Make enum.py pep8 compliant

2016-12-29 Thread Jean-Sebastien Bevilacqua
Jean-Sebastien Bevilacqua added the comment: Hello Raymond Hettinger, Thanks for your advice and your comment. I agree with you that pep8 compliant isn't useful. If you look at my patch, the first change is a unused import, not just a text formatting. Maybe this first change can be useful ?

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2016-12-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka stage: -> patch review versions: -Python 3.3, Python 3.4 ___ Python tracker

[issue28612] str.translate needs a mapping example

2016-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If the side effect of defaultdict is unpleasant, the correct way is combining the translation mapping with the custom mapping by ChainMap. But this example is too complex for the documentation of str.translate(). On other side, it is trivial for more

[issue29061] secrets.randbelow(-1) hangs

2016-12-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the bug report and for the patch. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue29061] secrets.randbelow(-1) hangs

2016-12-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0509844f38df by Raymond Hettinger in branch '3.6': Issue #29061: secrets.randbelow() would hang with a negative input https://hg.python.org/cpython/rev/0509844f38df -- nosy: +python-dev ___ Python

[issue29114] __class__ not exists in the method which bounded by types.MethodType.

2016-12-29 Thread lanf0n
New submission from lanf0n: test code below: ```python >>> from types import MethodType >>> class A: ... def f(self): ... print(__class__) ... >>> a = A() >>> a.fn = MethodType(lambda s: print(__class__), a) >>> >>> a.f() >>> a.fn() Traceback (most recent call last): File "", line 1,

[issue29111] Strange signature for memoryview constructor

2016-12-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Interpreter Core -Library (Lib) nosy: +larry, skrah, yselivanov type: -> behavior versions: +Python 3.6, Python 3.7 ___ Python tracker

[issue29061] secrets.randbelow(-1) hangs

2016-12-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: _randbelow is a private api and it is not broken, it is just being misused by the secrets module. All of the other calls to it are already range checked and it would be inefficient and unnecessary to repeat this the check. Brendan, thank you for the

[issue29020] collapse_rfc2231_value has inconsistent unquoting

2016-12-29 Thread Eric Lafontaine
Eric Lafontaine added the comment: Hi all, The fix is already provided in issue28945 . Please review it and I would like to flag it as needing more test on more version of python... The patch would just require more Test Case that would check for the filename for preventing re-occurence in

[issue29089] dictionary keys described incorrectly in tutorial

2016-12-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm going to concur with the other respondents on this. As a Python teacher, this is how I teach what should be used as a dictionary key. While immutability and hashability aren't equivalent, it is a good first approximation. Also, even though it is true

[issue28612] str.translate needs a mapping example

2016-12-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: I like the idea of adding a mapping example but don't want to encourage use of defaultdict in contexts like this one. A defaultdict usefully specifies a default but has the unpleasant side-effect of altering the dictionary (adding new keys) during the

[issue29103] Make enum.py pep8 compliant

2016-12-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: I really don't like how this patch is done or even the spirit of it. To my eyes, some of the code looks worse (especially the addition of trailing backslashes and some odd line-wraps that aren't sensitive to readability or context). I'm going to close

[issue29112] questionable wording in sequences documentation

2016-12-29 Thread Xiang Zhang
Xiang Zhang added the comment: Thanks for your report Jesse. Now fixed. -- nosy: +xiang.zhang resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 2.7, Python 3.5, Python 3.7 ___ Python tracker

[issue29112] questionable wording in sequences documentation

2016-12-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0d20da97a6a0 by Xiang Zhang in branch '2.7': Issue #29112: Fix a questionable wording in sequence doc. https://hg.python.org/cpython/rev/0d20da97a6a0 New changeset f4b747f59804 by Xiang Zhang in branch '3.5': Issue #29112: Fix a questionable

[issue29113] modulefinder no longer finds all required modules for Python itself, due to use of __import__ in sysconfig

2016-12-29 Thread Ned Deily
Changes by Ned Deily : -- nosy: +doko versions: +Python 3.7 ___ Python tracker ___ ___

[issue29108] Python 3.6.0 multiprocessing map_async callback

2016-12-29 Thread Davin Potts
Davin Potts added the comment: This appears to be working as designed. The purpose of the callback is to receive a single argument (nominally, the ready result from the map operation) and perform its task (whatever it may be) very quickly so as not to further delay the handing back of

[issue29113] modulefinder no longer finds all required modules for Python itself, due to use of __import__ in sysconfig

2016-12-29 Thread Adam Williamson
New submission from Adam Williamson: I'm not sure if this is really considered a bug or just an unavoidable limitation, but as it involves part of the stdlib operating on Python itself, I figured it was at least worth reporting. In Fedora we have a fairly simple little script called

[issue29112] questionable wording in sequences documentation

2016-12-29 Thread Jesse Hall
New submission from Jesse Hall: In note 3 of 4.6.1, the word "string" should be replaced with "sequence", because the note is describing a general example where this concept is not specifically used with a string type sequence, it is discussing the general use of negative indexes which can be

[issue29111] Strange signature for memoryview constructor

2016-12-29 Thread Antony Lee
New submission from Antony Lee: The return value of `inspect.signature(memoryview)` is rather strange: Python 3.5.2 (default, Nov 7 2016, 11:31:36) [GCC 6.2.1 20160830] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import inspect;

[issue29020] collapse_rfc2231_value has inconsistent unquoting

2016-12-29 Thread Eric Lafontaine
Changes by Eric Lafontaine : -- nosy: +Eric Lafontaine ___ Python tracker ___ ___

[issue29109] Small doc improvements for tracemalloc

2016-12-29 Thread STINNER Victor
STINNER Victor added the comment: Thank you for your contribution! I applied your patch to Python 3.5, 3.6 and default (future 3.7). You should consider signing the PSF Contributor Agreement: https://www.python.org/psf/contrib/contrib-form/ "While you retain the copyright, giving the PSF the

[issue29109] Small doc improvements for tracemalloc

2016-12-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 192e0ae17236 by Victor Stinner in branch '3.5': Issue #29109: Enhance tracemalloc documentation https://hg.python.org/cpython/rev/192e0ae17236 -- nosy: +python-dev ___ Python tracker

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2016-12-29 Thread Anthony Zhang
Changes by Anthony Zhang : Added file: http://bugs.python.org/file46088/fix_aifc_leak_and_file_object_close.patch ___ Python tracker ___

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2016-12-29 Thread Anthony Zhang
New submission from Anthony Zhang: Summary --- This shows up as two closely-related issues: * ``aifc.open`` leaks file object when invalid AIFF file encountered. This is probably a bug. * ``aifc.close`` closes file object even when it didn't open the file object to begin with. While this

[issue29109] Small doc improvements for tracemalloc

2016-12-29 Thread Loic Pefferkorn
New submission from Loic Pefferkorn: Hello, I believe that some improvements can be made to the Python 3.4 documentation of the tracemalloc module: * Wrong parameter name, 'group_by' instead of 'key_type' (checked in tracemalloc.py) * Don't round up numbers when explaining the examples. If

[issue27867] various issues due to misuse of PySlice_GetIndicesEx

2016-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Renamed _PySlice_EvalIndices() to _PySlice_AdjustIndices() and changed its signature. Updated the documentation and python3.def. Fixed yet one bug: implementation-defined behavior with division by negative step. Note that since new functions are used in

[issue29108] Python 3.6.0 multiprocessing map_async callback

2016-12-29 Thread Ned Deily
Changes by Ned Deily : -- nosy: +davin ___ Python tracker ___ ___ Python-bugs-list mailing

[issue29108] Python 3.6.0 multiprocessing map_async callback

2016-12-29 Thread Jose Miguel Colella
Jose Miguel Colella added the comment: The result is: Here: [1, 4, 9] [1, 4, 9] -- ___ Python tracker ___ ___

[issue29108] Python 3.6.0 multiprocessing map_async callback

2016-12-29 Thread Jose Miguel Colella
New submission from Jose Miguel Colella: Hello I am trying to use the callback for the map_async method for Pool, but have found a bug. In the below code, only the print statement is carried out, the return is completely ignored. Is this working as designed or is this a bug? from

[issue28945] get_boundary (and get_filename) invokes unquote twice

2016-12-29 Thread bpoaugust
bpoaugust added the comment: This is actually a bug in collapse_rfc2231_value: issue29020 -- ___ Python tracker ___

[issue29020] collapse_rfc2231_value has inconsistent unquoting

2016-12-29 Thread bpoaugust
bpoaugust added the comment: I have just checked and AFAICT collapse_rfc2231_value is only called by get_filename and get_boundary in message.py. Both of these call get_param and default to unquote=True. So in all cases the parameter value passed to collapse_rfc2231_value will already have

[issue29053] Implement >From_ decoding on input from mbox

2016-12-29 Thread bpoaugust
Changes by bpoaugust : -- versions: +Python 3.5 -Python 3.7 ___ Python tracker ___ ___

[issue27867] various issues due to misuse of PySlice_GetIndicesEx

2016-12-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka versions: +Python 2.7, Python 3.7 ___ Python tracker ___

[issue29028] Use-After-Free in PyString_FromStringAndSize() of stringobject.c

2016-12-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue29028] Use-After-Free in PyString_FromStringAndSize() of stringobject.c

2016-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There a problem with PySlice_GetIndicesEx() (see issue27867). Buffer length shouldn't be evaluated before PySlice_GetIndicesEx() since it can call user code that can change buffer length. This issue can't be solved without first solving issue27867.

[issue29028] Use-After-Free in PyString_FromStringAndSize() of stringobject.c

2016-12-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue29099] sqlite3 timestamp converter cannot handle timezone

2016-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In general the patch LGTM. Added comments on Rietveld. -- ___ Python tracker ___

[issue29102] Add an id field to PyInterpreterState.

2016-12-29 Thread Eric Snow
Eric Snow added the comment: Interpreter states are in a linked list, so you can traverse the list to find one by ID. Exactly. At first I had added a PyInterpreterState_FindByID() or something like that. However, as you noted, I realized it wasn't necessary. :) WRT weakrefs, we can't use

[issue29028] Use-After-Free in PyString_FromStringAndSize() of stringobject.c

2016-12-29 Thread Ammar Askar
Ammar Askar added the comment: Updated patch based on Rietveld review -- Added file: http://bugs.python.org/file46083/buffer-use-after-free-fix.patch2 ___ Python tracker

[issue26631] Unable to install Python 3.5.1 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2016-12-29 Thread Skye
Skye added the comment: The problem is gone. Thank you, for all your work! -- ___ Python tracker ___ ___

[issue29107] traceback module incorrectly formats args-less syntax errors

2016-12-29 Thread Naftali Harris
New submission from Naftali Harris: The traceback documentation states that it "exactly mimics the behavior of the Python interpreter when it prints a stack trace." Here's a small case where it doesn't, on 2.7.13: ~/repos/Python-2.7.13$ cat example.py def f(x): global x

[issue29099] sqlite3 timestamp converter cannot handle timezone

2016-12-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: test needed -> patch review Added file: http://bugs.python.org/file46082/sqlite3-2.patch ___ Python tracker

[issue29097] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6

2016-12-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I think we should just clip the negative lower probe value to 0 on Windows before passing it to local(). Also, if we still care about platforms with 32-bit time_t, we should check for over/under flow *before* calling local(). --

[issue29033] Windows Python installer rolls back when run under SYSTEM account (SCCM)

2016-12-29 Thread Steve Dower
Steve Dower added the comment: Does SCCM support dependency provider keys? If so, Python 3.6.0 and 3.5.3 and later will set one of these (see issue28846), which should make it easier to detect the whole bundle. Previous versions of 3.5 used a random GUID here. I managed to reproduce the issue

[issue29099] sqlite3 timestamp converter cannot handle timezone

2016-12-29 Thread Bozo Kopic
Changes by Bozo Kopic : Added file: http://bugs.python.org/file46081/sqlite3-2.patch ___ Python tracker ___

[issue29099] sqlite3 timestamp converter cannot handle timezone

2016-12-29 Thread Bozo Kopic
Changes by Bozo Kopic : Removed file: http://bugs.python.org/file46075/sqlite3-2.patch ___ Python tracker ___

[issue29095] Compiling Python 3.6 from source on MacOS X Sierra

2016-12-29 Thread Walter Dörwald
Walter Dörwald added the comment: OK, with the fixed CFLAGS definition I do indeed get a working ssl module. I wonder whether the link Ned posted should be put into the README file. Anyway I think the issue can be closed. Thanks for the help! --

[issue29102] Add an id field to PyInterpreterState.

2016-12-29 Thread Steve Dower
Steve Dower added the comment: That's an issue with TLS initialisation, not thread IDs. It's easily solved by defining an "uninitialized" value (e.g. 0) and an "invalid" value (e.g. -1). Interpreter states are in a linked list, so you can traverse the list to find one by ID. WRT weakrefs, we

[issue29106] get-pip.py fails with Python 3.6 embed Windows

2016-12-29 Thread Ammar Askar
Ammar Askar added the comment: Please post this issue on pypa's get-pip issue tracker https://github.com/pypa/get-pip -- nosy: +ammar2 resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue29097] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6

2016-12-29 Thread Ammar Askar
Ammar Askar added the comment: I just ran the following script to check if there are any folds from timestamps [0, 86399] in any timezone. import datetime import pytz for tz in pytz.all_timezones: tz = pytz.timezone(tz) for i in range(86400): if

[issue29102] Add an id field to PyInterpreterState.

2016-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is an issue with integer identifiers of threads. See issue25658 and https://mail.python.org/pipermail/python-ideas/2016-December/043983.html. -- ___ Python tracker

[issue29106] get-pip.py fails with Python 3.6 embed Windows

2016-12-29 Thread Szabolcs Dombi
New submission from Szabolcs Dombi: Downloaded python 3.6 embedable zip file (windows 32 bit) Downloaded get-pip.py from the following URL: https://pip.pypa.io/en/stable/installing/ This is the traceback: Traceback (most recent call last): File "get-pip.py", line 20061, in main()

[issue29102] Add an id field to PyInterpreterState.

2016-12-29 Thread Eric Snow
Eric Snow added the comment: Three reasons come to mind: 1. threads are identified by small integers 2. long, random-looking IDs are not human-friendly, and subinterpreter IDs will be used like thread IDs are 3. related to what Steve said, temporally unique IDs allow us to be confident about

[issue29105] code or doc improvement for logging.handlers.RotatingFileHandler

2016-12-29 Thread iMath
New submission from iMath: For class logging.handlers.RotatingFileHandler(filename, mode='a', maxBytes=0, backupCount=0, encoding=None, delay=0) if backupCount is zero and maxBytes is non-zero, the log file size could exceed maxBytes, i.e. we are not able to restrict the log file size using

[issue29102] Add an id field to PyInterpreterState.

2016-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If add an API for getting an unique ID of the interpreter state, is it needed to add an API for getting the interpreter state by ID? -- ___ Python tracker

[issue5215] change value of local variable in debug

2016-12-29 Thread Андрей Бодров
Андрей Бодров added the comment: I still can reproduce this bug, is that intended behavior? 1 def func(): 2 import pdb; pdb.set_trace() 3 x = 0 4 y = 0 5 z = 0 6 7 if __name__ == "__main__": 8 func() > /test.py(3)func() -> x = 0 (Pdb) n

[issue29095] Compiling Python 3.6 from source on MacOS X Sierra

2016-12-29 Thread Ned Deily
Ned Deily added the comment: See the Developers Guide for more information on build dependencies and recommended ways to satisfy OpenSSL dependencies: http://cpython-devguide.readthedocs.io/en/latest/setup.html#build-dependencies -- nosy: +ned.deily resolution: -> not a bug stage:

[issue29102] Add an id field to PyInterpreterState.

2016-12-29 Thread Steve Dower
Steve Dower added the comment: Tracking purposes mainly, so someone outside the interpreter state can tell when it's no longer there. Making interpreter states weak-referencable would have a similar effect, and could very well use this id if we didn't need the callback. --

[issue29097] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6

2016-12-29 Thread Ammar Askar
Ammar Askar added the comment: The 86,399 upperbound comes from this line (max_fold_seconds=86400): https://github.com/python/cpython/blob/master/Modules/_datetimemodule.c#L4277-L4278 The bug is introduced as part of the fold detection in this commit:

[issue29104] Left bracket remains in format string result when '\' preceeds it

2016-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch fixes parsing backslashes in f-strings. P.S. Definitely we should find other name for this term. I hate misleading "f-string". -- keywords: +patch Added file: http://bugs.python.org/file46080/fstring_backslash.patch

[issue29003] sqlite3: can't run VACUUM on Python 3.6

2016-12-29 Thread Berker Peksag
Berker Peksag added the comment: Thanks for trying pre-release versions of Python 3.6, Ma Lin. This has already been reported in issue 28518 so I'm closing this as a duplicate. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> execute("begin

[issue29097] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6

2016-12-29 Thread R. David Murray
R. David Murray added the comment: Sounds like it really is an OSError (that is, that the Windows OS is the source of the error). Whether or not we can or should do something about that is a separate question, though. -- nosy: +r.david.murray ___

[issue28518] execute("begin immediate") throwing OperationalError

2016-12-29 Thread Aviv Palivoda
Aviv Palivoda added the comment: Issue #29003 seems to be related to this one. I think that they can be solved the same way as done in Serhiy patch but I would like to suggest a different approach. I suggest changing the check for DDL statement with a check for DML statement. We actually

[issue29103] Make enum.py pep8 compliant

2016-12-29 Thread R. David Murray
R. David Murray added the comment: In general we do not accept PEP8 patches; it is code churn with insufficient benefit since many modules in the stdlib predate either PEP8 itself or the current version of PEP8. However, enum is a new enough module that I suppose this might get accepted. In

[issue29104] Left bracket remains in format string result when '\' preceeds it

2016-12-29 Thread Eric V. Smith
Eric V. Smith added the comment: This problem was no doubt introduced after 3.6a1 when I changed the parsing to disallow backslashes inside {}. -- ___ Python tracker

[issue29097] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6

2016-12-29 Thread SilentGhost
SilentGhost added the comment: Cannot reproduce this with the tip on linux -- ___ Python tracker ___ ___

[issue29097] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6

2016-12-29 Thread SilentGhost
Changes by SilentGhost : -- components: +Windows nosy: +belopolsky, paul.moore, steve.dower, tim.golden, zach.ware stage: -> needs patch type: -> behavior ___ Python tracker

[issue29097] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6

2016-12-29 Thread Ammar Askar
Ammar Askar added the comment: Can recreate successfully on windows, but not on linux: > C:\Python36\python.exe -c "import datetime; > datetime.datetime.fromtimestamp(42)" Traceback (most recent call last): File "", line 1, in OSError: [Errno 22] Invalid argument > C:\Python36\python.exe

[issue29095] Compiling Python 3.6 from source on MacOS X Sierra

2016-12-29 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Change this line: export CFLAGS="-I/usr/local/Cellar/openssl/1.0.2j/include/openssl" into: export CFLAGS="-I/usr/local/Cellar/openssl/1.0.2j/include" -- ___ Python tracker

[issue29104] Left bracket remains in format string result when '\' preceeds it

2016-12-29 Thread Eric V. Smith
Eric V. Smith added the comment: Yes: >>> f'\{2*5}' '\\{10' I agree '\\10' would make sense. -- ___ Python tracker ___

[issue29104] Left bracket remains in format string result when '\' preceeds it

2016-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The problem is not that the trailing } is dropped, but that the starting { starts an f-string expression. >>> f'\{2*5}' '\\{10' I expected either '\\10' as in '\{}'.format(2*5), or at least '\\{2*5}'. There is other f-string parsing error: >>> f'\\N{2*5}'

[issue29104] Left bracket remains in format string result when '\' preceeds it

2016-12-29 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Yes, should've attached in my previous message. See http://stackoverflow.com/questions/41330097/why-does-the-symbol-remain-when-f-10-is-evaluated-in-python-3-6 -- ___ Python tracker

[issue29104] Left bracket remains in format string result when '\' preceeds it

2016-12-29 Thread Eric V. Smith
Eric V. Smith added the comment: Do you have a link to the SO question? -- ___ Python tracker ___ ___

[issue29104] Left bracket remains in format string result when '\' preceeds it

2016-12-29 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: I see, the original "complaint" about this behavior on stack overflow was made due to the discrepancy between the f-string the the format "equivalent": '\{}'.format(10)'. -- ___ Python tracker

[issue29104] Left bracket remains in format string result when '\' preceeds it

2016-12-29 Thread Eric V. Smith
Eric V. Smith added the comment: But I admit that dropping the trailing } seems odd. I think this particular usage should be an error: no bare } allowed, similar to: >>> f'10}' File "", line 1 SyntaxError: f-string: single '}' is not allowed --

[issue29104] Left bracket remains in format string result when '\' preceeds it

2016-12-29 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not sure this counts as an error. The backslash means to treat the next character literally, which this does. And since \{ is not a valid escape sequence, it keeps both characters, exactly like: >>> '\c' '\\c' Furthermore, since unknown escape sequences

[issue28978] a redundant right parentheses in the EBNF rules of parameter_list

2016-12-29 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Further patch for 3.6 and 3.7 to address `defparameter` change here too. -- Added file: http://bugs.python.org/file46078/3.6_3.7_func_def.patch ___ Python tracker

[issue28978] a redundant right parentheses in the EBNF rules of parameter_list

2016-12-29 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Further patch for `3.4` and `3.5`: Change `|` to `(` and fix `defparameter` to use `+` -- Added file: http://bugs.python.org/file46077/3.4_3.5_func_def.patch ___ Python tracker

[issue28978] a redundant right parentheses in the EBNF rules of parameter_list

2016-12-29 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Attached patche for Python 3.3 (change `defparameter` to use `+`). -- keywords: +patch Added file: http://bugs.python.org/file46076/3.3_func_def.patch ___ Python tracker

[issue29099] sqlite3 timestamp converter cannot handle timezone

2016-12-29 Thread Bozo Kopic
Changes by Bozo Kopic : Added file: http://bugs.python.org/file46075/sqlite3-2.patch ___ Python tracker ___

[issue29099] sqlite3 timestamp converter cannot handle timezone

2016-12-29 Thread Bozo Kopic
Changes by Bozo Kopic : Removed file: http://bugs.python.org/file46074/sqlite3-2.patch ___ Python tracker ___

[issue29099] sqlite3 timestamp converter cannot handle timezone

2016-12-29 Thread Bozo Kopic
Bozo Kopic added the comment: I'm providing new patch that adds support for parsing timezone information. Tests are included. -- Added file: http://bugs.python.org/file46074/sqlite3-2.patch ___ Python tracker

[issue29095] Compiling Python 3.6 from source on MacOS X Sierra

2016-12-29 Thread Walter Dörwald
Walter Dörwald added the comment: OK, I've set CFLAGS and LDFLAGS as you suggested. However the ssl module still doesn't get built. Attached is the new build log (Python3.6-build2.log) -- Added file: http://bugs.python.org/file46073/Python3.6-build2.log

[issue29097] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6

2016-12-29 Thread SilentGhost
SilentGhost added the comment: This doesn't seem likely that it's anything to do with datetime, could you try reproducing it in repl? -- nosy: +SilentGhost ___ Python tracker

[issue29104] Left bracket remains in format string result when '\' preceeds it

2016-12-29 Thread SilentGhost
Changes by SilentGhost : -- nosy: +eric.smith type: -> behavior ___ Python tracker ___

[issue29104] Left bracket remains in format string result when '\' preceeds it

2016-12-29 Thread Jim Fasarakis-Hilliard
New submission from Jim Fasarakis-Hilliard: In short: >>> f"\{10}" yields: "\\{10" This is reproducible only when `\` precedes the opening bracket, that is: >>> f"\ {10}" results in: "\\ 10" -- components: Interpreter Core messages: 284249 nosy: Jim Fasarakis-Hilliard

[issue29095] Compiling Python 3.6 from source on MacOS X Sierra

2016-12-29 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Ah, things are quite the opposite :) You have to set CFLAGS and LDFLAGS so that setup.py can find openssl headers and libraries from Homebrew. For example: export CFLAGS="-I/usr/local/opt/openssl/include" export LDFLAGS="-L/usr/local/opt/openssl/lib" The

[issue24875] pyvenv doesn´t install PIP inside a new venv with --system-site-package

2016-12-29 Thread Jan Gosmann
Changes by Jan Gosmann : -- nosy: +jgosmann ___ Python tracker ___ ___

[issue29095] Compiling Python 3.6 from source on MacOS X Sierra

2016-12-29 Thread Walter Dörwald
Walter Dörwald added the comment: No, neither CFLAGS nor LDFLAGS are set, the only "FLAGS" environment variable I have set is ARCHFLAGS='-arch x86_64' (I can't remember why). However unsetting this variable doesn't change the result. -- ___ Python

[issue28961] unittest.mock._Call ignores `name` parameter

2016-12-29 Thread Jiajun Huang
Jiajun Huang added the comment: hi, do this need more test case or something else to be merged? please let me know :) -- ___ Python tracker ___

[issue29099] sqlite3 timestamp converter cannot handle timezone

2016-12-29 Thread Xiang Zhang
Xiang Zhang added the comment: import sqlite3, datetime c = sqlite3.connect(':memory:', detect_types=sqlite3.PARSE_DECLTYPES|sqlite3.PARSE_COLNAMES) cur = c.cursor() cur.execute('create table test(t timestamp)') t = datetime.datetime.now(tz=datetime.timezone.utc) cur.execute("insert into

[issue28612] str.translate needs a mapping example

2016-12-29 Thread Gaurav Tatke
Gaurav Tatke added the comment: Hi, I am new to Python and want to contribute. I am attaching a patch having required example of using defaultdict with translate. Please let me know if anything needs to be changed. I have tested the example and also the html doc in my local. Regards, Gaurav

[issue29099] sqlite3 timestamp converter cannot handle timezone

2016-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you provide a unittest? -- nosy: +belopolsky, ghaering, lemburg stage: -> test needed ___ Python tracker ___

[issue26382] List object memory allocator

2016-12-29 Thread INADA Naoki
INADA Naoki added the comment: OK. I didn't know PyMem and PyObject allocators are always same. No reason to change Python 3. How about Python 2? Off topic: I want to know which of PyMem and PyObject allocator is preferred when writing new code. -- versions: -Python 3.7

[issue29099] sqlite3 timestamp converter cannot handle timezone

2016-12-29 Thread Xiang Zhang
Xiang Zhang added the comment: I would prefer add the support for timezone since the current behaviour seems not correct to me. If you'd like to work on it, don't forget to add a test case and sign the CLA. But I am not sure this should be treated as a bug or new feature. -- nosy:

[issue29099] sqlite3 timestamp converter cannot handle timezone

2016-12-29 Thread Bozo Kopic
Bozo Kopic added the comment: Yes, that is correct. Timezone information is discarded. Submitted patch only resolves occurrence of ValueError. Is additional patch that enables parsing of timezone required? -- ___ Python tracker

  1   2   >