Changes by paul j3 ajipa...@gmail.com:
Added file: http://bugs.python.org/file36656/sample3.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22401
___
___
Changes by paul j3 ajipa...@gmail.com:
Removed file: http://bugs.python.org/file36648/sample3.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22401
___
Roundup Robot added the comment:
New changeset c0b0dda16009 by Senthil Kumaran in branch 'default':
Issue #22366: urllib.request.urlopen will accept a context object (SSLContext)
https://hg.python.org/cpython/rev/c0b0dda16009
--
nosy: +python-dev
___
Senthil Kumaran added the comment:
Committed this in 3.5. (Since this is adding an new argument, it should not be
backported to 3.4).
Thank you!
--
resolution: - fixed
stage: - resolved
status: open - closed
versions: -Python 3.4
___
Python
New submission from Senthil Kumaran:
While working on issue22366, I found a tricky bit of code in:
https://hg.python.org/cpython/file/ca0aa0d89273/Lib/http/client.py#l1295
https://hg.python.org/cpython/rev/1a945fb875bf/
The statement is
if not self._context.check_hostname and
Serhiy Storchaka added the comment:
Here is a patch using enums. I still think enums are superfluous here. Advanced
the Enum class features (pickling, access by name, type checking) are not
needed - these constants don't leaked in outer word.
I don't see where there would be a circular
Serhiy Storchaka added the comment:
The regex module is potential candidate for replacement of the re module.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22364
___
Serhiy Storchaka added the comment:
Fixed a bug in the test and partially addressed Victor's and Yury's comments.
Antoine, could your pleas answer following question?
Is it safe to remove the self._finalizer is not None check in cleanup()? I.e.
is it possible that self._finalizer becomes None
Senthil Kumaran added the comment:
Except for the minor comments made by Antoine in the review, the patch looks
good to go.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22278
___
Serhiy Storchaka added the comment:
Moved the import to the top level as Antoine suggested.
--
Added file: http://bugs.python.org/file36659/re_locale_caching3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22410
Changes by Serhiy Storchaka storch...@gmail.com:
Removed file: http://bugs.python.org/file36653/re_locale_caching2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22410
___
Antoine Pitrou added the comment:
self._finalizer can be None if an exception was raised during __init__().
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22427
___
Serhiy Storchaka added the comment:
But in this case cleanup() can't be called.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22427
___
___
New submission from Sworddragon:
The application apt-get on Linux does scale its output dependent of the size of
the terminal but I have noticed that there are differences if I'm calling
apt-get directly or with a subprocess without shell and creationflags set (so
that creationflags should be
Larry Hastings added the comment:
Alex said he needed this in order to implement PEP 476, and I thought PEP 476
was going in to 3.4 (hopefully for 3.4.2, which I'm tagging in like 24 hours).
--
nosy: +larry
___
Python tracker rep...@bugs.python.org
Nick Coghlan added the comment:
Larry, it's probably easiest to cover the backport under issue 22417 with the
rest of the proposed PEP 476 changes.
--
nosy: +ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22366
Nick Coghlan added the comment:
Currently marking as a deferred blocker, as Alex wasn't sure he'd be able to
get PEP 476 fully updated in time for 3.4.2rc1, and was willing to accept
waiting for 2.7.9 and 3.4.3 rather than delaying 3.4.2 any further.
However, that was before Senthil accepted
Alex Gaynor added the comment:
If check_hostname is set on the context then do_handshake() will already
perform the hostname check:
https://hg.python.org/cpython/file/default/Lib/ssl.py#l787
--
___
Python tracker rep...@bugs.python.org
New submission from juj:
On Windows, write
a.py:
import subprocess
def ccall(cmdline, stdout, stderr):
proc = subprocess.Popen(['python', 'b.py'], stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
proc.communicate()
if proc.returncode != 0: raise
Changes by STINNER Victor victor.stin...@gmail.com:
--
components: +Windows
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22442
___
New submission from Sworddragon:
On reading the output of an application (for example apt-get download
firefox) that dynamically changes a line (possibly with the terminal control
character \r) I have noticed that read(1) does not read the output until it has
finished with a newline. This
STINNER Victor added the comment:
On reading the output of an application (for example apt-get download
firefox) that dynamically changes a line (possibly with the terminal control
character \r) I have noticed that read(1) does not read the output until it
has finished with a newline.
juj added the comment:
The same observation applies to subprocess.call() as well.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22442
___
___
Changes by Sworddragon sworddrag...@aol.com:
Removed file: http://bugs.python.org/file36661/test.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22443
___
Antoine Pitrou added the comment:
Ah... you are right. It seems the None test has been superfluous all the time.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22427
___
Sworddragon added the comment:
Edit: Updated testcase as I forgot to flush the output (in case somebody hints
to it).
--
Added file: http://bugs.python.org/file36662/test.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22443
Senthil Kumaran added the comment:
My worry is not about the timing. I can add it immediately, but are we
convinced on having a new argument (API Change) for 3.4.2 ?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22366
Sworddragon added the comment:
The buffering of stdout and/or stderr of your application probably
changes if the application runs in a terminal (TTY) or if the output is
redirected to a pipe (not a TTY). Set the setvbuf() function.
This means in the worst case there is currently no official
STINNER Victor added the comment:
This means in the worst case there is currently no official way to get this
output before it writes a newline?
The behaviour of stdout/stderr is defined in the C library, see setvbuf()
manual for more information. I don't know a generic way to change the
Sworddragon added the comment:
You don't need to compile Python. Just compile nobuffer.c to
libnobuffer.so. See the documentation in nobuffer.c.
Strictly following the documentation does not work:
sworddragon@ubuntu:~/tmp$ gcc -shared -o nobuffer.so interceptor.c
gcc: error: interceptor.c:
Sworddragon added the comment:
Why must stdin of the subprocess be closed so that a read() on stdout can
return?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22439
___
Roundup Robot added the comment:
New changeset 9c3249b358d0 by Alex Gaynor in branch 'default':
PEP476: Updated based on proposed API from Nick. Also note that #22366 has been
landed.
https://hg.python.org/peps/rev/9c3249b358d0
--
___
Python tracker
New submission from Alexander Belopolsky:
PEP 3141 defines floor division as floor(x/y) and specifies that floor() should
return int type. Builtin float type has been made part of the PEP 3141
numerical tower, but floor division of two floats still results in a float.
See also:
* #1656 -
Changes by Edward O edoubray...@gmail.com:
--
nosy: +eddygeek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7434
___
___
Python-bugs-list mailing
R. David Murray added the comment:
Because stdout isn't closed until the process completes, which happens when
stdin is closed.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22439
___
Sworddragon added the comment:
But this happens also on read(1). I'm even getting no partly output.
1. I'm calling diff in a way where it expects input to compare.
2. I'm writing and flushing to diff's stdin.
3. diff seems to not get this content until I close its stdin.
--
R. David Murray added the comment:
Try it at the command line. Diff doesn't produce any output in your example
until stdin is closed.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22439
Changes by Stefan Krah stefan-use...@bytereef.org:
--
nosy: +skrah
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22444
___
___
Python-bugs-list
Terry J. Reedy added the comment:
I cannot reproduce with Idle 3.4.1 on Win 7.
Attempt 1: open Idle from icon (opens shell), edit file, make trivial change,
return to shell, and type 'sys.'. When box appears, close shell, editor left
untouched.
Attempt 2: edit another file, type 'sys.',
Changes by Terry J. Reedy tjre...@udel.edu:
--
nosy: +bethard
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22433
___
___
Python-bugs-list mailing
Sworddragon added the comment:
Ah, now I see it. Thanks for your hint.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22439
___
___
Changes by Terry J. Reedy tjre...@udel.edu:
--
nosy: +terry.reedy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22434
___
___
Python-bugs-list
New submission from Sebastian Berg:
In NumPy we decided some time ago that if you have a multi dimensional buffer,
shaped for example 1x10, then this buffer should be considered both C- and
F-contiguous. Currently, some buffers which can be used validly in a contiguous
fashion are rejected.
Stefan Krah added the comment:
There is another oddity: #12845. Does NumPy have a formal definition of
array contiguity somewhere?
--
nosy: +skrah
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22445
Stefan Krah added the comment:
BTW, if you have NumPy installed and run test_buffer in Python3.3+,
numpy.ndarray has many tests against memoryview and _testbuffer.ndarray
(the latter is our exegesis of PEP-3118).
--
___
Python tracker
Sebastian Berg added the comment:
#12845 should be closed, seems like a bug in some old version. The definition
now is simply that the array is contiguous if you can legally access it in a
contiguous fashion. Which means first stride is itemsize, second is
itemsize*shape[0] for Fortran,
New submission from Ram Rachum:
Can't this code:
class Sequence(Sized, Iterable, Container):
# ...
def __contains__(self, value):
for v in self:
if v == value:
return True
return False
Be shortened into this:
Sebastian Berg added the comment:
To be clear, the important part here, is that to me all elements *can* be
accessed using that scheme. It is not correct to assume that `stride[-1]` or
`stride[0]` is actually equal to `itemsize`.
In other words, you have to be able to pass the pointer to the
Mark Lawrence added the comment:
The key word is potential. I do not believe that any changes should be made
to the re module until such time as there is a fully approved PEP for the regex
module and that work has actually started on getting it into the stdlib.
Surely backward compatibility
Serhiy Storchaka added the comment:
This is slower.
import timeit
class A(list):
... def __contains__(self, value):
... for v in self:
... if v == value:
... return True
... return False
...
timeit.timeit('500 in x',
Ram Rachum added the comment:
Oh. I wonder why `any` is slow like that, you'd figure it's be optimized.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22446
___
New submission from Ed Sesek:
See the attached config file. logging.config.fileConfig() is attempting to
write to the file specified in the file_handler section even though that
handler is not configured for use in this config. If its going to write to the
file, it should only do so if the
Stefan Krah added the comment:
This was a bug in NumPy that has been fixed.
--
resolution: - not a bug
stage: - resolved
status: open - closed
versions: +Python 3.5 -Python 3.3
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
Because in first case there is one iterator, iter(self), and in second case
there are two iterators: iter(self) and iter((v == value for v in self)).
--
___
Python tracker rep...@bugs.python.org
Ram Rachum added the comment:
Thanks for the clarification. Oh well, sad to see the more verbose code win,
but I guess that's life.
I tried on PyPy but the difference was even more pronounced,
0.008922450399566156 for the long version and 0.042124665810088044 for the
short version.
Charles-François Natali added the comment:
Patch attached.
The test wouldn't result in FD exhaustion on CPython because of the reference
counting, but should still trigger RessourceWarning.
--
keywords: +patch
nosy: +haypo, pitrou
stage: - patch review
Added file:
Changes by Benjamin Peterson benja...@python.org:
--
resolution: - rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22446
___
Benjamin Peterson added the comment:
Definitely a case of eventlet playing with fire (private apis).
--
resolution: - not a bug
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22438
Stefan Krah added the comment:
Thanks, #12845 is indeed fixed in NumPy.
Why does NumPy consider an array with a stride that will almost
certainly lead to undefined behavior (unless you compile with
-fwrapv) as valid?
In CPython we try to eliminate these kinds of issues (though
they may still
Sebastian Berg added the comment:
Well, the 9223372036854775807 is certainly no good for production code and we
would never have it in a release version, it is just there currently to expose
if there are more problems. However I don't care what happens on overflow (as
long as it is not an
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +vinay.sajip
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22447
___
___
Terry J. Reedy added the comment:
Steven and Mark are correct that a tracker patch cannot change a 3rd party
module. On the other hand, we are free to improve error messages in new
versions. And we are free to borrow ideas from 3rd part modules. I changed the
title accordingly.
(Back
Changes by Alexander Belopolsky alexander.belopol...@gmail.com:
--
nosy: +belopolsky
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22445
___
___
STINNER Victor added the comment:
Ah yes, try gcc -shared nobuffer.c -o libnobuffer.so -fPIC.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22443
___
Changes by Alexander Belopolsky alexander.belopol...@gmail.com:
--
nosy: +belopolsky
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22385
___
___
Steven D'Aprano added the comment:
On Fri, Sep 19, 2014 at 08:41:57PM +, Mark Lawrence wrote:
I do not believe that any changes should be made to the re module
until such time as there is a fully approved PEP []
Why is this so controversial? We're not talking about functional changes
Sworddragon added the comment:
I was able to compile the library but after executing
LD_PRELOAD=./libnobuffer.so ./test.py I'm seeing no difference. The unflushed
output is still not being read with read(1).
--
___
Python tracker
eryksun added the comment:
stdbuf is the typical way to apply the LD_PRELOAD trick:
https://www.gnu.org/software/coreutils/manual/html_node/stdbuf-invocation.html
There's also the unbuffer expect script:
http://expect.sourceforge.net/example/unbuffer.man.html
--
nosy: +eryksun
Sworddragon added the comment:
stdbuf -o 0 ./test.py and unbuffer ./test.py doesn't change the result too.
Or is something wrong with my testcase?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22443
New submission from Joshua Moore-Oliva:
The core issue stems from the implementation of Timer cancellation. (which
features like asyncio.wait_for build upon). BaseEventLoop stores scheduled
events in an array backed heapq named _scheduled. Once an event has been
scheduled with call_at,
Changes by Sworddragon sworddrag...@aol.com:
Removed file: http://bugs.python.org/file36660/test.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22441
___
Changes by Sworddragon sworddrag...@aol.com:
Added file: http://bugs.python.org/file36667/test.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22441
___
Sworddragon added the comment:
Edit: Updated testcase as it contained an unneeded argument from an older
testcase (in case it confuses somebody).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22441
Akira Li added the comment:
This is a documented failure on the python subprocess page,
but why not just fix it up directly in python itself?
If you want to discard the output; you could use:
check_call(args, stdin=DEVNULL, stdout=DEVNULL, stderr=STDOUT)
check_call() passes its parameters
Guido van Rossum added the comment:
Hi Joshua,
This is indeed a problem -- I just never expected that you would be having that
many events and and canceling the majority. I am sorry you had to debug this.
:-(
This was anticipated by the author of pyftpdlib (Giampaolo Roloda'), who
proposed
Roundup Robot added the comment:
New changeset 90a2a12fa34d by Terry Jan Reedy in branch '2.7':
Issue #22420: Avoid 'write to None' crashes by using print instead.
https://hg.python.org/cpython/rev/90a2a12fa34d
New changeset 42b03d5b1cbb by Terry Jan Reedy in branch '3.4':
Issue #22420: Avoid
Changes by Terry J. Reedy tjre...@udel.edu:
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22420
___
Akira Li added the comment:
I don't think we are going to support a timezone list like that without PEP
431.
PEP 431 won't fix this issue. See below.
You should attach your patch to a new issue. When I said this should
the doc issue, that is because only a doc fix is acceptable for 3.4.
Akira Li added the comment:
Related:
http://stackoverflow.com/questions/25923901/last-unbuffered-line-cant-be-read
Make sure you follow the links in the comments.
--
nosy: +akira
___
Python tracker rep...@bugs.python.org
Roundup Robot added the comment:
New changeset 569a889e3b6c by Ned Deily in branch '3.4':
Issue #15661: Update OS X installer welcome and readme files for 3.4.2.
https://hg.python.org/cpython/rev/569a889e3b6c
--
nosy: +python-dev
___
Python tracker
Changes by Case Van Horsen cas...@gmail.com:
--
nosy: +casevh
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22444
___
___
Python-bugs-list mailing
Berker Peksag added the comment:
I left a couple of comments on Rietveld.
--
stage: commit review - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12916
___
Changes by Berker Peksag berker.pek...@gmail.com:
--
stage: needs patch - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22406
___
___
Roundup Robot added the comment:
New changeset eb9eac80c17a by Berker Peksag in branch '3.4':
Issue #22247: Add NNTPError to nntplib.__all__.
https://hg.python.org/cpython/rev/eb9eac80c17a
New changeset e21b0bbc06ea by Berker Peksag in branch 'default':
Issue #22247: Add NNTPError to
84 matches
Mail list logo