Nick Coghlan added the comment:
I updated the patch to apply cleanly to the default branch. I also added
several new test cases which uncovered issues with Daniel's previous patch.
Specifically:
- the reverse functions were not be tested properly (added a separate test to
ensure they all
Nick Coghlan added the comment:
With the only remaining issue here being the misbehaviour of the Set and
MutableSet ABCs when dealing with other types (the other issues in Armin's
original report were much simpler and fixed promptly), I'm closing this as a
duplicate of issue 8743 (where I
STINNER Victor added the comment:
time.monotonic() has a bad resolution (15.6 ms) on Windows. To measure
performances, use time.perf_counter() or time.process_time() as proposed in
tome.clock() documentation. It depends if you want to include time elapsed
during sleep. Usually
Eric V. Smith added the comment:
I'd prefer to leave the trailing dots. It's the technically correct thing to do.
And as they say, technically correct is the best kind of correct!
--
title: Add ipaddress property to get name of reverse DNS pointer - Add
ipaddress property to get name
Nick Coghlan added the comment:
I initially missed Mark's suggestion above to avoid the recursive subtraction
operation in __rsub__. v2 of my patch includes that tweak.
--
Added file:
http://bugs.python.org/file33864/issue8743-set-ABC-interoperability_v2.diff
Eric V. Smith added the comment:
The patch looks good to me, save for a versionadded tag in the docs. I've
mentioned it on Rietveld.
Not to get in to bikeshedding on the name, but I'd prefer something with PTR in
the name. I'm an old-timer, and think of these as PTR lookups (because they
Eric V. Smith added the comment:
Or, now that I think about it some more, maybe leave the name as
reverse_pointer and just mention PTR records in the documentation.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20480
Terry J. Reedy added the comment:
I read the manual more carefully and noticed that the guarantee is that
tokenizing the result of untokenize matches the input to untokenize. The
result is guaranteed to tokenize back to match the input so that the conversion
is lossless and round-trips are
Terry J. Reedy added the comment:
I think the problem is with untokenize.
s =bif False:\n\tx=3\n\ty=3\n
t = tokenize(io.BytesIO(s).readline)
for i in t: print(i)
produces a token stream that seems correct.
TokenInfo(type=56 (ENCODING), string='utf-8', start=(0, 0), end=(0, 0), line='')
Larry Hastings added the comment:
In case a little background would help: while developing support for
'__text_signature__' I had to move the test and the from_builtin() call to the
top. It used to be more in the middle-ish. I don't have notes specifically on
why I moved it, but I dimly
Terry J. Reedy added the comment:
The untokenize docstring has a stronger guarantee, and in the direction you
were claiming. Round-trip invariant for full input: Untokenized source will
match input source exactly. For this to be true, the indent strings must be
saved and not replaced by
Stefan Behnel added the comment:
I assumed that anything that had a __text_signature__ wasn't going
to have any other kind of signature information. Therefore, if the
object had a __text_signature__ attribute, then I already knew that's
the best approach and it should definitely be first.
Peter Santoro added the comment:
As requested, I published this for review on
http://code.activestate.com/recipes/578817-lru_timestamp-cache-entry-aging-for-functoolslru_c/
--
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
The _PyCodec_GetIncrementalDecoder name looks too similar to
PyCodec_IncrementalDecoder. It would be better to use more different name.
And please note my minor comments on Rietveld.
--
___
Python tracker
Hendrik added the comment:
Ok, i've got it.
--- a/Lib/http/cookiejar.py Wed Dec 18 15:37:03 2013 -0600
+++ b/Lib/http/cookiejar.py Sat Feb 01 15:12:01 2014 +0100
@@ -11,17 +11,17 @@
distributed with the Python standard library, but are available from
http://wwwsearch.sf.net/):
-
Stefan Behnel added the comment:
Ok, I think I figured it out now.
Essentially, Cython's functions type, despite starting with the same struct
layout as PyCFunction, must not visibly inherit from PyCFunction. Consequently,
inspect.isbuiltin() returns False, as does inspect.isfunction() -
Changes by Steven D'Aprano steve+pyt...@pearwood.info:
--
assignee: - stevenjd
nosy: +stevenjd
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20389
___
Steven D'Aprano added the comment:
Off the top of my head, I can think of three APIs:
(1) separate functions, as Nick suggests:
mean vs weighted_mean, stdev vs weighted_stdev
(2) treat mappings as an implied (value, frequency) pairs
(3) take an additional argument to switch between unweighted
Changes by Steven D'Aprano steve+pyt...@pearwood.info:
--
assignee: - stevenjd
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20478
___
___
Changes by Steven D'Aprano steve+pyt...@pearwood.info:
--
assignee: - stevenjd
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20481
___
___
Serhiy Storchaka added the comment:
The mystery remains why test_tk appears to alternately pass and fail on this
buildbot. I don't see why it doesn't always fail.
test_tk not fails in case when it is just skipped. And why it is sporadic
skipped, this is very interesting question.
Changes by Hendrik hendrik.hoe...@googlemail.com:
--
versions: +Python 3.4 -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2008
___
___
Oscar Benjamin added the comment:
On 2 February 2014 11:55, Steven D'Aprano rep...@bugs.python.org wrote:
(1) separate functions, as Nick suggests:
mean vs weighted_mean, stdev vs weighted_stdev
This would be my preferred approach. It makes it very clear which
functions are available for
Oscar Benjamin added the comment:
Wolfgang have you tested this with any third party numeric types from
sympy, gmpy2, mpmath etc.?
Last I checked no third party types implement the numbers ABCs e.g.:
import sympy, numbers
r = sympy.Rational(1, 2)
r
1/2
isinstance(r, numbers.Rational)
False
Serhiy Storchaka added the comment:
No JSON object could be decoded, expecting value is too expensive and second
part of this message just repeat first part. The message can be shortened to
No JSON object could be decoded. But this is not fully correct. JSON term
object corresponds to Python
Antoine Pitrou added the comment:
I'd prefer to leave the trailing dots. It's the technically correct thing to
do.
It depends what we're talking about. Hostnames (in the general sense)
don't carry a trailing dot except in DNS queries. So I'd argue the
trailing dot is more part of the DNS
Antoine Pitrou added the comment:
To me new error messages look more informative and more correct.
Yes, I agree with you.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20453
___
Leon Weber added the comment:
I’ve changed the wording in the documentation a bit and added an explanatory
sentence, how about this?
I think this should make pretty clear what it does and does not, and also easy
to find in the documentation when searching for “reverse”, “PTR” and “pointer”
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: -serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20311
___
___
Leon Weber added the comment:
As for what the host command does, it doesn't add any trailing dots
here:
Oh, interesting. It does on Fedora 19 with version 9.9.3, but not on my Ubuntu
installation with version 9.8.1. So it seems this was added between 9.8.1 and
9.9.3.
--
Serhiy Storchaka added the comment:
What about other TextIOWrapper parameters? I think newline should be changed
in same cases as encoding and errors. And changing buffering and
line_buffering can be useful too.
What if add the configure or reopen method which accepts all this
parameters?
Antoine Pitrou added the comment:
Oh, interesting. It does on Fedora 19 with version 9.9.3, but not on
my Ubuntu installation with version 9.8.1. So it seems this was added
between 9.8.1 and 9.9.3.
According to apt-cache, the version I tried with is
1:9.9.3.dfsg.P2-4ubuntu1
--
Serhiy Storchaka added the comment:
I think Raymond's original concern still applies: The macros do add to the
learning curve.
I agree. But alternative solution is Victor's original patch which replaces
potential bugs by inlined body of Py_REPLACE/Py_XREPLACE. This is explicit, but
more
Serhiy Storchaka added the comment:
See also issue18844.
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20479
___
___
Leon Weber added the comment:
According to apt-cache, the version I tried with is
1:9.9.3.dfsg.P2-4ubuntu1
Ok, then it depends on something else apparently. It’s not so relevant anyway
because even with the trailing dot, “host” is inconsistent between IPv4 and
IPv6, and we should choose a
Antoine Pitrou added the comment:
Well that convention is also used in existing APIs:
socket.gethostbyaddr(8.8.8.8)
('google-public-dns-a.google.com', [], ['8.8.8.8'])
(note that this merely reflects a POSIX API)
--
___
Python tracker
New submission from Suzumizaki:
Currently, the name of .pyd modules is limited within 7 bit US-ASCII.
I want to do import X to import X.pyd, where X contains Unicode characters.
I tried to make the patch and my work seems to be done successfully.
I will post the patch with this issue, and next
Changes by Suzumizaki suzumiz...@free.japandesign.ne.jp:
Added file:
http://bugs.python.org/file33867/20140202_patch_for_python3.3_4.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20485
Serhiy Storchaka added the comment:
I think set operations with iterable (but not set) should be tested.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8743
___
Changes by Suzumizaki suzumiz...@free.japandesign.ne.jp:
Added file: http://bugs.python.org/file33868/sample_importing_non_ascii_pyd.zip
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20485
___
Saimadhav Heblikar added the comment:
Patch fixes the mistake.
Looks like it was copied over from earlier version.
--
keywords: +patch
nosy: +sahutd
Added file: http://bugs.python.org/file33869/issue20466.patch
___
Python tracker
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +brett.cannon, eric.snow, haypo, ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20485
___
Jeremy Kloth added the comment:
Issue #16779 has a patch that suppresses the warning for 64-bit builds that
would also fix #9709.
--
nosy: +jkloth
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20166
New submission from Игорь Шаула:
In Python 2.7.6 can't find any way to close MSI database after finish working
with it.
As a result database is locked and can't be opened by any other application
until Python process is finished.
import msilib
db = msilib.OpenDatabase('test.msi',
New submission from INADA Naoki:
http://docs.python.org/3.3/library/unittest.mock.html#magic-mock
The two equality method, __eq__ and __ne__, are special. They do the default
equality comparison on identity, using a side effect, unless you change their
return value to return something
New submission from R. David Murray:
Now that importlib *is* the import system in CPython, the title (An
Implementation of import) and the intro (a reference implementation that is
easier to comprehend than... seem to me like they are out of date and should
be reworded.
--
assignee:
Eric V. Smith added the comment:
I concede the point on the trailing dot.
The reason we used to always use it is that it prevented the local resolver
from first trying to append the host's default domain name (as, for example,
defined in /etc/resolv.conf as search). I have no idea if
Eric V. Smith added the comment:
The documentation change looks good to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20480
___
___
Lars Gustäbel added the comment:
I had the following idea: What about a separate class, let's call it
TarVolumeSet for now, that maps a set of (virtual) volumes onto one big
file-like object. This TarVolumeSet will be passed to a TarFile constructor as
the fileobj argument. It is subclassable
Serhiy Storchaka added the comment:
I think that if you need a module with non-ASCII name, you can wrap it in
Python module.
=== späm.py ===
from _spam import *
from _spam import __all__, __doc__
=== späm.py ===
--
nosy: +serhiy.storchaka
___
Nadeem Vawda added the comment:
After some consideration, I've come to agree with Serhiy that it would be better
to keep a private internal buffer, rather than having the user manage unconsumed
input data. I'm also in favor of having a flag to indicate whether the
decompressor needs more input
Leon Weber added the comment:
I can live without the trailing dot, although I’d find it “more correct” to
have it.
I’ve attached an alternative patch that doesn’t return a trailing dot, it’s up
to you guys to decide which one you prefer.
--
Added file:
Changes by Stefan Krah stefan-use...@bytereef.org:
--
assignee: eric.araujo -
resolution: duplicate -
stage: committed/rejected - needs patch
status: closed - open
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16779
Changes by Stefan Krah stefan-use...@bytereef.org:
--
stage: needs patch - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16779
___
New submission from Serhiy Storchaka:
import zlib
d = zlib.decompressobj()
d
zlib.Decompress object at 0xb70a9288
c = zlib.compressobj()
c
zlib.Compress object at 0xb6f85ac8
zlib.DEF_BUF_SIZE
16384
zlib.Z_FINISH
4
help(c)
Traceback (most recent call last):
File
Amaury Forgeot d'Arc added the comment:
I'd use a much simpler encoding.
Maybe something like
name.encode('unicode-escape').replace(b'\\', b'_')
As you said, simplicity is important for tools which generate code!
--
nosy: +amaury.forgeotdarc
___
Yury Selivanov added the comment:
Stefan,
inspect.isbuiltin() returns False
Are you absolutely sure about this? Please check that everything works with
this latest change http://hg.python.org/cpython/rev/48c3c42e3e5c
--
___
Python tracker
Yury Selivanov added the comment:
Larry,
Also, I assumed that anything that had a __text_signature__ wasn't going to
have any other kind of signature information. Therefore, if the object had a
__text_signature__ attribute, then I already knew that's the best approach
and it should
Yury Selivanov added the comment:
Larry,
Quoting your reply from #17159:
Also also, I remember specifically that the isinstance(type) code would fail
builtin classes.
Could you please find an example of this?
--
___
Python tracker
New submission from Ram Rachum:
If there's a circular import in my program, I don't want to see an error
message, Cannot import name 'foo' and then say in my mind, ah, I'm an
experienced Python developer, I know that when Python says that it often means
that there's a circular import problem.
Changes by Yury Selivanov yselivanov...@gmail.com:
--
nosy: +brett.cannon
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20490
___
___
Changes by Yury Selivanov yselivanov...@gmail.com:
--
nosy: +yselivanov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20490
___
___
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20490
___
___
Michael Foord added the comment:
A side effect is a mechanism Mock provides for mocks to have special
behaviour when called.
http://docs.python.org/3.3/library/unittest.mock.html#unittest.mock.Mock.side_effect
The term is used very widely throughout the mock documentation, so I don't
think
STINNER Victor added the comment:
Buildbots are happy, I close the issue.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20311
___
Roundup Robot added the comment:
New changeset 767d034b3feb by Benjamin Peterson in branch '2.7':
use with statement to ensure zipfile is always closed (closes #20102)
http://hg.python.org/cpython/rev/767d034b3feb
New changeset 838674d15b5b by Benjamin Peterson in branch '3.3':
use with
Serhiy Storchaka added the comment:
Thank you Ned for your great investigation.
Here is a patch for these two bugs.
A test for invalid bitmap is skipped (also added a test for bitmap specified in
external file). For insertborderwidth tests the insertwidth value is explicitly
increased (yes,
Serhiy Storchaka added the comment:
If there are no objections I'll commit this patch tomorrow.
--
assignee: - serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20350
___
Serhiy Storchaka added the comment:
If there are no objections I'll commit this patch tomorrow.
--
assignee: - serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20368
___
New submission from Kaarle Ritvanen:
The textwrap module does not distinguish non-breaking space (\xa0) from other
whitespace when determining word boundaries.
In the beginning of the module, the _whitespace variable is defined to address
this issue but is not used in the regular expressions
Serhiy Storchaka added the comment:
Larry, what would you say about os.open() error?
--
nosy: +larry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20384
___
New submission from Benjamin Peterson:
http://buildbot.python.org/all/builders/x86%20Windows%20Server%202003%20%5BSB%5D%202.7/builds/833/steps/test/logs/stdio
--
assignee: serhiy.storchaka
messages: 210014
nosy: benjamin.peterson, serhiy.storchaka
priority: normal
severity: normal
Serhiy Storchaka added the comment:
Larry, are you agree with this solution (remove ambiguous filename attribute
from OSError raised by functions with two filename arguments)?
--
___
Python tracker rep...@bugs.python.org
Roundup Robot added the comment:
New changeset 515e6afd2f0f by Serhiy Storchaka in branch '2.7':
Issue #19320: Fixed split/splitlist tests in test_tcl for Tcl 8.5.0-8.5.5.
http://hg.python.org/cpython/rev/515e6afd2f0f
New changeset e6363a42a9f0 by Serhiy Storchaka in branch '3.3':
Issue #19320:
Serhiy Storchaka added the comment:
Thank you Benjamin, I just have fixed it in issue19320.
--
resolution: - duplicate
stage: - committed/rejected
status: open - closed
superseder: - Tkinter tests ran with wantobjects is false
___
Python tracker
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +georg.brandl, serhiy.storchaka
stage: - test needed
versions: +Python 2.7 -Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20491
Antoine Pitrou added the comment:
It's a bug in _pyio.StringIO.getvalue(). Attaching patch.
--
keywords: +patch
Added file: http://bugs.python.org/file33873/stringio_getvalue.patch
___
Python tracker rep...@bugs.python.org
Nikolaus Rath added the comment:
The attached patch now passes all testcases.
However, every invocation of set_encoding() when there is buffered data leaks
one reference. I haven't been able to find the error yet.
As for adding a reopen() or configure() method: I don't like it very much, but
Roundup Robot added the comment:
New changeset 82cfab2ad98d by Antoine Pitrou in branch '3.3':
Issue #20423: fix documentation of io.StringIO's newline parameter
http://hg.python.org/cpython/rev/82cfab2ad98d
New changeset 69a2cc048c80 by Antoine Pitrou in branch '2.7':
Issue #20423: fix
Antoine Pitrou added the comment:
The docs are now fixed, thank you!
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20423
Charles-François Natali added the comment:
Well, now that timeouts are properly rounded, the granularity is useless.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20311
___
STINNER Victor added the comment:
Well, now that timeouts are properly rounded, the granularity is useless.
I don't think so. Please read again the issue #20452, for example this message:
http://bugs.python.org/issue20452#msg209772
--
___
Python
STINNER Victor added the comment:
Buildbots are happy, I close the issue.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20452
___
Antoine Pitrou added the comment:
Thanks for the patch, Kaarle. Could you add some tests in
Lib/test/test_textwrap?
Also, for your contribution to be integrated, we'll need you to sign a
contributor's agreement: http://www.python.org/psf/contrib/contrib-form/
--
nosy: +pitrou
Roundup Robot added the comment:
New changeset e2d013e90e88 by Ned Deily in branch '2.7':
Issue #19990: Install test/imghdrdata.
http://hg.python.org/cpython/rev/e2d013e90e88
New changeset 5fbe155e62b0 by Ned Deily in branch '3.3':
Issue #19990: Install test/imghdrdata.
Serhiy Storchaka added the comment:
I rather think that it's a bug in _io.StringIO.getvalue().
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20435
___
Charles-François Natali added the comment:
I don't think so. Please read again the issue #20452, for example this
message:
http://bugs.python.org/issue20452#msg209772
Ok, it looks better: waiting 99.9 ms took 99.6 ms and 99.9 ms, and waiting
9.9 ms took 9.7 ms. So as I said, the granularity
Wolfgang Maier added the comment:
Hi Oscar,
well, I haven't used sympy much, and I have no experience with the others, but
in light of your comment I quickly checked sympy and gmpy2.
You are right about them still not using the numbers ABCs, however, on your
advise I also checked how the
Antoine Pitrou added the comment:
With the patch, getvalue() is consistent with read() and other methods.
Without the patch, _pyio.StringIO.getvalue() returns a different value from
_pyio.StringIO.read() *and* from _io.StringIO.getvalue().
Changing _pyio.StringIO.getvalue() is the path of least
Ned Deily added the comment:
The supplied patch fixed all of the failing test cases on OS X, tested on 3.3
and default with Cocoa Tk 8.5 8.6, Carbon Tk 8.4, and X11 Tk 8.6. I'll test
on 2.7 after the modified patch is applied. Thanks, Serhiy!
--
stage: patch review - commit review
Antoine Pitrou added the comment:
In other words, the bug is that _pyio.StringIO.getvalue() doesn't do any
newline conversion; the patch fixes that.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20435
STINNER Victor added the comment:
Once again: a slight early wakeup isn't an issue
That's your opinion, but I disagree.
Please open a new issue with a patch, or reopen at least this issue because it
is now closed.
I already spent to much time on this issue. Buildbots are now happy, I don't
STINNER Victor added the comment:
The problem with pystone is that such tool is used to compare performances
between different versions of Python. If pystone uses a different clock in
Python 3.4, you may not be able to compare compare results with older Python
versions.
In my opinion, such
STINNER Victor added the comment:
Here is a patch to skip the tests for SelectSelector on Mac OS X older than
10.6 (Snow Leopard).
@Ned: Could you please try it? I don't have access to such old Mac OS X
versions. (I now only have a iMac running 10.9).
--
keywords: +patch
Added file:
Changes by STINNER Victor victor.stin...@gmail.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20455
___
STINNER Victor added the comment:
Cool, the tests are no more crashing on this buildbot. I close the issue.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20470
Wolfgang Maier added the comment:
-Ursprüngliche Nachricht-
Von: Steven D'Aprano [mailto:rep...@bugs.python.org]
Gesendet: Sonntag, 2. Februar 2014 12:55
An: wolfgang.ma...@biologie.uni-freiburg.de
Betreff: [issue20479] Efficiently support weight/frequency mappings in the
Serhiy Storchaka added the comment:
But how then other values of newline except '\n' can be useful?
The problem is that newline converting is applied twice, in write() and in
read(). When constructor uses write() and getvalue() returns same value as
read(), we have no chance to get newlines
Charles-François Natali added the comment:
Once again: a slight early wakeup isn't an issue
That's your opinion, but I disagree.
Please open a new issue with a patch, or reopen at least this issue because
it is now closed.
I already spent to much time on this issue. Buildbots are now
Paul Sokolovsky added the comment:
The problem with pystone is that such tool is used to compare performances
between different versions of Python.
That's why I just propose to switch it to time.time(), which surely is
available on each and every Python version and implementation. If
1 - 100 of 152 matches
Mail list logo