[issue25718] itertools.accumulate __reduce__/__setstate__ bug

2016-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue1927] raw_input behavior incorrect if readline not enabled

2016-01-19 Thread Martin Panter
Martin Panter added the comment: The way I see it, input() is mainly geared for prompting to stdout, and it is just one aspect that strangely uses stderr: * Documentation says stdout * Stdout is checked if it is a terminal and not redirected * Gnu Readline is configured for stdout * The

[issue26145] PEP 511: Add sys.set_code_transformers()

2016-01-19 Thread STINNER Victor
STINNER Victor added the comment: Patch version 2: * allow "-" character in the argument of the -o command line option * add an unit test on invalid type for code transformer * fix a crash in sys.set_code_transformers(): replace Py_DECREF() with Py_XDECREF() -- Added file:

[issue26145] PEP 511: Add sys.set_code_transformers()

2016-01-19 Thread STINNER Victor
STINNER Victor added the comment: Patch version 2: * allow "-" character in the argument of the -o command line option * add an unit test on invalid type for code transformer * fix a crash in sys.set_code_transformers(): replace Py_DECREF() with Py_XDECREF() -- Added file:

[issue26145] PEP 511: Add sys.set_code_transformers()

2016-01-19 Thread STINNER Victor
Changes by STINNER Victor : -- Removed message: http://bugs.python.org/msg258579 ___ Python tracker ___

[issue26145] PEP 511: Add sys.set_code_transformers()

2016-01-19 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file41655/transformers-2.patch ___ Python tracker ___

[issue26145] PEP 511: Add sys.set_code_transformers()

2016-01-19 Thread STINNER Victor
STINNER Victor added the comment: (oops, i posted the same message with patch twice) -- ___ Python tracker ___

[issue26150] SequenceMatcher's algorithm is not correct

2016-01-19 Thread Владислав Александрович
New submission from Владислав Александрович: For strings 'aa', 'aabaaa' SequenceMatcher's algorithm finds only common substring 'aaa', while well-known classic LCS algorithm: http://www.geeksforgeeks.org/printing-longest-common-subsequence/ finds 'aa' and 'aaa'. Is it the price for "best

[issue26140] inspect.iscoroutinefunction raises TypeError when checks Mock of function or coroutinefunction

2016-01-19 Thread Michael Foord
Michael Foord added the comment: In inspect checking that __code__ is a code object, or that co_flags is an int, would be better than special casing mock. However, the patch to mock looks reasonable to me. It copies the whole code object from the original function to the mock object. The

[issue16620] Avoid using private function glob.glob1() in msi module and tools

2016-01-19 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue1927] raw_input behavior incorrect if readline not enabled

2016-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Unix shell builtin command "read" outputs prompt to stderr. In bash that uses readline and in dash that doesn't use readline. Looks as this is standard behavior. -- nosy: +serhiy.storchaka ___ Python tracker

[issue26013] Pickle protocol 2.0 not loading in python 3.5

2016-01-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue26151] str(bytes) does __repr__() instead of __str__()

2016-01-19 Thread Johnny Wezel
New submission from Johnny Wezel: str(b'xxx') returns "b'xxx'" instead of 'xxx' -- components: Interpreter Core, Unicode messages: 258583 nosy: ezio.melotti, haypo, jwezel priority: normal severity: normal status: open title: str(bytes) does __repr__() instead of __str__() type:

[issue26152] A non-breaking space in a source

2016-01-19 Thread Adam Bartoš
New submission from Adam Bartoš: Consider the following code: >>> 1, 2 File "", line 1 1, 2 ^ SyntaxError: invalid character in identifier The error is due to the fact, that the space before "2" is actually a non-breaking space. The error message and the position of the caret is

[issue16620] Avoid using private function glob.glob1() in msi module and tools

2016-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 652a50208e89 by Serhiy Storchaka in branch '3.5': Issue #16620: Fixed AttributeError in msilib.Directory.glob(). https://hg.python.org/cpython/rev/652a50208e89 New changeset 158ae15f5809 by Serhiy Storchaka in branch '2.7': Issue #16620: Fixed

