Claudiu.Popa added the comment:
Added a new version of the patch with improvements suggested by Berker Peksag.
Thanks for the review!
--
Added file: http://bugs.python.org/file35237/issue19776.patch
___
Python tracker rep...@bugs.python.org
Nick Coghlan added the comment:
Christian, Alex, Donald - is there an in-progress patch for this available at
all?
2.7.7rc1 is bearing down on us quite rapidly. Given the likely magnitude of
this change, should we consider targeting 2.7.8, and give the OpenStack CI team
and others a greater
New submission from STINNER Victor:
Attached patches replaces duplicated C macros with two new shared macros:
Py_ABS(x) and Py_STRINGIFY(x).
I didn't touch PC/pyconfig.h because it uses 3 macros to stringify instead of
just 2 and I don't know why:
---
/* We want COMPILER to expand to a string
Changes by STINNER Victor victor.stin...@gmail.com:
--
title: core dump in PyThreadState_Get when built --with-pymalloc -
Solaris/Oracle Studio: Fatal Python error: PyThreadState_Get when built
--with-pymalloc
___
Python tracker
STINNER Victor added the comment:
This is not a SPARC-specific issue; the exact same failure occurs on x86.
Ah ok, good to know. To me, it looks like a compiler issue. Did you try
Stefan's advices in issue #15963?
You may try to disable compiler optimizations to see if you get the same
STINNER Victor added the comment:
Hum ok, thanks for your explanation Charles-François. socket_listen-1.diff
looks good to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21455
___
STINNER Victor added the comment:
We can maybe modify the compiler to use the line number 1 if the line
information is missing?
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21385
Antoine Pitrou added the comment:
Sorry, it seems I have let this issue slip. I will update the patch and commit
it soon!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19775
___
New submission from Ids van der Molen:
collect_children routine in SocketServer.py contains two possible race
conditions. First one is in while loop while len(self.active_children) =
self.max_children:. If status of child is collected outside of Socket server
(for example in signal handler or
Roundup Robot added the comment:
New changeset 197ac5d79456 by Antoine Pitrou in branch 'default':
Issue #19775: Add a samefile() method to pathlib Path objects.
http://hg.python.org/cpython/rev/197ac5d79456
--
nosy: +python-dev
___
Python tracker
Changes by Serhiy Storchaka storch...@gmail.com:
--
title: Add Py_ABS and Py_STINGIFY macros - Add Py_ABS and Py_STRINGIFY macros
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21490
___
Changes by Larry Hastings la...@hastings.org:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21088
___
___
Changes by Antoine Pitrou pit...@free.fr:
--
resolution: - fixed
stage: - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19775
___
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +neologix
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21491
___
___
Python-bugs-list mailing
Marc-Andre Lemburg added the comment:
neologix:
According to man rand(3ssl), OpenSSL uses an internal state of 1023 bytes for
the RNG.
You only see it reading 32 bytes from /dev/urandom in the strace because it has
already loaded 1024 bytes from the RNG state file ~/.rng before adding
Antoine Pitrou added the comment:
Or we could simply catch the EINVAL failure and then skip the test.
I suppose the filesystem doesn't support timestamps 2**32 ?
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +larry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21483
___
___
Python-bugs-list mailing
Antoine Pitrou added the comment:
Is ~/.rnd any kind of serious? It hasn't been modified since two weeks on my
system (which is rebooted every day).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21470
New submission from Jim Minter:
Python 3.3.2 (default, Mar 5 2014, 08:21:05)
[GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] on linux
Type help, copyright, credits or license for more information.
import email.header
email.header.decode_header(foo)
[('foo', None)]
Larry Hastings added the comment:
Antoine's plan sounds good to me. And, is it true that NFS only supports
four-byte timestamps?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21483
___
Serhiy Storchaka added the comment:
See also issue19656.
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21401
___
___
Roundup Robot added the comment:
New changeset 20db5e9086d4 by doko in branch '3.4':
- Issue #17756: Fix test_code test when run from the installed location.
http://hg.python.org/cpython/rev/20db5e9086d4
New changeset 8885fc2e92b3 by doko in branch 'default':
Merge from 3.4:
Matthias Klose added the comment:
not yet closing, to see if there are some stream buffering issues in mock
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17756
___
Charles-François Natali added the comment:
According to man rand(3ssl), OpenSSL uses an internal state of 1023 bytes for
the RNG.
You only see it reading 32 bytes from /dev/urandom in the strace because it
has already loaded 1024 bytes from the RNG state file ~/.rng before adding
Marc-Andre Lemburg added the comment:
On 13.05.2014 11:06, Antoine Pitrou wrote:
Is ~/.rnd any kind of serious? It hasn't been modified since two weeks on my
system (which is rebooted every day).
The file is apparently only updated if you use one the OpenSSL commands
which needs random
Antoine Pitrou added the comment:
For the record, SSLSocket.pending() was added in b59825d9db8f with the commit
message get SSL support to work again. It isn't used anywhere in the stdlib.
It isn't used by asyncio, Tornado or Twisted. It isn't necessary to write
non-blocking SSL applications,
New submission from Claudiu.Popa:
Hello. This patch adds a test for ntpath.expanduser, which was missing. Also,
it increases the test coverage for ntpath.py from 68% to 75%.
--
components: Tests
files: expanduser.patch
keywords: patch
messages: 218427
nosy: Claudiu.Popa
priority:
Rose Ames added the comment:
This is my first attempt at contributing to python I'd really appreciate some
feedback :). Should I have added a test to demonstrate the bug before trying
to fix it?
--
___
Python tracker rep...@bugs.python.org
Feliks added the comment:
Well, there is some anecdotal evidence. ;-) I happen to have a lot of
experience with a lot of programming languages, and I was bitten by this.
Let's put it like this: it is quite easy to overlook the significance of the
sentence in question. One looks at the
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19656
___
___
Python-bugs-list
Changes by Berker Peksag berker.pek...@gmail.com:
--
keywords: +patch
nosy: +berker.peksag, ncoghlan
stage: - patch review
type: resource usage - behavior
versions: +Python 3.4, Python 3.5
Added file: http://bugs.python.org/file35240/issue21488.diff
Alexey Gorshkov added the comment:
Ok. As
https://docs.python.org/dev/library/ssl.html#notes-on-non-blocking-sockets
says: Calling select() tells you that the OS-level socket can be read from (or
written to), and here is situation: len(select([ssl_socket],[],[], 0.2)[0])
returns 0, but ssl
Skip Montanaro added the comment:
Or we could simply catch the EINVAL failure and then skip the test.
I suppose the filesystem doesn't support timestamps 2**32 ?
Just in that one test? If I passed -1 that would probably also
generate EINVAL (haven't tested).
I'll have to check with the
Antoine Pitrou added the comment:
Alexey, to quote your own link, here is the proper way:
http://www.perlmonks.org/?node_id=845640
And it is not need to tell about asyncio, Tornado or Twisted.
Of course it is :-) It is generally far better to use an existing non-blocking
I/O framework, than
Serhiy Storchaka added the comment:
Thank you Zachary.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20565
___
___
Python-bugs-list mailing
Changes by Serhiy Storchaka storch...@gmail.com:
--
status: open - pending
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20560
___
___
Serhiy Storchaka added the comment:
I hope all mentioned bugs were already fixed in the wave module.
As for new writesamples() and readsamples() methods, perhaps it would be better
to add utility functions in the audioop module for packing/unpacking integers.
In any case a user can use
Serhiy Storchaka added the comment:
Claudiu, your benchmark is broken, it measure a no-op.
Correct benchmark:
$ ./python -S -m timeit -n 10 -s import dbm.dumb as dbm;
d=dbm.open('x.dat', 'c') len(d)
3.4: 10 loops, best of 3: 2.56 usec per loop
3.5: 10 loops, best of 3:
Serhiy Storchaka added the comment:
Personally I doubt it is a good idea to convert any tuple to named tuple. There
are downsides: this increases memory usage and decreases performance; this
changes pickled data and makes it backward incompatible (and even worse with
other serialization
Alex Gaynor added the comment:
I have not started on this patch yet, I'd wanted to get the other, smaller,
backports done first. Unless someone else is planning on getting to this, I
think 2.7.8 is more realistic.
--
___
Python tracker
Donald Stufft added the comment:
I agree that 2.7.8 is more realistic. This particular backport is going to be
the most work due to the scope of it.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21308
Claudiu.Popa added the comment:
But it improves the API. It's much nicer to actually access the values returned
by sndhdr as f.type, f.sampling_rate, f.channels than f[0], f[1], f[2]. You do
have a point though. Would it be more acceptable if we'll provide a new
function which returns a
Jim Jewett added the comment:
Did you try 3.5 without the patch, in case the issue is not with his code?
On May 13, 2014 7:23 AM, Serhiy Storchaka rep...@bugs.python.org wrote:
Serhiy Storchaka added the comment:
Claudiu, your benchmark is broken, it measure a no-op.
Correct benchmark:
Berker Peksag added the comment:
email.header.decode_header(foo)
[('foo', None)]
email.header.decode_header() implements rfc-2047 and the foo header doesn't
match the syntax described in rfc-2047 (see 2. Syntax of encoded-words).
See the code for more information:
*
Claudiu.Popa added the comment:
Right, my benchmark was indeed flawed. Here are the new results on my machine:
Without the patch
# ./python -S -m timeit -n 10 -s import dbm.dumb as dbm;
d=dbm.open('x.dat', 'c') len(d)
10 loops, best of 3: 0.564 usec per loop
With the patch
# ./python
Serhiy Storchaka added the comment:
I had stopped committing patches for similar issues because there is an
opposition against this. See discussion at
http://comments.gmane.org/gmane.comp.python.devel/145535.
--
___
Python tracker
Claudiu.Popa added the comment:
Here's a new patch which uses the EAFP approach for dunder methods (__len__,
__contains__ etc) and the _verify_open method for the other methods (.keys,
.iterkeys) etc. Now the results are similar with the benchmark without the
patch.
--
Added file:
Antoine Pitrou added the comment:
I think these transformations are useful, because on failure they will give you
what is the actual value of the compared operands (something which assertTrue
is enable to extract).
Also they are clearer to read IMO.
--
nosy: +pitrou
STINNER Victor added the comment:
I agree with Antoine.
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20544
___
___
New submission from Priya pawar:
i created command from getopt but it gives error if i give single hyphan in
long option
it should check long option not in small option.
eg. hello -foo
-o option is not recognized
hello --foo is working fine.
--
messages: 218447
nosy: priya
R. David Murray added the comment:
It doesn't really matter what order you do it in (though I prefer to write
tests first, usually), but yes, we will want tests before we commit the fix.
I tried to be thorough in my testing, but obviously I missed some branches :(.
--
Eric V. Smith added the comment:
That's working as designed. It allows you to say -fo if both 'f' and 'o' are
short options.
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21494
R. David Murray added the comment:
The error is actually the first case returning string rather than bytes. See
issue 6302.
--
dependencies: +Add decode_header_as_string method to email.utils
resolution: - duplicate
stage: - resolved
status: open - closed
R. David Murray added the comment:
Hmm. It looks like we decided that we couldn't fix the behavior for backward
compatibility reasons. In 3.4 you can use the new email policies to get
automatic, correct stringification of headers.
--
___
Python
STINNER Victor added the comment:
I would prefer to see the patch applied if no test can be written.
The bug was not notified before.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20977
New submission from Thomas Guettler:
Imagine you write a small console script which is implemented like a library.
This tool has to do two things: the console script needs to configure the
logging, and the library needs to use it.
The library usage of logging it easy well documented:
{{{
Alex Gaynor added the comment:
New patch includes the documentation as well.
--
keywords: +needs review
Added file: http://bugs.python.org/file35242/pbkdf2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21304
New submission from couplewavylines:
Is there any plan to add an 'activate_this.py' to venv? The virtualenv package
includes this script. Its purpose is to activate the environment in-place,
from other Python code.
One use-case is running multiple WSGI apps that each need a different virtual
Alex Gaynor added the comment:
I'm still concerned about the unicode issue, but I'm not sure what the right
way to fix it is.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21304
___
Donald Stufft added the comment:
The attached patch looks pretty good to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21304
___
___
Donald Stufft added the comment:
I don't think there's any way around it, nor do I think that it actually leaks
any meaningful timing.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21304
Donald Stufft added the comment:
Oh, gotcha.
Yea I agree, but it's Python 2.x that's par for the course.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21304
___
Alex Gaynor added the comment:
Sorry, I wasn't concerned from a timing attack perspective here, I was
concerned from an oh my god implicit coercion is terrible perspective :-)
--
___
Python tracker rep...@bugs.python.org
New submission from Florian Bruhin:
When faulthandler is used while sys.stderr is None (e.g. when using
pythonw.exe), a (IMHO) confusing exception is raised:
Traceback (most recent call last):
File test.py, line 7, in module
faulthandler.enable()
AttributeError:
Giampaolo Rodola' added the comment:
Related:
https://groups.google.com/forum/#!topic/dev-python/ytbYwHXKC6o
I'm not sure how what is proposed here would be useful for ThreadPoolExecutor
but it would definitely be helpful being able to set an initializer for
ProcessPoolExecutor because right
New submission from Florian Bruhin:
When adding something to a configparser instance which has a key beginning with
a comment char, it writes the data to a file without generating an error, and
when reading the file back obviously the data is different as it's a comment:
cp =
Brett Cannon added the comment:
Berker's patch LGTM, so assigning to him to commit.
--
assignee: docs@python - berker.peksag
nosy: +brett.cannon
stage: patch review - commit review
___
Python tracker rep...@bugs.python.org
Changes by Eric V. Smith e...@trueblade.com:
--
resolution: - not a bug
stage: - resolved
status: open - closed
type: enhancement - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21494
Changes by couplewavylines couplewavyli...@gmail.com:
--
nosy: +couplewavylines
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9253
___
___
Brett Cannon added the comment:
It's something that could potentially be changed in the future, but no one has
prioritized it enough to worry about it. Typically this opens a pandora's box
of wanting to generalize it so it supports custom user optimizations as well
and then people lose
Brett Cannon added the comment:
I thought we gave ourselves the wiggle room to change the warnings we emitted
for -3 (I unfortunately can't find a reference to something relating to that in
the Python 2.7 PEP)?
--
___
Python tracker
STINNER Victor added the comment:
Attached patch modifies faulthandler to raises a RuntimeError(sys.stderr is
None) with your use case. Is it what you expected?
--
keywords: +patch
Added file: http://bugs.python.org/file35243/faulthandler.patch
___
Florian Bruhin added the comment:
I didn't test the patch (I don't have the toolchain set up to do so), but it
looks like this is indeed an exception which makes more sense to the developer.
When I saw the exception as it is now, I only discovered it's related to stderr
being None by finding
STINNER Victor added the comment:
I personally would prefer failing silently though so the application still
runs (if there's no stderr, there just is no fault log), but that's debatable
of course.
Nope, there is no debate: there is the Zen of Python :-)
Errors should never pass silently.
Florian Bruhin added the comment:
The thing is the developer is not necessarely the one controlling if sys.stderr
is None, sometimes the user is.
For example, see
https://docs.python.org/3.4/using/windows.html#executing-scripts-without-the-python-launcher
- an user might have decided to use
STINNER Victor added the comment:
This means there's an unexpected gotcha
I prefer to see an exception before sys.stderr is None, instead of not seeing
the traceback when the application does crash. It is usually a pain to
reproduce a crash in the exact same conditions.
if I want my
Francisco Martín Brugué added the comment:
What we want to test is that the return value is of type 'int', which is what
Victor's test checks.
Thank you for the explanations!
for 2.7.6 type(2 62) is type 'long' and type(2 61) is
type 'int' (I suppose it's analogous in a 32 bit machine
R. David Murray added the comment:
The data structure you are asking for bears a resemblance to the data structure
used by the email package to record message headers. Email uses a list with a
dict-like API cobbled together on top. The difference with your suggestion is
that email also
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19656
___
New submission from Eric Snow:
Per the docs*, a module's __builtins__ may be a module or a dict or even
missing. However, test.test_importlib.test_api.ReloadTests checks __builtins__
as part of several tests. Instead, the tests should ignore __bulitins__. I'll
push a patch in a minute that
Roundup Robot added the comment:
New changeset 16d26391ec36 by Eric Snow in branch '3.4':
Issue #21499: Ignore __builtins__ in several test_importlib.test_api tests.
http://hg.python.org/cpython/rev/16d26391ec36
New changeset bdf94b2c0639 by Eric Snow in branch 'default':
Merge from 3.4 (for
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
resolution: - fixed
stage: needs patch - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21499
___
New submission from Eric Snow:
Right now to run importlib tests you can do either of the following:
./python -m tests test_importlib
./python -m tests.test_importlib
Both make use of the regrtest infrastructure. For test submodules the commands
are similar:
./python -m tests
Tim Peters added the comment:
Crytpo generators are a whole different world, and I wouldn't listen to anyone
save a bona fide expert in that field. Plausible: the hardest thing OpenSSL
has to do is generate secure RSA keys. But the bit length of an RSA key can't
be taken at face value:
New submission from Steve Foley:
Hello, I would like to submit an example for the mmap docs page. It
demonstrates the use of shared memory and message passing between processes.
Thanks!
import mmap, os, select
NUM_CHILDREN = 30
MSG_LEN = 8
BUF_LEN = NUM_CHILDREN *
Berker Peksag added the comment:
Attaching two patches:
issue2052.diff adds a charset keyword argument to HtmlDiff.make_file().
issue2052_html5.diff also adds a charset keyword argument to
HtmlDiff.make_file() and updates the markup of HtmlDiff() to HTML5. I tested it
with Firefox 29 and
Changes by Berker Peksag berker.pek...@gmail.com:
Added file: http://bugs.python.org/file35245/issue2052_html5.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2052
___
Serhiy Storchaka added the comment:
Note that this is not work with the punycode encoding (and may be some
third-party encodings).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21057
___
Serhiy Storchaka added the comment:
Why not just use functools.lru_cache?
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21486
___
Antoine Pitrou added the comment:
Because that would incur the cost of LRU logic and locking, which we don't need
here.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21486
___
Steve Foley added the comment:
sorry! this is the correct version ;-)
---
import mmap, os, select
NUM_CHILDREN = 30
MSG_LEN = 9
BUF_LEN = NUM_CHILDREN * MSG_LEN
buf = mmap.mmap(-1, BUF_LEN)
p = select.poll()
def write_buffer(i):
msg = '%s\t%d\n' %
AJNeufeld added the comment:
I'd like this issue to be reopened. It does not appear resolved. It is
different from the wantobjects=False issue.
Windows 7 has 'libraries' which are folders containing the contents of more
than one folder. For instance, on my computer
Libraries Documents
Changes by Ned Deily n...@acm.org:
--
nosy: +vinay.sajip
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21495
___
___
Python-bugs-list mailing list
Changes by Ned Deily n...@acm.org:
--
nosy: +vinay.sajip
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21496
___
___
Python-bugs-list mailing list
Stephen Paul Chappell added the comment:
It seems that most functions and methods do not bother checking if
_default_root exists before trying to access it. However, upon seeing line 366
in ttk (if tkinter._support_default_root:), my recommendation would be to
change line 319 to if
Changes by Stefan Krah stefan-use...@bytereef.org:
--
nosy: -skrah
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15871
___
___
Python-bugs-list
Changes by Stefan Krah stefan-use...@bytereef.org:
--
nosy: -skrah
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16108
___
___
Python-bugs-list
Changes by Stefan Krah stefan-use...@bytereef.org:
--
nosy: -skrah
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20051
___
___
Python-bugs-list
Changes by Stefan Krah stefan-use...@bytereef.org:
--
nosy: -skrah
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13669
___
___
Python-bugs-list
Changes by Stefan Krah stefan-use...@bytereef.org:
--
nosy: -skrah
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2552
___
___
Python-bugs-list
1 - 100 of 154 matches
Mail list logo