[issue10225] Fix doctest runable examples in python manual

2016-07-12 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +andymaier, belopolsky, docs@python, eric.araujo, ezio.melotti, georg.brandl, lukasz.langa, rhettinger, terry.reedy -lissacoffeyx ___ Python tracker

[issue10225] Fix doctest runable examples in python manual

2016-07-12 Thread Berker Peksag
Changes by Berker Peksag : -- Removed message: http://bugs.python.org/msg270297 ___ Python tracker ___

[issue10225] Fix doctest runable examples in python manual

2016-07-12 Thread lissacoffeyx
lissacoffeyx added the comment: I had a thought that it made the template more readable, but the better solution was to just use real newlines instead of '\n'. Thanks http://www.fixithere.net/sky-customer-service/ -- nosy: +lissacoffeyx -andymaier, belopolsky, docs@python,

[issue25393] 'resource' module documentation error

2016-07-12 Thread Berker Peksag
Changes by Berker Peksag : -- keywords: +easy nosy: +berker.peksag stage: -> needs patch type: enhancement -> behavior versions: +Python 3.6 ___ Python tracker

[issue25548] Show the address in the repr for class objects

2016-07-12 Thread Kushal Das
Kushal Das added the comment: The NEWS file got a typo. Thanks for noticing that. This change did require a lot of updates to the tests. If rest of the people agrees to revert this change, then we should go ahead and do it. Just wondering if Raymond has anything to add. --

[issue27498] Regression in repr() of class object

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

[issue27449] pip install --upgrade pip (Windows)

2016-07-12 Thread frank-e
frank-e added the comment: Thanks, worked, most likely an error on my side (command line window without admin rights). -- ___ Python tracker ___

[issue27133] python 3.5.1 will not compile because libffi module uses wrong CFLAGS

2016-07-12 Thread Martin Panter
Martin Panter added the comment: In the original report you mentioned a linker error caused by not using “-m64” from CFLAGS. Perhaps would it make more sense to add LDFLAGS=“-m64”, or use CC=“cc -m64” instead? There is also Issue 27490 and Issue 22981, both apparently about setting the ABI

[issue22981] Use CFLAGS when extracting multiarch

2016-07-12 Thread Martin Panter
Martin Panter added the comment: Why do you set CFLAGS=-m32? When I cross-compile a 32-bit Python on a 64-bit host, I set CC="gcc -m32" instead. (Otherwise, I would have to specify LDFLAGS="-m32" as well.) -- components: +Build nosy: +martin.panter

[issue27490] ARM cross-compile: pgen built without $(CFLAGS) as $(LIBRARY) dependency

2016-07-12 Thread Martin Panter
Martin Panter added the comment: I don’t know the details of how Python uses CFLAGS etc, but according to and , the

[issue19027] undefined symbol: _PyParser_Grammar

2016-07-12 Thread Martin Panter
Martin Panter added the comment: The same $(GRAMMAR_H) dependency and touch command still exists today, so I suspect this is still valid (though I didn’t try to reproduce it). I think we need to figure out if you can write a proper makefile rule that handles a single command that updates two

[issue27504] Missing assertion methods in unittest documentation

2016-07-12 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue19142] Cross-compile fails trying to execute foreign pgen on build host

2016-07-12 Thread Martin Panter
Martin Panter added the comment: Since 2.7.12 and 3.5.2, pgen should not be executed when in cross-compilation mode, thanks to Issue 22359 and Issue 22625. So I suspect the main problem is basically solved now. Even though it should no longer be used, pgen is still cross-compiled depending

[issue27504] Missing assertion methods in unittest documentation

2016-07-12 Thread Mitchell Model
Mitchell Model added the comment: My strong apology. I missed a section of the documentation. It didn't seem possible that they weren't there, but I made a mistake when I checked for them. Sorry. > On Jul 12, 2016, at 9:15 PM, R. David Murray wrote: > > > R. David

[issue27487] -m switch regression in Python 3.5.2 (under rare circumstances)

2016-07-12 Thread Nick Coghlan
Nick Coghlan added the comment: Oops, that PEP reference was meant to be PEP 451 (which added the __spec__ attribute and the concept of module specs as something distinct from the modules themselves) -- ___ Python tracker

[issue27487] -m switch regression in Python 3.5.2 (under rare circumstances)