[issue16620] Avoid using private function glob.glob1() in msi module and tools

2016-01-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue26153] PyImport_GetModuleDict: no module dictionary! when `__del__` triggers a warning

2016-01-19 Thread Min RK
Changes by Min RK : Added file: http://bugs.python.org/file41659/main.py ___ Python tracker ___

[issue26153] PyImport_GetModuleDict: no module dictionary! when `__del__` triggers a warning

2016-01-19 Thread Min RK
Changes by Min RK : Added file: http://bugs.python.org/file41658/b.py ___ Python tracker ___

[issue26153] PyImport_GetModuleDict: no module dictionary! when `__del__` triggers a warning

2016-01-19 Thread Min RK
Changes by Min RK : Added file: http://bugs.python.org/file41657/a.py ___ Python tracker ___

[issue26153] PyImport_GetModuleDict: no module dictionary! when `__del__` triggers a warning

2016-01-19 Thread Min RK
New submission from Min RK: PyImport_GetModuleDict: no module dictionary! can be raised during interpreter shutdown if a `__del__` method results in a warning. This only happens on Python 3.5. The prompting case is IPython 4.0.2 and traitlets 4.1.0. An IPython ExtensionManager calls

[issue17781] optimize compilation options

2016-01-19 Thread Zachary Ware
Zachary Ware added the comment: PGO is available as `make profile-opt`, LTO has a patch in issue25702. Are there any other interesting options worth investigating? -- nosy: +zach.ware status: open -> pending ___ Python tracker

[issue15809] 2.7 IDLE console uses incorrect encoding.

2016-01-19 Thread R. David Murray
Changes by R. David Murray : -- nosy: -r.david.murray ___ Python tracker ___ ___

[issue26151] str(bytes) does __repr__() instead of __str__()

2016-01-19 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: -haypo ___ Python tracker ___ ___

[issue24923] Append system paths in setup.py instead of prepending

2016-01-19 Thread R. David Murray
Changes by R. David Murray : -- nosy: +r.david.murray ___ Python tracker ___ ___

[issue26151] str(bytes) does __repr__() instead of __str__()

2016-01-19 Thread Martin Panter
Martin Panter added the comment: A warning is already emitted if you enable it with the “-b” flag, which I recommend. You can even turn the warning into an error with “-bb”. And you can always use repr() or ascii() to inspect for a more robust inspection. $ python3 -bb Python 3.5.0 (default,

[issue25934] ICC compiler: ICC treats denormal floating point numbers as 0.0

2016-01-19 Thread Zachary Ware
Zachary Ware added the comment: I've looked into this a bit, and tests won't pass with MSVC /fp:strict, so it would need to be ICC specific. UNIX ICC builds do unconditionally use -fp-model strict now, though, so I think Windows ICC builds should as well. --

[issue25702] Link Time Optimizations support for GCC and CLANG

2016-01-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Unfortunately, 2.7 doesn't have even CFLAGS_NODIST; I suspect it may be time > to backport that. I don't think now is a good time to introduce instability in the 2.7 branch. -- ___ Python tracker

[issue26158] File truncate() not defaulting to current position as documented

2016-01-19 Thread Марк Коренберг
Марк Коренберг added the comment: text files and seek() offset: issue25849 -- nosy: +mmarkk ___ Python tracker ___

[issue15809] 2.7 IDLE console uses incorrect encoding.

2016-01-19 Thread fireattack
fireattack added the comment: Any update on this? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue17781] optimize compilation options

2016-01-19 Thread R. David Murray
Changes by R. David Murray : -- status: open -> pending ___ Python tracker ___ ___

[issue26158] File truncate() not defaulting to current position as documented

2016-01-19 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: -haypo ___ Python tracker ___ ___

[issue25702] Link Time Optimizations support for GCC and CLANG

