R. David Murray added the comment:
This is the documented behavior. qsize: Return the approximate size of the
queue. Note, qsize() 0 doesn't guarantee that a subsequent get() will not
block, nor will qsize() maxsize guarantee that put() will not block.
It looks like what you want here is
Serhiy Storchaka added the comment:
I can propose two ways to fix this:
s = unicode.__getslice__(s, 0, unicode.__len__(s))
and
s = unicode.__getitem__(s, slice(None))
--
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
Just len() doesn't work when the subclass overrides __len__.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23583
___
STINNER Victor added the comment:
random-2.patch: updated patch (I don't understand why random.patch doesn't
apply cleanly).
--
Added file: http://bugs.python.org/file38330/random-2.patch
___
Python tracker rep...@bugs.python.org
STINNER Victor added the comment:
Would be nice to have a test for it;
There are already some tests on EINTR in test_file_eintr and test_subprocess
(test_communicate_eintr()).
--
___
Python tracker rep...@bugs.python.org
Larry Hastings added the comment:
In your sample output we still get two #ifndef SPAM_METHODDEF stanzas.
Wouldn't it be better to only have one?
Maybe Clinic needs to be smarter about generating those anyway. Let me think
about it.
--
___
Python
Roundup Robot added the comment:
New changeset cad6eac598ec by Victor Stinner in branch 'default':
Issue #23285: Fix handling of EINTR in fileio.c
https://hg.python.org/cpython/rev/cad6eac598ec
--
___
Python tracker rep...@bugs.python.org
Martijn Pieters added the comment:
I like the unicode.__getitem__(s, slice(None)) approach, it has the advantage
of not having to rely on len(s).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23583
Matt Mackall added the comment:
Changeset 26ec62 regressed Mercurial.
http://bz.selenic.com/show_bug.cgi?id=4557
Before:
ntpath.join(r'\\foo\bar\baz', '')
'foo\\bar\\baz\\'
ntpath.join(r'\\foo\bar', '')
'foo\\bar\\'
After:
ntpath.join(r'\\foo\bar\baz', '')
'foo\\bar\\baz\\'
Roberto Martínez added the comment:
I think you misunderstood my explanation. My english is not very good, sorry.
I think that my previously attached file (mpqueuegetwrong.py) shows it better
than my words. In this file you can see that I am not calling qsize nor
get_nowait, only put and get.
Changes by Carlo Beccarini hackdiablo...@gmail.com:
Removed file: http://bugs.python.org/file38307/functions.rst
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23512
___
Antoine Pitrou added the comment:
This is now fixed in all branches. Thanks for the report!
--
resolution: - fixed
stage: - resolved
status: open - closed
versions: +Python 2.7
___
Python tracker rep...@bugs.python.org
Roundup Robot added the comment:
New changeset 371cf371a6a1 by Antoine Pitrou in branch '2.7':
Issue #23576: Avoid stalling in SSL reads when EOF has been reached in the SSL
layer but the underlying connection hasn't been closed.
https://hg.python.org/cpython/rev/371cf371a6a1
--
nosy:
Roberto Martínez added the comment:
That's not my point.
To my understanding, when you put a item in the queue the item *must* be
available to get in the next call. So I think put should block until the item
is really in the queue so when you call get it return *always* and not some
times
Terry J. Reedy added the comment:
I don't see what you have in mind. Translating my example
class S(str):
def __str__(self):
return 'S: ' + str.__str__(self)
to
class U(unicode):
def __unicode__(self):
return u'U: ' + unicode.__unicode__(self)
does not work because
David Wilson added the comment:
Hi Piotr,
There wasn't an obvious fix that didn't involve changing the buffer interface
itself. There is presently ambiguity in the interface regarding the difference
between a read only buffer and an immutable buffer, which is crucial for
its use in this
New submission from John Beck:
Issue 8473 fixed a problem with lineendings in test_doctest, but it
appears not to work in verbose mode. Adding verbose=False to the
doctest.testfile() invocations in test_lineendings() fixes this.
Attaching a patch to fix this for both 2.7 and 3.4.
--
Piotr Dobrogost added the comment:
This new patch abandons the buffer interface and specializes for Bytes per
the comments on this issue.
Why does it abandon buffer interface? Because of the following?
Thanks for digging here. As much as I'd love to follow this interpretation,
it simply
Terry J. Reedy added the comment:
What about just 's = unicode(s)'? The doc says
object.__unicode__(self)
Called to implement unicode() built-in; should return a Unicode object.
When this method is not defined, string conversion is attempted, and the result
of string conversion is
Roundup Robot added the comment:
New changeset 01cf9ce75eda by Antoine Pitrou in branch '3.4':
Issue #23576: Avoid stalling in SSL reads when EOF has been reached in the SSL
layer but the underlying connection hasn't been closed.
https://hg.python.org/cpython/rev/01cf9ce75eda
New changeset
Serhiy Storchaka added the comment:
See example in msg205740. The same works with overridden __unicode__.
I'm writing tests now.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23583
___
R. David Murray added the comment:
You are calling q.empty when draining the queue. That has the same documented
caution. Since you are using get in that loop, in that case you *want* to be
calling qsize, just like you do when you drain it at the end.
--
Yassine ABOUKIR added the comment:
Following the syntax specifications in RFC 1808, urlparse recognizes a netloc
only if it is properly introduced by ‘//’. Otherwise the input is presumed to
be
a relative URL and thus to start with a path component.
Serhiy Storchaka added the comment:
Actually in this sample output no one #ifndef SPAM_METHODDEF stanza is needed,
because SPAM_METHODDEF is defined in any case.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23500
Cyd Haselton added the comment:
Ryan,
I believe I've gotten all non-configure dependent commits in.
How do you want me to handle post-configure edits I;ve made to get Python
working (i.e. changes to pyconfig.h, Modules/Setup...)
--
___
Python
Ryan Gonzalez added the comment:
Cyd:
What exactly do you mean by post-configure edits?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
Ryan Gonzalez added the comment:
Cyd:
Don't upload them. Git won't even let you add pyconfig.h; running `git add
PC/pyconfig.h` won't say anything, but running `git status` will show that it
did not do anything.
--
___
Python tracker
Robert Collins added the comment:
Ok, cgitb - its passing a string instead of an exception type into
format_exception - something that was never supported - it only works by
accident AFAICT, because the old format code was ignoring the etype - it was
deriving the type from the value. Thats
STINNER Victor added the comment:
See also:
https://code.google.com/p/tulip/issues/detail?id=155
https://code.google.com/p/tulip/issues/detail?id=42
http://bugs.python.org/issue17911
--
___
Python tracker rep...@bugs.python.org
Ned Deily added the comment:
Much better, thanks!
--
priority: critical - normal
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17911
___
___
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +berker.peksag
stage: needs patch - patch review
versions: +Python 3.5 -Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19771
New submission from Robert Collins:
make patchcheck depends on the interpreter and modules being built to work
correctly but the make target doesn't have this expressed. This simple patch
will fix it and adds well under a second of latency for me.
cpython.hg$ make patchcheck
./python
Guido van Rossum added the comment:
Looking for code reviewers!
--
stage: - patch review
type: - enhancement
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22906
___
Roundup Robot added the comment:
New changeset 7cea10917f40 by Robert Collins in branch 'default':
Fix brownbag in issue 17911 commit
https://hg.python.org/cpython/rev/7cea10917f40
--
___
Python tracker rep...@bugs.python.org
Robert Collins added the comment:
Thats really strange, I did a ./python -m test run before committing - the
brown bag was due to me running with the patch for 22936 also applied. Looking
into the failures reported now.
--
___
Python tracker
Robert Collins added the comment:
Fixes for buildbots.
--
Added file: http://bugs.python.org/file38335/issue-19711-8.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17911
___
STINNER Victor added the comment:
There are failures on buildbot.
http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%203.x/builds/5651/steps/test/logs/stdio
http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/5783/steps/test/logs/stdio
STINNER Victor added the comment:
By the way, Robert Collins proposed the following change in part of #17911, but
it was removed in the final change because asyncio must support Python 3.4 (and
3.3):
diff --git a/Lib/asyncio/events.py b/Lib/asyncio/events.py
index 01320cd..08740aa 100644
---
Changes by Donald Stufft don...@stufft.io:
--
keywords: +needs review
resolution: not a bug -
stage: resolved - patch review
status: closed - open
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23476
Changes by Robert Collins robe...@robertcollins.net:
Removed file: http://bugs.python.org/file38332/issue-22936-3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22936
___
Changes by Robert Collins robe...@robertcollins.net:
Added file: http://bugs.python.org/file38333/issue-22936-3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22936
___
Cyd Haselton added the comment:
Ryan,
Edits made to files generated or modified by running ./configure. Example:
pyconfig.h.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23496
___
Robert Collins added the comment:
Also apologies - ned told me on IRC that python -m test -uall is needed, not
just -m test. Doh.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17911
___
Robert Collins added the comment:
code module is using a _function from within the traceback module to filter out
a frame - we can do that with the new interface easily (it filters the first
tem).
--
___
Python tracker rep...@bugs.python.org
Robert Collins added the comment:
The decimal failure is due to _format_final_exc_line now filtering out 'None'
as well, because the string captured values of objects leads to None - 'None'
before we do rendering.
I think in this case its reasonable to change the behaviour (since None itself
Roundup Robot added the comment:
New changeset 7f64437a707f by Benjamin Peterson in branch '3.4':
enable X509_V_FLAG_TRUSTED_FIRST when possible (closes #23476)
https://hg.python.org/cpython/rev/7f64437a707f
New changeset 37da00170836 by Benjamin Peterson in branch '2.7':
enable
Roundup Robot added the comment:
New changeset 73afda5a4e4c by Robert Collins in branch 'default':
Issue #17911: traceback module overhaul
https://hg.python.org/cpython/rev/73afda5a4e4c
--
nosy: +python-dev
___
Python tracker rep...@bugs.python.org
New submission from STINNER Victor:
In Python 3, an exception contains a traceback. A traceback contains frames
which contain local variables. Sometimes, the newly raised exception is a local
variable and so we get a reference cycle: exc - traceback - frame - exc...
In asyncio, it's a real
Steve Dower added the comment:
Since we're doing alpha 2 this weekend, I'm keen to get this fix in. Any
comments from anyone? Or are people just generally okay with me checking it in
and relying on the buildbots?
--
___
Python tracker
Larry Hastings added the comment:
I can live with that, if you're confident in it and you'll watch the buildbots.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23524
___
Changes by Robert Collins robe...@robertcollins.net:
Added file: http://bugs.python.org/file38336/issue-22936-4.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22936
___
Changes by Serhiy Storchaka storch...@gmail.com:
Added file: http://bugs.python.org/file38338/idle_test_io-3.5.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23583
___
Robert Collins added the comment:
And now updated to HEAD as 17911 has been committed.
--
Added file: http://bugs.python.org/file38332/issue-22936-3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22936
Ned Deily added the comment:
With 7cea10917f40 applied, multiple tests are now failing on most buildbots.
For example, on OS X 10.10, test_cgitb test_code_module test_decimal:
test_blanks (test.test_cgitb.TestCgitb) ... ok
test_fonts (test.test_cgitb.TestCgitb) ... ok
test_html
New submission from Charles-Axel Dein:
Similar to http://bugs.python.org/issue20659
Having a behavior that is similar to a property on a class seems intuitive
enough. Is there any specific reason why it does not exist?
--
messages: 237227
nosy: charlax
priority: normal
severity:
Roundup Robot added the comment:
New changeset 77a978716517 by Victor Stinner in branch '3.4':
Issue #21619: Try to fix test_broken_pipe_cleanup()
https://hg.python.org/cpython/rev/77a978716517
--
___
Python tracker rep...@bugs.python.org
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
assignee: - docs@python
components: +Documentation
nosy: +docs@python
type: - enhancement
versions: +Python 3.4, Python 3.5 -Python 3.3
___
Python tracker rep...@bugs.python.org
Changes by Ned Deily n...@acm.org:
--
nosy: +alex, christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou
versions: +Python 3.4, Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23588
Jack O'Connor added the comment:
@gvanrossum, the last two lines you suggested don't give any error, as
expected. Not sure why we're getting that error message in the toy example.
@haypo, closing the event loop explicitly works fine for me. But since you
mentioned it, I don't see any warning
Nick Coghlan added the comment:
Latest patch (issue-22936-4.patch) looks good to me!
--
nosy: +ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22936
___
Roundup Robot added the comment:
New changeset 50741316dd3a by Robert Collins in branch 'default':
Issue #22936: Make it possible to show local variables in tracebacks.
https://hg.python.org/cpython/rev/50741316dd3a
--
nosy: +python-dev
___
Python
Serhiy Storchaka added the comment:
does not work because there is no unicode.__unicode__.
Yes, this is why unicode.__getslice__ or unicode.__getitem__ should be used.
Here is a patch for 2.7 that fixes this issue and adds tests for
PseudoOutputFile and PseudoInputFile. Tests should be
New submission from Ben Darnell:
ssl.SSLError is a subclass of OSError but uses error codes that come from a
different scope than the standard errno constants and may have conflicts. For
example, on my system (OSX), ssl.SSL_ERROR_WANT_X509_LOOKUP and errno.EINTR
have the same value. This
Changes by Christoph Sieghart s...@0x2a.at:
--
nosy: +sigi
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23566
___
___
Python-bugs-list mailing
New submission from Roberto Martínez:
We face yesterday a bug in a project, and after a few hours of investigation we
found a bad/not documented behavior in multiprocessing.Queue.
If you put one or more items in a queue and if the items are large, there is a
delay between the put is executed
New submission from Zygmunt Krynicki:
Hi. I'm the upstream of Padme, a mostly transparent proxy library for Python. I
was adding support for the new matmul/@ operator when I noticed that MagicMock
doens't support it yet.
form unittest.mock import MagicMock
MagicMock() @ 1
Traceback (most
Changes by Serhiy Storchaka storch...@gmail.com:
--
stage: - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21619
___
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
stage: patch review - test needed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22351
___
___
James Rutherford added the comment:
Single patch against default makes sense and I'll do that in future.
As for the review comments, I'm happy to go with all of your suggestions but
have offered a tweak to the docstring that you can take or leave at your
discretion :)
--
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +berker.peksag
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23581
___
___
Changes by Alexei Romanov drednout...@gmail.com:
--
nosy: +alexei.romanov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23582
___
___
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +davin, sbt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23582
___
___
Martijn Pieters added the comment:
This changes causes printing BeautifulSoup NavigableString objects to fail; the
code actually could never work as `unicode.__getslice__` insists on getting
passed in integers, not None.
To reproduce, create a new file in IDLE and paste in:
from bs4 import
Eli Bendersky added the comment:
Raymond - gentle ping.
Do you see a reason not to check this in?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23549
___
Martijn Pieters added the comment:
Created a new issue: http://bugs.python.org/issue23583
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19481
___
New submission from Martijn Pieters:
This is a regression or recurrence of issue #19481.
To reproduce, create a subclass of unicode and try and print an instance of
that class:
class Foo(unicode): pass
print Foo()
results in a traceback:
Traceback (most recent call last):
File
Changes by Martijn Pieters m...@python.org:
--
components: +IDLE
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23583
___
___
Python-bugs-list
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
components: +Unicode
nosy: +ezio.melotti, haypo, ned.deily, serhiy.storchaka, terry.reedy
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23583
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19481
___
___
Serhiy Storchaka added the comment:
Here is a patch which moves all methoddef_ifndef to the end of the buffer or
file, so they are not conflicts with other definitions.
--
keywords: +needs review, patch
stage: - patch review
Added file:
Serhiy Storchaka added the comment:
Here is a sample file generated by fixed clinic.py.
--
Added file: http://bugs.python.org/file38329/sample.c
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23500
Martijn Pieters added the comment:
Proposed fix, replace line 1352-1353 in PseudoOutputFile.write():
if isinstance(s, unicode):
s = unicode.__getslice__(s, None, None)
with
if isinstance(s, unicode):
s = unicode.__getslice__(s, 0, len(s))
--
82 matches
Mail list logo