2016-07-12 Thread Nick Coghlan
Nick Coghlan added the comment: Breaking down a few of the moving parts here: * Yes, modules replacing themselves in sys.modules as a side effect of import is supported behaviour (it's why the import system looks them up by name in sys.modules as the final step, rather than just returning

[issue27505] Missing documentation for setting module __class__ attribute

2016-07-12 Thread Nick Coghlan
Changes by Nick Coghlan : -- dependencies: +Improved handling of __class__ assignment ___ Python tracker ___

[issue22986] Improved handling of __class__ assignment

2016-07-12 Thread Nick Coghlan
Nick Coghlan added the comment: Just noting I filed http://bugs.python.org/issue27505 regarding the lack of documentation for the new-in-Python-3.5 ability to set module __class__ attributes. -- ___ Python tracker

[issue27505] Missing documentation for setting module __class__ attribute

2016-07-12 Thread Nick Coghlan
New submission from Nick Coghlan: Python 3.5 added the ability to set module __class__ attributes by way of http://bugs.python.org/issue22986 However, this isn't covered in the What's New guide or anywhere else in the documentation, and even in the NEWS file it appears under the cryptic title

[issue14977] mailcap does not respect precedence in the presence of wildcards

2016-07-12 Thread R. David Murray
R. David Murray added the comment: How about this: rename the existing readmailcapfile as an internal _readmailcapfile with the new signature. Then add a backward compatible readmailcapfile with the existing signature/return value that uses a dummy value for lineno and throws away the lineno

[issue14977] mailcap does not respect precedence in the presence of wildcards

2016-07-12 Thread Michael Lazar
Michael Lazar added the comment: I can certainly do that. Although in addition to adding a keyword argument, we would also have to change the return signature to switch between modes like this: if lineno is None: return caps else: return caps, lineno Overall I'm not a

[issue27504] Missing assertion methods in unittest documentation

2016-07-12 Thread R. David Murray
R. David Murray added the comment: If you are looking at the source, you can look at the source. If you are looking at the documentation, we believe they are all documented. If you use pydoc/help, they are all documented. I can't find the phrase you cite, but 'assert methods' is correct:

[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-07-12 Thread Demur Rumed
Demur Rumed added the comment: Benchmarked f'X is {x}' with BUILD_TUPLE change: Before: 6.62 usec per loop After: 6.33 usec per loop f'X is {x} {x+2} {x+3}' Before: 15.1 usec per loop After: 14.7 usec per loop Attached patch -- keywords: +patch Added file:

[issue27078] Make f'' strings faster than .format: BUILD_STRING opcode?

2016-07-12 Thread Demur Rumed
Demur Rumed added the comment: The simplest perf fix is to first use BUILD_TUPLE instead of BUILD_LIST timeit 'x=1;(x,x,x)' 0.36 usec per loop timeit 'x=1;[x,x,x]' 0.425 usec per loop Introducing a new opcode BUILD_STRING to inline PyTuple_New + PyUnicode_Join to replace BUILD_TUPLE +

[issue27504] Missing assertion methods in unittest documentation

2016-07-12 Thread Ned Deily
Changes by Ned Deily : -- nosy: +ezio.melotti, michael.foord, rbcollins versions: +Python 3.6 -Python 3.2, Python 3.3, Python 3.4 ___ Python tracker

[issue27487] -m switch regression in Python 3.5.2 (under rare circumstances)

2016-07-12 Thread Martin Panter
Martin Panter added the comment: In trying to understand this, I built a package with two simple files: $ cat package/*.py # package/__init__.py: from . import module # package/module.py: import sys sys.modules[__name__] = object() With this I can reproduce your __spec__ error, and I see it

[issue27504] Missing assertion methods in unittest documentation

2016-07-12 Thread Mitchell Model
New submission from Mitchell Model: In looking at the source for unittest.TestCase I was very surprised to see quite a few assertion methods that are not included in the module documentation. Every available assertion method should be included in the library documentation. Users should not

[issue27503] support RUSAGE_THREAD as a constant in the resource module

2016-07-12 Thread R. David Murray
R. David Murray added the comment: Enhancements only go into the next feature release, which is what happened. -- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue27497] csv module: Add return value to DictWriter.writeheader

2016-07-12 Thread R. David Murray
R. David Murray added the comment: It isn't documented that writer.writeline returns anything, but what it actually returns is whatever the write method of the underlying file object returns. Obviously (given the linked example), this fact is being used. There is value in consistency, so I

[issue27498] Regression in repr() of class object

2016-07-12 Thread Ned Deily
Changes by Ned Deily : -- priority: normal -> release blocker ___ Python tracker ___ ___

[issue27503] support RUSAGE_THREAD as a constant in the resource module

2016-07-12 Thread Maxim Sobolev
New submission from Maxim Sobolev: This is duplicate of the #10440, which has been added in 2010 into 3.x but never merged. -- files: patch-Modules_resource.c messages: 270275 nosy: Maxim Sobolev priority: normal severity: normal status: open title: support RUSAGE_THREAD as a constant

[issue26446] Mention in the devguide that core dev stuff falls under the PSF CoC

2016-07-12 Thread Brett Cannon
Brett Cannon added the comment: I figured Berker was/had when he did the review, but I can take care of it when I get around to it (prioritizing 3.6 features ATM). -- ___ Python tracker

[issue27392] Add a server_side keyword parameter to create_connection

2016-07-12 Thread Yury Selivanov
Yury Selivanov added the comment: Let's keep this issue open until we have the docs updated. -- ___ Python tracker ___

[issue27392] Add a server_side keyword parameter to create_connection

2016-07-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3e44c449433a by Yury Selivanov in branch '3.5': Issue #27392: Add loop.connect_accepted_socket(). https://hg.python.org/cpython/rev/3e44c449433a New changeset 2f0716009132 by Yury Selivanov in branch 'default': Merge 3.5 (issue #27392)

[issue27180] Doc/pathlib: Please describe the behaviour of Path().rename() is depends on the platform (same as os.rename())

2016-07-12 Thread STINNER Victor
STINNER Victor added the comment: patch27180. LGTM. -- nosy: +haypo ___ Python tracker ___ ___

[issue26446] Mention in the devguide that core dev stuff falls under the PSF CoC

2016-07-12 Thread STINNER Victor
STINNER Victor added the comment: Brett: "Thanks for the patch, Evelyn! The latest one LGTM and I will commit it when I have time." Ok, so are you going to push it? -- nosy: +haypo ___ Python tracker

[issue8538] Add FlagAction to argparse

2016-07-12 Thread STINNER Victor
STINNER Victor added the comment: I'm sorry but there is no activity since 4 years, so I guess that the feature is not common enough to require a builtin support in argparse. -- nosy: +haypo resolution: -> out of date status: open -> closed ___

[issue27497] csv module: Add return value to DictWriter.writeheader

2016-07-12 Thread STINNER Victor
STINNER Victor added the comment: It doesn't seem right to me. The writer should be blocking: write *all* data, don't use partial write. Supporting partial write (non-blocking files) requires more changes, and it isn't worth it. Here the problem is that the function doesn't support partial

[issue27498] Regression in repr() of class object

2016-07-12 Thread Tim Graham
Changes by Tim Graham : -- nosy: +Tim.Graham ___ Python tracker ___ ___

[issue15443] datetime module has no support for nanoseconds

2016-07-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- Removed message: http://bugs.python.org/msg270265 ___ Python tracker ___

[issue27502] Python -m Module Vulnerable to Buffer Over Flow.

2016-07-12 Thread R. David Murray
R. David Murray added the comment: Your screenshots don't show any evidence of a crash. I don't see any buffer overflow here, just normal python error messages. -- nosy: +r.david.murray ___ Python tracker

[issue15443] datetime module has no support for nanoseconds

2016-07-12 Thread Steve Holden
Steve Holden added the comment: Just wanted to add a couple of comments here in case there's any interest. In our missions to make the world's market data available we deal with financial exchanges, many of whom are already recording event data at nanosecond resolution. Further, I believe

[issue15443] datetime module has no support for nanoseconds

2016-07-12 Thread Steve Holden
Steve Holden added the comment: Just wanted to add a couple of comments here in case there's any interest. In our missions to make the world's market data available we deal with financial exchanges, many of whom are already recording event data at nanosecond resolution. Further, I believe

[issue27415] regression: BaseEventLoop.create_server does not accept port=None

2016-07-12 Thread Marcus Cobden
Changes by Marcus Cobden : -- title: BaseEventLoop.create_server does not accept port=None -> regression: BaseEventLoop.create_server does not accept port=None ___ Python tracker

[issue27502] Python -m Module Vulnerable to Buffer Over Flow.

2016-07-12 Thread Dhiraj
New submission from Dhiraj: Hello Sir , The Module of Python " -m SimpleHTTPServer " is vulnerable to Buffer Over Flow. Step : I have prepared a python script which is sending more than 5000+ Values to the Module in GET Method , and as soon as , I run that Script , the Python -m

[issue27498] Regression in repr() of class object

2016-07-12 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +kushal.das ___ Python tracker ___ ___ Python-bugs-list

[issue27500] ProactorEventLoop cannot open connection to ::1

2016-07-12 Thread Sebastien Bourdeauducq
Sebastien Bourdeauducq added the comment: The first offending commit is this one: https://github.com/python/cpython/commit/03df54d549173e17e1cf9a767199de32a363aa6b more specifically "return af, type, proto, '', (host, port)". For IPv6, it should be "(host, port, flow info, scope id)" instead

[issue25548] Show the address in the repr for class objects

2016-07-12 Thread Guido van Rossum
Guido van Rossum added the comment: I'm also echoing this... It breaks too many tests. I filed issue27498. -- nosy: +gvanrossum ___ Python tracker ___

[issue27501] Create a collections.abc class that describes PEP 3118 buffer

2016-07-12 Thread Daniel Moisset
Changes by Daniel Moisset : -- components: +Library (Lib) type: -> enhancement ___ Python tracker ___

[issue27501] Create a collections.abc class that describes PEP 3118 buffer

2016-07-12 Thread Daniel Moisset
New submission from Daniel Moisset: The buffer protocol is a low level C protocol, but even if it doesn't expose a specific python API, it's currently not possible to say "this object implements the buffer protocol" in Python This might be useful for some applications, including PEP-484

[issue27499] PY_SSIZE_T_CLEAN conflicts with Py_LIMITED_API

2016-07-12 Thread Daniel Holth
Daniel Holth added the comment: Oh, I can avoid this problem by setting Py_LIMITED_API to 0x3030 or greater. -- ___ Python tracker ___

[issue27498] Regression in repr() of class object

2016-07-12 Thread Ethan Furman
Ethan Furman added the comment: This change was done in issue25548. -- nosy: +ethan.furman ___ Python tracker ___

[issue27500] ProactorEventLoop cannot open connection to ::1

2016-07-12 Thread Sebastien Bourdeauducq
New submission from Sebastien Bourdeauducq: The following code fails with "OSError: [WinError 10022] An invalid argument was supplied". import asyncio loop = asyncio.ProactorEventLoop() asyncio.set_event_loop(loop) loop.run_until_complete(asyncio.open_connection("::1", 4242)) This is a

[issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv`

2016-07-12 Thread Steve Piercy
Steve Piercy added the comment: Thanks, Ned. This was my first hg patch. I'm learning. -- ___ Python tracker ___

[issue27496] unicodedata.name() doesn't have names for control characters

2016-07-12 Thread Eryk Sun
Changes by Eryk Sun : -- versions: +Python 2.7, Python 3.6 ___ Python tracker ___

[issue27496] unicodedata.name() doesn't have names for control characters

2016-07-12 Thread Eryk Sun
Changes by Eryk Sun : -- components: +Unicode nosy: +ezio.melotti, haypo ___ Python tracker ___

[issue27499] PY_SSIZE_T_CLEAN conflicts with Py_LIMITED_API

2016-07-12 Thread Daniel Holth
Daniel Holth added the comment: Here it is. https://mail.python.org/pipermail/python-3000/2008-November/015344.html On Sat, Nov 22, 2008 at 06:29, Barry Warsaw wrote: > > On Nov 22, 2008, at 4:05 AM, Martin v. Löwis wrote: > >> I just noticed that the Python 3 C API still contains

[issue27498] Regression in repr() of class object

2016-07-12 Thread R. David Murray
Changes by R. David Murray : -- nosy: +rhettinger ___ Python tracker ___ ___

[issue27499] PY_SSIZE_T_CLEAN conflicts with Py_LIMITED_API

2016-07-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: First we should make PY_SSIZE_T_CLEAN mandatory for the term of at least two releases (or to the end of 2.7 support). -- nosy: +serhiy.storchaka ___ Python tracker

[issue27496] unicodedata.name() doesn't have names for control characters

2016-07-12 Thread Zack Weinberg
Zack Weinberg added the comment: It looks to me as if NameAliases.txt is the better reference for the C0 and C1 controls. It matches the UnicodeData.txt field 10 names for most entries where the field 1 name is "", but it has names for U+0080, U+0081, U+0084, and U+0099, which have no field

[issue27485] urllib.splitport -- is it official or not?

2016-07-12 Thread Brett Cannon
Brett Cannon added the comment: Probably a rename is good. Question then becomes whether the old names should raise an DeprecationWarning for a release? -- nosy: +brett.cannon ___ Python tracker

[issue27498] Regression in repr() of class object

2016-07-12 Thread Guido van Rossum
New submission from Guido van Rossum: In Python 3.6, the repr() of a class includes its memory address. This is going to cause a lot of problems for tests in 3rd party code that expects the nice and clean instead of . I understand the desire to provide more clarity in case somehow two

[issue27499] PY_SSIZE_T_CLEAN conflicts with Py_LIMITED_API

2016-07-12 Thread Daniel Holth
New submission from Daniel Holth: When compiling my cryptacular extension https://bitbucket.org/dholth/cryptacular I noticed -DPy_LIMITED_API -DPY_SSIZE_T_CLEAN creates a binary that does not actually use the limited api. This causes segfaults on Linux but does not appear to cause problems on

[issue27497] csv module: Add return value to DictWriter.writeheader

2016-07-12 Thread Zachary Ware
Zachary Ware added the comment: This seems like a reasonable request, but could only be done in 3.6 as it would be a new feature. -- keywords: +easy nosy: +zach.ware stage: -> needs patch versions: -Python 3.5 ___ Python tracker

[issue27492] Enhance bytearray_repr with bytes_repr's logic

2016-07-12 Thread Xiang Zhang
Xiang Zhang added the comment: I considered that too. But I was not sure what code could go into bytes_methods.c then, Python level methods, all common parts or only tp->methods? I'll try to factor the common part out later. -- ___ Python tracker

[issue27497] csv module: Add return value to DictWriter.writeheader

2016-07-12 Thread Logan
New submission from Logan: Currently, DictWriter.writeheader() is defined like: def writeheader(self): header = dict(zip(self.fieldnames, self.fieldnames)) self.writerow(header) It would be useful to have it return the value of writerow(): def writeheader(self):

[issue27496] unicodedata.name() doesn't have names for control characters

2016-07-12 Thread Eryk Sun
Eryk Sun added the comment: Character names are in field 1 of UnicodeData.txt [1][2]. For controls the name is just "". In Tools/unicode/makunicodedata.py, the makeunicodename function skips names that start with "<". Instead of skipping the character, it could fall back on the Unicode 1.0

[issue27495] Pretty printing sorting for set and frozenset instances

2016-07-12 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: +1 It could reasonably be argued that not sorting is a bug for already-released 3.x versions. -- ___ Python tracker

[issue27496] unicodedata.name() doesn't have names for control characters

2016-07-12 Thread R. David Murray
R. David Murray added the comment: That information is programatically generated from data files obtained from the unicode project, as far as I know. -- nosy: +r.david.murray ___ Python tracker

[issue27493] logging module fails with unclear error when supplied a (Posix)Path

2016-07-12 Thread R. David Murray
R. David Murray added the comment: It will be interesting to see how much logging itself needs to be aware of PEP 519 once the support is added to posixpath. ideally, to meet the goals of PEP 519, the answer would be "not at all". @richard: python uses duck typing: if it quacks like a duck,

[issue14977] mailcap does not respect precedence in the presence of wildcards

2016-07-12 Thread R. David Murray
R. David Murray added the comment: I think we need to preserve backward compatibility in the readmailcapfile function even though it isn't technically a public API (make lineno a keyword argument and the behavior dependent on its presence). I haven't experimented with the patch yet, but it

[issue27496] unicodedata.name() doesn't have names for control characters

2016-07-12 Thread Zack Weinberg
New submission from Zack Weinberg: unicodedata.name() doesn't have name information for the C0 and C1 control characters. To see this, run pprint.pprint(["U+{:04X} {}".format(n, unicodedata.name(chr(n), "")) for n in range(256)]) and you will observe printed for U+ through U+001F and

[issue27492] Enhance bytearray_repr with bytes_repr's logic

2016-07-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Bytes and bytearray share a much of code. I think it is possible to share the implementation of reprs. Just add two functions in bytes_methods.c: one counts the size of the repr and determines the quote, and other writes the content of the repr in

[issue27473] bytes_concat seems to check overflow using undefined behaviour

2016-07-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: open -> closed ___ Python tracker ___

[issue27473] bytes_concat seems to check overflow using undefined behaviour

2016-07-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved ___ Python tracker ___

[issue27473] bytes_concat seems to check overflow using undefined behaviour

2016-07-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 130d97217e36 by Serhiy Storchaka in branch '2.7': Issue #27473: Fixed possible integer overflow in str, unicode and bytearray https://hg.python.org/cpython/rev/130d97217e36 -- ___ Python tracker

[issue27495] Pretty printing sorting for set and frozenset instances

2016-07-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka nosy: +rhettinger, serhiy.storchaka type: behavior -> enhancement versions: -Python 3.5 ___ Python tracker

[issue27495] Pretty printing sorting for set and frozenset instances

2016-07-12 Thread SilentGhost
Changes by SilentGhost : -- nosy: +fdrake stage: -> patch review versions: -Python 3.2, Python 3.3, Python 3.4 ___ Python tracker

[issue27493] logging module fails with unclear error when supplied a (Posix)Path

2016-07-12 Thread Vinay Sajip
Vinay Sajip added the comment: > We could possibly add PEP 519 support to the logging module for Python 3.6 Seems like a reasonable enhancement for 3.6. -- stage: -> needs patch type: -> enhancement versions: +Python 3.6 -Python 3.5 ___ Python

[issue26988] Add AutoNumberedEnum to stdlib

2016-07-12 Thread John Hagen
John Hagen added the comment: I like the addition of UniqueEnum. It's the default use case often. -- ___ Python tracker ___

[issue27495] Pretty printing sorting for set and frozenset instances

2016-07-12 Thread Danilo J. S. Bellini
New submission from Danilo J. S. Bellini: The pprint pretty printer in Python 3 sorts sets/frozensets only if their length don't fit in one single line/row for the given width, else it was just leaving repr(my_set_instance) alone, like: >>> import string, pprint >>>

[issue27494] 2to3 parser failure caused by a comma after a generator expression

2016-07-12 Thread John Mark Vandenberg
Changes by John Mark Vandenberg : -- nosy: +jayvdb ___ Python tracker ___ ___

[issue27494] 2to3 parser failure caused by a comma after a generator expression

2016-07-12 Thread Jakub Stasiak
New submission from Jakub Stasiak: Test file (test.py): print(set(x for x in range(2),)) Python runs it nicely: % python2 test.py set([0, 1]) % python3 test.py {0, 1} 2to3 parser (on both Python 2.7.11 and 3.5.2) chokes on it though: %

[issue27493] logging module fails with unclear error when supplied a (Posix)Path

2016-07-12 Thread Richard
Richard added the comment: Yeah, figured as much. But thanks:) I'm kind of new to Python and was having some problems determining whether this is as it should be, or if it should be improved. After all, I could not find any documentation that states what the permitted variable-types are (for

[issue27493] logging module fails with unclear error when supplied a (Posix)Path

2016-07-12 Thread Berker Peksag
Berker Peksag added the comment: logging module doesn't support Path objects. You need to wrap STATUSLOG_PATH = Path('~/logFiles/Reseller/').expanduser() with str(). We could possibly add PEP 519 support to the logging module for Python 3.6. What do you think, Vinay? -- nosy:

[issue27493] logging module fails with unclear error when supplied a (Posix)Path

2016-07-12 Thread Richard
New submission from Richard: No idea if I should be reporting this here, but it came with the default installation, so here goes: On a mac, I supplied a basicConfig object to the logging class that contains a PosixPath instance for the "filename" attribute. consequently, it fails with the

[issue26081] Implement asyncio Future in C to improve performance

2016-07-12 Thread INADA Naoki
INADA Naoki added the comment: > asyncio uses loop.create_future() to create sockets. I'd suggest you to > create two base test classes: one that monkeypatches loop.create_future to > return pure python Future in its setUp method; an another, that makes > create_future to return a C version

[issue27492] Enhance bytearray_repr with bytes_repr's logic

2016-07-12 Thread Xiang Zhang
New submission from Xiang Zhang: Right now bytearray_repr's implementation mimics old string_repr, but it has a drawback: It arbitrarily checks overflow using four times the bytearray object's length, but the representation length of the value can range from 1 to 4. I think we can use

[issue27481] Replace TypeError with ValueError in doc regarding "embedded NUL character"

2016-07-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue27481] Replace TypeError with ValueError in doc regarding "embedded NUL character"

2016-07-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 420030a5e854 by Serhiy Storchaka in branch '3.5': Issue #27481: Docummented that ValueError is now raised instead of TypeError https://hg.python.org/cpython/rev/420030a5e854 New changeset 00b9c734af87 by Serhiy Storchaka in branch 'default': Issue

[issue27481] Replace TypeError with ValueError in doc regarding "embedded NUL character"

2016-07-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. Thanks Xiang. -- ___ Python tracker ___ ___ Python-bugs-list