2016-01-19 Thread Zachary Ware
Zachary Ware added the comment: I'm a bit concerned that the flags are being added unconditionally to CFLAGS and LDFLAGS (when configured --with-lto), which means extensions are forced into it as well. I think it would be better to use CFLAGS_NODIST and to add LDFLAGS_NODIST. Unfortunately,

[issue26107] PEP 511: code.co_lnotab: use signed line number delta to support moving instructions in an optimizer

2016-01-19 Thread Antti Haapala
Antti Haapala added the comment: Nice work, my issue21385 is also related. Basically, transforming non-Python code into Python meant that all line number information, which otherwise would have been useful for debugging, had to be discarded, or debug builds of Python would dump cores. So,

[issue17781] optimize compilation options

2016-01-19 Thread R. David Murray
Changes by R. David Murray : -- nosy: +r.david.murray status: pending -> open ___ Python tracker ___

[issue24923] Append system paths in setup.py instead of prepending

2016-01-19 Thread Zachary Ware
Zachary Ware added the comment: I've been doing some research on this, the below is pretty much a brain-dump. Related issues: issue232609, issue420565, issue10520. This looks to me like the ideal solution is to assign a priority to each entry and sort by that priority before using it; give

[issue25702] Link Time Optimizations support for GCC and CLANG

2016-01-19 Thread R. David Murray
Changes by R. David Murray : -- nosy: +r.david.murray ___ Python tracker ___ ___

[issue26158] File truncate() not defaulting to current position as documented

2016-01-19 Thread Fornax
Fornax added the comment: After taking a little time to let this sink in, I'm going to play Devil's Advocate just a little more. It sounds like you're basically saying that any read-write text-based modes (e.g. r+, w+) should be used at your own peril. While I understand your UTF-7

[issue26158] File truncate() not defaulting to current position as documented

2016-01-19 Thread Eryk Sun
Eryk Sun added the comment: Serhiy, why doesn't truncate do a seek(0, SEEK_CUR) to synchronize the buffer's file pointer before calling its truncate method? This also affects writing in "+" modes when the two file pointers are out of sync. -- nosy: +eryksun

[issue26158] File truncate() not defaulting to current position as documented

2016-01-19 Thread Fornax
Fornax added the comment: To clarify... the intended behavior is for truncate to default to the current position of the buffer, rather than the current position as reported directly from the stream by tell? That seems... surprising. -- ___ Python

[issue26152] A non-breaking space in a source

2016-01-19 Thread Andrew Barnert
Andrew Barnert added the comment: Ultimately, this is because the tokenizer works byte by byte instead of character by character, as far as possible. Since any byte >= 128 must be part of some non-ASCII character, and the only legal use for non-ASCII characters outside of quotes and comments

[issue26153] PyImport_GetModuleDict: no module dictionary! when `__del__` triggers a warning

2016-01-19 Thread Matthias Bussonnier
Changes by Matthias Bussonnier : -- nosy: +mbussonn ___ Python tracker ___ ___

[issue24324] Remove -Wunreachable-code flag

2016-01-19 Thread Jake Garver
Changes by Jake Garver : Added file: http://bugs.python.org/file41663/Python351-no-unreachable-check.diff ___ Python tracker ___

[issue26158] File truncate() not defaulting to current position as documented

2016-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: May be. Looking at the code, both Python and C implementations of TextIOWrapper look incorrect. Python implementation: def truncate(self, pos=None): self.flush() if pos is None: pos = self.tell() return

[issue26158] File truncate() not defaulting to current position as documented

2016-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is not always possible. Consider following example: >>> open('temp.txt', 'wb').write(b'+BDAEMQQyBDMENA-') 16 >>> f = open('temp.txt', 'r+', encoding='utf-7') >>> f.read(2) 'аб' What should be the result of truncating? I think it would be better to not

[issue26158] File truncate() not defaulting to current position as documented

2016-01-19 Thread Fornax
Fornax added the comment: Heh... building on Serhiy's example: >>> f.tell() 680564735109527527154978616360239628288 I'm way out of my depth here. The results seem surprising, but I lack the experience to be able to say what they "should" look like. So I guess if it's working as intended and

