Berker Peksag added the comment:
+.. note::
I think using a note directive is not necessary here. Also it looks a bit ugly
:) https://dl.dropboxusercontent.com/u/166024/issue17660.png
+.. versionchanged:: 3.5
+ If you are patching builtins in a module then you don't
+
Michael Foord added the comment:
Personally I don't think it looks ugly and that it is a point worth calling
out. Other opinions welcomed.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17660
Éric Araujo added the comment:
I noticed this in the commit; I don’t think the rendered output is really ugly,
but the markup does look strange, as it’s two nested note(-like) directives.
--
___
Python tracker rep...@bugs.python.org
Kushal Das added the comment:
Updated patch with builtins module.
--
versions: +Python 3.4 -Python 3.5
Added file: http://bugs.python.org/file34825/issue17660_v3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17660
Changes by Éric Araujo mer...@netwok.org:
--
versions: +Python 3.5 -Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17660
___
___
Roundup Robot added the comment:
New changeset e457de60028c by Michael Foord in branch 'default':
Closes issue 17660. You no longer need to explicitly pass create=True when
patching builtin names.
http://hg.python.org/cpython/rev/e457de60028c
--
nosy: +python-dev
resolution: - fixed
Éric Araujo added the comment:
Reviewed on Rietveld.
--
nosy: +eric.araujo
stage: needs patch - patch review
versions: +Python 3.5 -Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17660
New submission from Michael Foord:
When patching builtin names (e.g. open) in a specific namespace you need to
specify create=True or patch will refuse to create a name that doesn't exist.
patch could whitelist the builtin names, when the patch target is a module
object, to not require the
Kushal Das added the comment:
Working on this.
--
nosy: +kushaldas
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17660
___
___
Python-bugs-list
Kushal Das added the comment:
Initial patchset along with documentation and tests update.
--
keywords: +patch
Added file: http://bugs.python.org/file29731/issue17660.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17660
Antoine Pitrou added the comment:
To be honest this proposal sounds like a quirk more than a feature to me. If
you only special-case builtins, people will have to remember that special case
and it will make the API more complicated.
--
nosy: +pitrou
Michael Foord added the comment:
I don't think that's a particular issue. In general you only need to use
create=True if a name is *not* available in a namespace.
Builtin names are odd in that you can use them in a namespace even though they
don't exist there - so you have to *remember* to
12 matches
Mail list logo