Ezio Melotti added the comment:
We discussed about this on IRC, and I'll try to summarize the outcomes.
If we want devs to run doctests, the syntax should be as simple as possible,
ideally there shouldn't be any extra syntax -- at least for the common case.
Note that there are two kind of
Changes by Mike Hoy mho...@gmail.com:
--
nosy: +mikehoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11643
___
___
Python-bugs-list mailing list
Mike Hoy added the comment:
So we could fix this in reverse? Remove the |version| and replace them with X.Y
since |version| doesn't expand within :file:?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11643
Chris Jerdonek added the comment:
Eric, it looks like you wrote this comment:
/* don't define FORMAT_LONG, FORMAT_FLOAT, and FORMAT_COMPLEX, since
we can live with only the string versions of those. The builtin
format() will convert them to unicode. */
in
Chris Jerdonek added the comment:
See this code comment:
/* don't define FORMAT_LONG, FORMAT_FLOAT, and FORMAT_COMPLEX, since
we can live with only the string versions of those. The builtin
format() will convert them to unicode. */
from
Ronald Oussoren added the comment:
I don't think this is a bugfix, but a new feature and as such the behavior
should only be changed for 3.4.
The easiest workaround for this issue is to use setuptools or distribute when
installing, as those tools do set the various build directories to
Roundup Robot added the comment:
New changeset de6976fe19aa by Ezio Melotti in branch '2.7':
#11643: fix rst markup error in site.rst.
http://hg.python.org/cpython/rev/de6976fe19aa
New changeset 7aca2781c381 by Ezio Melotti in branch '3.2':
#11643: fix rst markup error in site.rst.
Ezio Melotti added the comment:
I fixed the one in site.py.
If there's no way to use |version| in :file:`...` I think using {X.Y} is OK, so
that can be done where a bare X.Y (without {}) is currently used.
--
___
Python tracker
New submission from Serhiy Storchaka:
The declaration of some fields in the PyTypeObject documentation does not match
the sources. Here is a patch that fixes the mismatch.
--
assignee: docs@python
components: Documentation
files: doc_newtypes.patch
keywords: easy, patch
messages:
New submission from Serhiy Storchaka:
The wcsxfrm() function may fail but there is no error check code.
I don't know what exception type should be used here: OSError with an errno
EINVAL or some specialized type. I can't prepare tests, because I don't know
under what conditions it would be
Christian Heimes added the comment:
Have you tried code points beyond the BMP?
The C function doesn't have a return value that signals an error. An explicit
check of errno is required. http://linux.die.net/man/3/wcsxfrm
--
nosy: +christian.heimes
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +benj
resolution: fixed -
stage: committed/rejected - patch review
status: closed - open
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15921
Changes by Jesús Cea Avión j...@jcea.es:
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15921
___
Martin v. Löwis added the comment:
I disagree that sizeof cannot work well for variable-sized types. It works very
well for strings, lists, tuple, dicts, and other regular containers. I agree
that it is not important that it is absolutely correct (in some sense) for
every object, but it
Serhiy Storchaka added the comment:
Here is a sample patch (to specify the location of the issue). I don't sure
OSError is well here.
As far as I understand, this function is Windows-specific, so I can't check how
it works with code points beyond the BMP or with surrogates.
--
Christian Heimes added the comment:
The patch looks good. `s` and `buf` are cleaned up after the exit label.
--
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15954
___
Ezio Melotti added the comment:
+ try:
+... urllib.request.urlopen(req)
+... except urllib.error.URLError as e:
+...print(Error opening url.)
+...# E.g. [Errno 8] nodename nor servname provided, or not known
+...print(Reason:, e.reason) #doctest:
New submission from Christian Heimes:
The gzip, bz2 and lzma file reader have no method to get the actual size and
compression ratio of a compressed file. In my opinion it's useful to know how
much disk space a file will need before it's decompressed.
--
components: Library (Lib)
Serhiy Storchaka added the comment:
It can't work well if we count internal Python objects that can be shared. This
is because the work well concept is not well defined. And because the
implementation of a certain defined calculation algorithm can be completely
unmaintainable, that is not
Antoine Pitrou added the comment:
I think I'm -1 to run doctests as part of regrtest. Documentation examples are
meant to be read, not executed: it is fine for them to omit unimportant
information or trivial boilerplate (such as imports).
Any complication in the way doc examples must be
Martin v. Löwis added the comment:
I don't know what exception type should be used here:
OSError with an errno EINVAL or some specialized type.
No, I think the appropriate error is ValueError, at least if errno is EINVAL.
because I don't know under what conditions it would be possible
Ezio Melotti added the comment:
Documentation examples are meant to be read, not executed
I agree, but several of them already run, and others run with the addition of
doctests directives (that are hidden in the html output). If the code needs to
be changed in a way that is less readable,
Eric V. Smith added the comment:
I believe the conversion is happening in Objects/abstract.c in PyObject_Format,
around line 864, near this comment:
/* Convert to unicode, if needed. Required if spec is unicode
and result is str */
I think changing the docs will result in more
Martin v. Löwis added the comment:
Am 17.09.2012 14:26, schrieb Serhiy Storchaka:
I would personally prefer if the computations where done in
Py_ssize_t, not PyObject*
I too. But on platforms with 64-bit pointers and 32-bit sizes we can
allocate total more than PY_SIZE_MAX bytes (hey, I
New submission from Steve Newcomb:
The '\\gstartquote' in the below does not work:
repr( re.compile( '!ENTITY[ \\011\\012\\015]+\\%[
\\011\\012\\015]*(?PentityName[A-Za-z][A-Za-z0-9\\.\\-\\_\\:]*)[
\\011\\012\\015]*(?Pstartquote[\\042\\047])(?PentityText.+?)\\gstartquote[
Michael Foord added the comment:
Why would mock.patch.object be the appropriate one to add to TestCase?
patch.object is used orders of magnitude less than patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11664
Éric Araujo added the comment:
Okay, then it’s distutils2 material.
--
components: -Distutils
title: distutils: build should use a version-specific build directory -
distutils2: build should use a version-specific build directory
versions: +3rd party, Python 3.4 -Python 2.7, Python
Éric Araujo added the comment:
A doc note for distutils in stable versions could also be added.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15419
___
Meador Inge added the comment:
Unassigning from myself. I thought I would have more time to review and push
this through.
--
assignee: meador.inge -
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15475
Amaury Forgeot d'Arc added the comment:
\g is meant to be used in re.sub(), in the replacement text (see the docs); in
the search pattern, (?P=startquote) can be used to refer to a named group.
The docs of (?Pname...) looks clear to me.
--
nosy: +amaury.forgeotdarc
resolution: -
Éric Araujo added the comment:
You thought it was better not to mention that pipes.quote is semi-official and
becomes public as shlex.quote in 3.3?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14616
R. David Murray added the comment:
I've given this some more thought, and I'm leaning toward Antoine's POV here.
The point of running the doctests in the docs is not to test python, but to
test the docs. Sphinx has a facility to do that: make doctest. So I think it
is better to use that
Antoine Pitrou added the comment:
I think we should be moving *away* from having special infrastructure
in regrtest. As much stuff as makes sense should be moved to
unittest, and we've been slowly doing that. Correspondingly, we
should use Sphinx's native test facilities, not add special
Éric Araujo added the comment:
RDM’s arguments make a lot of sense.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15629
___
___
R. David Murray added the comment:
We should improve the unittest help, then :) I will also note that the couple
of times I tried it I couldn't figure out how to use the regrtest test
selection :)
What we probably need for regrtest is a way to pass through a selection
string from the
Brett Cannon added the comment:
I should mention that http://bugs.python.org/issue10967 exists as a meta issue
about trying to gut regrtest in favour of using other things in unittest (and
doctest in this case) when possible.
--
___
Python tracker
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10044
___
___
Python-bugs-list
Changes by Serhiy Storchaka storch...@gmail.com:
--
components: +Interpreter Core
nosy: +storchaka
versions: +Python 3.4 -Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10044
___
New submission from Cliff Dyer:
The README.txt file for distutils2 points to
http://wiki.python.org/Distutils2/Contributing, which raises a 404. The
correct URL is http://wiki.python.org/moin/Distutils2/Contributing. The
attached patch fixes this typo.
--
assignee: docs@python
Antoine Pitrou added the comment:
Opened issue15958 for the bytes.join enhancement.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15945
___
___
New submission from Antoine Pitrou:
This should ideally succeed:
b''.join([memoryview(b'foo'), b'bar'])
Traceback (most recent call last):
File stdin, line 1, in module
TypeError: sequence item 0: expected bytes, memoryview found
(ditto for bytearray.join)
--
components:
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15958
___
___
Python-bugs-list
Antoine Pitrou added the comment:
Perhaps the three new macros should be made available in a .h file?
(in which case they should be private, i.e. start with _).
--
type: security - behavior
versions: +Python 3.4 -Python 3.3
___
Python tracker
New submission from Serhiy Storchaka:
In Objects/longobject.c quick_int_allocs and quick_neg_int_allocs defined as
int but in Objects/object.c they are declared and used as Py_ssize_t.
Here is a patch that fixes this mismatch.
See also issue4850.
--
components: Interpreter Core
Christian Heimes added the comment:
The patch looks good. IMO it can safely be applied as it fixes a rarely used
debug feature.
--
nosy: +christian.heimes
stage: - patch review
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
Perhaps the three new macros should be made available in a .h file?
(in which case they should be private, i.e. start with _).
Perhaps. There are similar macros in other files (Include/objimpl.h,
Objects/obmalloc.c, Python/pyarena.c,
Richard Oudkerk added the comment:
New patch which checks the refcount of the memoryview and bytes object after
calling readinto().
If either refcount is larger than the expected value of 1, then the data is
copied rather than resized.
--
Added file:
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15950
___
___
Python-bugs-list mailing list
Daniel Wagner-Hall added the comment:
Is anything blocking this patch's submission?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15836
___
___
Arfrever Frehtes Taifersar Arahesis added the comment:
I think that email.utils.parsedate_to_datetime(0) should raise ValueError
instead of TypeError.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15925
Changes by Serhiy Storchaka storch...@gmail.com:
--
components: +IO, Library (Lib)
type: - performance
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15903
___
Antoine Pitrou added the comment:
If either refcount is larger than the expected value of 1, then the
data is copied rather than resized.
I think that's a useless precaution. The bytes object cannot leak since you
are using PyMemoryView_FromMemory(), which doesn't know about the original
Richard Oudkerk added the comment:
I think that's a useless precaution. The bytes object cannot leak
since you are using PyMemoryView_FromMemory(), which doesn't know about
the original object.
The bytes object cannot leak so, as you say, checking that refcount is
pointless. But the view
Antoine Pitrou added the comment:
The bytes object cannot leak so, as you say, checking that refcount
is pointless. But the view might leak, and since it does not own a
reference to the base object we have a problem: we can't deallocate the
bytes object for fear of breaking the view.
Changes by R. David Murray rdmur...@bitdance.com:
--
stage: - committed/rejected
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8542
___
___
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12849
___
___
Python-bugs-list mailing list
Steve Newcomb added the comment:
I have re-read the documentation on re.sub(). Even now, now that I understand
that the \ggroupname syntax applies to the repl argument only, I cannot see
how the documentation can be understood that way. The paragraph in which the
explanation of the
Trent Nelson added the comment:
Just noticed that the Solaris 10 slave is failing in the same way:
==
FAIL: test_utime (test.test_os.StatAttributeTests)
--
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15958
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15945
___
Roundup Robot added the comment:
New changeset 210a189544c3 by Ezio Melotti in branch '2.7':
#15796: Fix \n in readline docstring.
http://hg.python.org/cpython/rev/210a189544c3
New changeset 6386e1f4f1fd by Ezio Melotti in branch '3.2':
#15796: Fix \n in readline docstring. Patch by Serhiy
Ezio Melotti added the comment:
Pong, thanks for the patch!
--
assignee: docs@python - ezio.melotti
nosy: +ezio.melotti
resolution: - fixed
stage: - committed/rejected
status: open - closed
type: - enhancement
___
Python tracker
Ezio Melotti added the comment:
I experimented a bit more with text-overflow: ellipsis; but didn't obtain
anything good. With word-wrap: break-word; I had better luck, and even if
breaking long words might not be the most elegant solution, it looks better
than the overflowing text and
Changes by Ezio Melotti ezio.melo...@gmail.com:
Added file: http://bugs.python.org/file27213/issue4711.png
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4711
___
64 matches
Mail list logo