[issue26158] File truncate() not defaulting to current position as documented

2016-01-19 Thread Fornax
Fornax added the comment: Another surprising result: >>> open('temp.txt', 'w').write('ABCDE\nFGHIJ\nKLMNO\nPQRST\nUVWXY\nZ\n') 32 >>> f = open('temp.txt', 'r+') >>> f.write('test') 4 >>> f.close() >>> open('temp.txt').read() 'testE\nFGHIJ\nKLMNO\nPQRST\nUVWXY\nZ\n' >>> open('temp.txt',

[issue26158] File truncate() not defaulting to current position as documented

2016-01-19 Thread Martin Panter
Martin Panter added the comment: Fornax: Yes, I was suggesting the idea of deprecating truncate() for text files! Although a blanket deprecation of all cases may not be realistic. Quickly reading the Stack Overflow pages, it seems like there is demand for this to work in some cases.

[issue26154] Add private _PyThreadState_FastGet() to get the current thread state

2016-01-19 Thread Gregory P. Smith
Gregory P. Smith added the comment: Overall +1 to this private API. I like the UncheckedGet name better than FastGet but don't really care what the name is so long as it keeps this property: It must be non-blocking and safe to call from a signal handler. Returning NULL in the event the

[issue15809] 2.7 IDLE console uses incorrect encoding.

2016-01-19 Thread Ned Deily
Changes by Ned Deily : -- nosy: -ned.deily ___ Python tracker ___ ___ Python-bugs-list

[issue25863] ISO-2022 seeking forgets state

2016-01-19 Thread Martin Panter
Martin Panter added the comment: After thinking about Issue 26158, I realize the seek() magic numbers don’t store any _encoder_ state, only _decoder_ state. That would explain the first bug (write, seek, then read). Though for this codec I suspect the decoder state is not recorded either,

[issue12215] TextIOWrapper: issues with interlaced read-write

2016-01-19 Thread Martin Panter
Martin Panter added the comment: Consider codecs that maintain an internal buffer (UTF-7) or other state (ISO-2022). When you call TextIOWrapper.read() and then tell(), the I think the returned number is supposed to hold the _decoder_ state, so you can seek back and read again. But I don’t

[issue26158] File truncate() not defaulting to current position as documented

2016-01-19 Thread Eryk Sun
Eryk Sun added the comment: FYI, you can parse the cookie using struct or ctypes. For example: class Cookie(ctypes.Structure): _fields_ = (('start_pos', ctypes.c_longlong), ('dec_flags', ctypes.c_int), ('bytes_to_feed', ctypes.c_int),

[issue26140] inspect.iscoroutinefunction raises TypeError when checks Mock of function or coroutinefunction

2016-01-19 Thread Hiroyuki Takagi
Hiroyuki Takagi added the comment: Thank you for reviewing patch. I wrote test and updated patch. To pass the test, both this patch and issue25599's patch are required. Changes of the patch: - copy __code__ not only functions but also methods - add autospec (create_autospec) suppoort I have

[issue26155] 3.5.1 installer issue on Win 7 32 bit

2016-01-19 Thread Steve Dower
Steve Dower added the comment: You should have some log files in your %TEMP% directory, all starting with "python". Could you post those here? They'll help us see what happened. -- ___ Python tracker

[issue25702] Link Time Optimizations support for GCC and CLANG

2016-01-19 Thread Zachary Ware
Zachary Ware added the comment: Unless I'm just missing something, I don't see how introducing CFLAGS_NODIST and LDFLAGS_NODIST to 2.7 would introduce instability. It should be a fairly non-invasive change, restricted to configure and the Makefile; both vars should usually be empty and thus

[issue26157] Typo in asyncio documentation

2016-01-19 Thread Berker Peksag
Berker Peksag added the comment: Thanks! I noticed another typo in the same file and fixed it. -- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed versions: -Python 3.4 ___ Python tracker

[issue25925] Coverage support for CPython 2

2016-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset ed7b602a7400 by Zachary Ware in branch '2.7': Issue #25925: Backport C coverage reporting Makefile targets https://hg.python.org/cpython/rev/ed7b602a7400 -- nosy: +python-dev ___ Python tracker

[issue10367] "python setup.py sdist upload --show-response" can fail with "UnboundLocalError: local variable 'result' referenced before assignment"

2016-01-19 Thread Berker Peksag
Berker Peksag added the comment: This has been fixed in issue 12853. The relevant line is here: https://hg.python.org/cpython/file/2.7/Lib/distutils/command/upload.py#l179 Closing this one as a duplicate. -- nosy: +berker.peksag resolution: -> duplicate stage: needs patch -> resolved

[issue8519] doc: termios and ioctl reference links

2016-01-19 Thread Senthil Kumaran
Senthil Kumaran added the comment: I followed the previous discussions and reviewed the patch. With respect to the patch, I see few drawbacks in providing links to references like this: `fcntl `_ `ioctl

[issue26160] Tutorial incorrectly claims that (explicit) relative imports don't work in the main module

2016-01-19 Thread Kevin Norris
New submission from Kevin Norris: The tutorial contains this statement: Note that relative imports are based on the name of the current module. Since the name of the main module is always "__main__", modules intended for use as the main module of a Python application must always use absolute

[issue26158] File truncate() not defaulting to current position as documented

2016-01-19 Thread random832
random832 added the comment: In the analogous C operations, ftell (analogous to .tell) actually causes the underlying file descriptor's position (analogous to the raw stream's position) to be reset to be at the same value that ftell has returned. Which means, yes, that you lose the benefits

[issue26157] Typo in asyncio documentation

2016-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7415a9386048 by Berker Peksag in branch '3.5': Issue #26157: Fix typos in asyncio-eventloop.rst https://hg.python.org/cpython/rev/7415a9386048 New changeset 67f562cbd87b by Berker Peksag in branch 'default': Issue #26157: Fix typos in

[issue25925] Coverage support for CPython 2

2016-01-19 Thread Zachary Ware
Zachary Ware added the comment: Committed (with a couple minor tweaks), thanks for the patch! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue5626] misleading comment in socket.gethostname() documentation

2016-01-19 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue15809] 2.7 IDLE console uses incorrect encoding.

2016-01-19 Thread Terry J. Reedy
Terry J. Reedy added the comment: Serhiy, unless you are planning to do something more, please close this. The extended extended maintenance period for 2.7 is mainly for build and security issues, and I don't expect to do any more 2.7-only patches. --

[issue5626] misleading comment in socket.gethostname() documentation

2016-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset e1a711808cfe by Berker Peksag in branch '3.5': Issue #5626: Remove misleading comment from socket.gethostname() documentation https://hg.python.org/cpython/rev/e1a711808cfe New changeset 689f881dd5d1 by Berker Peksag in branch 'default': Issue

[issue26151] str(bytes) does __repr__() instead of __str__()

2016-01-19 Thread STINNER Victor
STINNER Victor added the comment: Yes. It's a feature, not a bug. You muse decode manually bytes to get type: b'xxx'.decode('ascii') or str(b'xxx'.decode('ascii')). -- resolution: -> not a bug status: open -> closed ___ Python tracker

[issue26098] PEP 510: Specialize functions with guards

2016-01-19 Thread STINNER Victor
STINNER Victor added the comment: Patch version 3: * guards are now tracked by the garbage collector. That's a very important requirements to not change the Python semantics at exit, when a guard keeps a strong reference to the global namespace:

[issue26153] PyImport_GetModuleDict: no module dictionary! when `__del__` triggers a warning

2016-01-19 Thread SilentGhost
Changes by SilentGhost : -- nosy: +brett.cannon ___ Python tracker ___ ___

[issue26133] asyncio: ugly error related to signal handlers at exit if the loop is not closed explicitly

2016-01-19 Thread STINNER Victor
Changes by STINNER Victor : -- title: asyncio: ugly error related signal handler at exit if the loop is not closed explicitly -> asyncio: ugly error related to signal handlers at exit if the loop is not closed explicitly

[issue26148] String literals are not interned if in a tuple

2016-01-19 Thread STINNER Victor
Changes by STINNER Victor : -- type: -> performance ___ Python tracker ___ ___

[issue26148] String literals are not interned if in a tuple

2016-01-19 Thread STINNER Victor
Changes by STINNER Victor : -- versions: +Python 3.6 ___ Python tracker ___ ___

[issue26154] Add private _PyThreadState_FastGet() to get the current thread state

2016-01-19 Thread STINNER Victor
New submission from STINNER Victor: The issue #25150 modified pystate.h to hide _PyThreadState_Current. Sadly, this change broke the vmprof project: https://mail.python.org/pipermail/python-dev/2016-January/142767.html Attached patches adds a new private _PyThreadState_FastGet() function to

[issue26151] str(bytes) does __repr__() instead of __str__()

2016-01-19 Thread Johnny Wezel
Johnny Wezel added the comment: Bad feature, as it is a violation of POLA. -- ___ Python tracker ___ ___

[issue25935] OrderedDict prevents garbage collection if a circulary referenced class is used as key

2016-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 627575e9a7aa by Serhiy Storchaka in branch '3.5': Issue #25935: Garbage collector now breaks reference loops with OrderedDict. https://hg.python.org/cpython/rev/627575e9a7aa New changeset 5f0a08cfc4f6 by Serhiy Storchaka in branch 'default': Issue

[issue25935] OrderedDict prevents garbage collection if a circulary referenced class is used as key

2016-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In some cases (as in committed test) garbage collector was not able to collect a loop with OrderedDict at all. -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue26155] 3.5.1 installer issue on Win 7 32 bit

2016-01-19 Thread TarotRedhand
New submission from TarotRedhand: This is not in the Python Core but in the installer for version 3.5.1 on windows 32 bit. It occurs with the custom install option. I gave a verified new location for python to be installed to but it installed in MyDocuments anyway. -- components:

[issue26154] Add private _PyThreadState_FastGet() to get the current thread state

2016-01-19 Thread Nathaniel Smith
Nathaniel Smith added the comment: Name should be _PyThreadState_UncheckedGet -- nosy: +njs ___ Python tracker ___

[issue5626] misleading comment in socket.gethostname() documentation

2016-01-19 Thread Berker Peksag
Berker Peksag added the comment: I agree with Chris and Ned. I will apply issue5626_v1.diff today. -- stage: -> commit review type: -> behavior versions: +Python 3.5, Python 3.6 -Python 2.6, Python 3.0, Python 3.1 ___ Python tracker

[issue26158] File truncate() not defaulting to current position as documented

2016-01-19 Thread Fornax
New submission from Fornax: io.IOBase.truncate() documentation says: "Resize the stream to the given size in bytes (or the current position if size is not specified). The current stream position isn’t changed. This resizing can extend or reduce the current file size. In case of extension, the

[issue26155] 3.5.1 installer issue on Win 7 32 bit

2016-01-19 Thread SilentGhost
Changes by SilentGhost : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___

[issue26156] Bad name into power operator syntax

2016-01-19 Thread Chema Cortés
New submission from Chema Cortés: The documentation erroneously changes "primary" for "away" in the power operator syntax: https://docs.python.org/3.6/reference/expressions.html#the-power-operator https://docs.python.org/3.5/reference/expressions.html#the-power-operator -- assignee:

[issue26156] Bad name into power operator syntax

2016-01-19 Thread Yury Selivanov
Yury Selivanov added the comment: The docs are correct. See the definition of the "await" expression: https://docs.python.org/3.6/reference/expressions.html#await-expression -- nosy: +yselivanov resolution: -> not a bug stage: -> resolved status: open -> closed

[issue26157] Typo in asyncio documentation

2016-01-19 Thread Frank Millman
New submission from Frank Millman: 18.5.1.15. Server close() "The sockets that represent existing incoming client connections are leaved open." I think this should say 'are left open'. -- assignee: docs@python components: Documentation messages: 258599 nosy: docs@python,

[issue26151] str(bytes) does __repr__() instead of __str__()

2016-01-19 Thread Eryk Sun
Eryk Sun added the comment: > Bad feature, as it is a violation of POLA. I would be astonished if the default __str__ conversion returned a Latin-1 decoding, which won't fail, or used the locale encoding or UTF-8, which could fail. The more explicit call x.decode() uses UTF-8 as the default

[issue26157] Typo in asyncio documentation

2016-01-19 Thread Carlo Beccarini
Carlo Beccarini added the comment: Absolutely. -- nosy: +Paradisee ___ Python tracker ___ ___

[issue26151] str(bytes) does __repr__() instead of __str__()

2016-01-19 Thread Walter Dörwald
Walter Dörwald added the comment: > Who's talking about latin-1 in Python3? Of course str() needs to return > decode('utf-8'). So that would mean that: print(b"\xff") will always fail! -- nosy: +doerwalter ___ Python tracker

[issue26157] Typo in asyncio documentation

2016-01-19 Thread Carlo Beccarini
Changes by Carlo Beccarini : -- versions: +Python 3.4 ___ Python tracker ___ ___

[issue26159] Unsafe to BaseEventLoop.set_debug(False) when PYTHONASYNCIODEBUG=1

2016-01-19 Thread Bradley McLean
New submission from Bradley McLean: Leads to spurious RuntimeWarning: coroutine was never awaited messages, when @asyncio.coroutine methods call async def methods. Likely because decorators ran before set_debug set False, and are assuming it won't change. -- components: asyncio

[issue26157] Typo in asyncio documentation

2016-01-19 Thread Carlo Beccarini
Changes by Carlo Beccarini : -- keywords: +patch Added file: http://bugs.python.org/file41662/patch.diff ___ Python tracker ___

[issue26151] str(bytes) does __repr__() instead of __str__()

2016-01-19 Thread Johnny Wezel
Johnny Wezel added the comment: Who's talking about latin-1 in Python3? Of course str() needs to return decode('utf-8'). -- ___ Python tracker ___

[issue26144] test_pkg test_4 and/or test_7 sometimes fail

2016-01-19 Thread Rose Ames
Rose Ames added the comment: Reproduced. In four runs, one errored in test_4, one failed in test_7, and the other two did both. -- nosy: +superluser ___ Python tracker

[issue26151] str(bytes) does __repr__() instead of __str__()

2016-01-19 Thread Johnny Wezel
Johnny Wezel added the comment: The other question is why one would want to run such a statement. This is almost certainly a bug in which case an error one would be better off with an exception. -- ___ Python tracker

[issue26144] test_pkg test_4 and/or test_7 sometimes fail

2016-01-19 Thread Rose Ames
Rose Ames added the comment: redirecting stdout seems to reliably suppress both failures: $ ./python -m test -w test_pkg >foo $ cat foo [1/1] test_pkg 1 test OK. -- ___ Python tracker

[issue26158] File truncate() not defaulting to current position as documented

2016-01-19 Thread Stephen Paul Chappell
Changes by Stephen Paul Chappell : -- nosy: +Zero ___ Python tracker ___ ___

[issue26151] str(bytes) does __repr__() instead of __str__()

2016-01-19 Thread Walter Dörwald
Walter Dörwald added the comment: But this leads to uninspectable objects. -- ___ Python tracker ___ ___

[issue26158] File truncate() not defaulting to current position as documented

2016-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is because the file is buffered. >>> open('temp.txt', 'w').write('ABCDE\nFGHIJ\nKLMNO\nPQRST\nUVWXY\nZ\n') 32 >>> f = open('temp.txt', 'r+') >>> f.readline() 'ABCDE\n' >>> f.tell() 6 >>> f.buffer.tell() 32 >>> f.buffer.raw.tell() 32 The documentation