Serhiy Storchaka added the comment:
Could you please provide a simple script which shows the problem?
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18744
___
Serhiy Storchaka added the comment:
Perhaps it worth manually inline unicode_eq() in these tight inner loops. Then
we can move PyUnicode_GET_LENGTH(a) * PyUnicode_KIND(a) out of the loop.
--
___
Python tracker rep...@bugs.python.org
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +serhiy.storchaka
stage: - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18743
___
Michal Vyskocil added the comment:
The fast scalars approach looks great!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18682
___
___
New submission from Vajrasky Kok:
Test enum json in Lib/test/test_json/test_enum.py is ignorant of infinity
values. Also, NaN, but since NaN is a weirdo, let's not take that into account.
The unit test should represent of what will work in every case. For example:
def test_floats(self):
Antoine Pitrou added the comment:
Or we can wrap the resolve_address() method with the @functools.lru_cache()
decorator.
Sounds ok to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16463
STINNER Victor added the comment:
In issue #18719, Raymond modified Python 2.7, but he didn't touch the following
macro:
#define Py_UNICODE_MATCH(string, offset, substring) \
((*((string)-str + (offset)) == *((substring)-str)) \
((*((string)-str + (offset) + (substring)-length-1) ==
Christian Heimes added the comment:
It's also bad for memory read performance if the string is rather long. The
memory controller performs best when code reads memory sequential. The talk
http://www.youtube.com/watch?v=MC1EKLQ2Wmg about mythbusting modern hardware
sums it up real nice.
koobs added the comment:
As per our IRC conversation, our 'koobs-freebsd10' bot also reproduces the
failure and can be used to test the patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18296
Roundup Robot added the comment:
New changeset 924d327da3af by Victor Stinner in branch '3.3':
Issue #18296: Try to fix TestSendfile.test_trailers() of test_os on FreeBSD
http://hg.python.org/cpython/rev/924d327da3af
New changeset 92039fb68483 by Victor Stinner in branch 'default':
(Merge 3.3)
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +koobs
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18746
___
___
Python-bugs-list
New submission from STINNER Victor:
The following test fails on FreeBSD buildbot:
def test_finalize_with_trace(self):
# Issue1733757
# Avoid a deadlock when sys.settrace steps into threading._shutdown
assert_python_ok(-c, if 1:
import sys, threading
Changes by STINNER Victor victor.stin...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file31299/finalize_clear_trace.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18746
Peter Otten added the comment:
Note that set operations on dict views work with lists, too. So the only change
necessary is to replace
wrong_fields = [k for k in rowdict if k not in self.fieldnames]
with
wrong_fields = rowdict.keys() - self.filenames
(A backport to 2.7 would need to replace
Mark Dickinson added the comment:
Ah, Tim saw through my cunningly-laid false trail of incorrect issue numbers.
Step 1 of my world domination plan is foiled!
Yes, let's fix this. In my mind, it's definitely a bug that ints and longs
aren't interchangeable here, and it would be nice to have
Changes by Julian Berman julian+python@grayvines.com:
--
nosy: +Julian
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18335
___
___
New submission from Christian Heimes:
A couple of reports and check-in messages like
Postgres / pgcrypto CVE-2013-1900
http://bugs.ruby-lang.org/issues/4579
http://www.exim.org/lurker/message/20130402.171710.92f14a60.fi.html
suggests that OpenSSL's PRNG should be reset or re-seeded after
Antoine Pitrou added the comment:
Are there any uses of the OpenSSL PRNG from Python?
Is the PRNG used for SSL session keys, or another mechanism?
--
nosy: +pitrou, sbt
type: security - enhancement
versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3
Changes by Antoine Pitrou pit...@free.fr:
--
stage: test needed - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18335
___
___
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +neologix
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16500
___
___
Python-bugs-list mailing
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +neologix
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18747
___
___
Python-bugs-list mailing
Christian Heimes added the comment:
The ssl module exposes OpenSSL's PRNG and advertises the API as secure CPRNG:
http://docs.python.org/3/library/ssl.html#random-generation
OpenSSL uses its own PRNG to create (amongst others) session keys for SSL
connections.
--
Antoine Pitrou added the comment:
Using the custom builders, it seems to happen randomly in test_rlock:
test_rlock (test.test_multiprocessing_spawn.WithManagerTestLock) ... Assertion
failed: !collecting, file ..\Modules\gcmodule.c, line 1617
ok
Antoine Pitrou added the comment:
The ssl module exposes OpenSSL's PRNG and advertises the API as secure
CPRNG: http://docs.python.org/3/library/ssl.html#random-generation
AFAICT, Python's PRNG isn't reset after fork, so I don't think OpenSSL's
should be reset.
OTOH, multiprocessing does
Christian Heimes added the comment:
Python doesn't have a builtin PRNG. We use the OS's CPRNG such as /dev/urandom
or CryptGenRandom(). Both use a system wide state and are not affected by
process state. OpenSSL's PRNG is different because it uses an internal state.
AFAIK it only polls the
New submission from Maries Ionel Cristian:
Running the file couple of times will make the interpreter fail with:
libgcc_s.so.1 must be installed for pthread_cancel to work
From what I've seen it is triggered from PyThread_delete_key (tries to load
libgcc_s.so at that time).
How does it
Antoine Pitrou added the comment:
Python doesn't have a builtin PRNG.
Of course it does. It's in the random module, and you can seed() it:
random.seed(5)
random.random()
0.6229016948897019
random.random()
0.7417869892607294
random.seed(5)
random.random()
0.6229016948897019
See e.g.
Christian Heimes added the comment:
Am 15.08.2013 15:14, schrieb Antoine Pitrou:
Python doesn't have a builtin PRNG.
Of course it does. It's in the random module, and you can seed() it:
Now you are nit-picking. Although random is a PRNG, it is not a CPRNG.
I'm clearly talking about the
Antoine Pitrou added the comment:
When the OpenSSL's CPRNG is already initialized before 3) than all child
processes created by 3) will have almost the same PRNG state. According
to http://bugs.ruby-lang.org/issues/4579 the PRNG will return the same
value when PID numbers are recycled.
New submission from Steven D'Aprano:
I hope I'm doing the right thing by replying in-line. This is my first code
review, please let me know if I'm doing something wrong.
By the way, the email hasn't gone to the tracker again. Is that a bug in the
tracker? I've taken the liberty of changing
Ezio Melotti added the comment:
I hope I'm doing the right thing by replying in-line. This is my
first code review, please let me know if I'm doing something wrong.
By the way, the email hasn't gone to the tracker again. Is that a
bug in the tracker? I've taken the liberty of changing the
Christian Heimes added the comment:
Updated patch.
I'm going to add documentation when everybody is happy with the patch.
--
nosy: +pitrou
Added file: http://bugs.python.org/file31302/hashlib_abc2.patch
___
Python tracker rep...@bugs.python.org
Ben North added the comment:
Is anything further needed from me before this can be reviewed?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18533
___
Changes by Christian Heimes li...@cheimes.de:
--
stage: patch review - committed/rejected
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18532
___
Christian Heimes added the comment:
The builtin hash algorithms still had upper case names. I fixed it in
revision http://hg.python.org/cpython/rev/9a4949f5d15c
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18532
Terry J. Reedy added the comment:
Please visit
http://www.python.org/psf/contrib/
http://www.python.org/psf/contrib/contrib-form/
and submit a Contributor Agreement. This process is complete when '*' appears
after your name here, as with mine and others.
--
Changes by Larry Hastings la...@hastings.org:
--
nosy: +larry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13248
___
___
Python-bugs-list mailing
New submission from Andrew Svetlov:
I think this is a bug.
Can be reproduced on all Pythons (from 2.6 to 3.4a).
Maybe should be fixed for 3.4 only as backward incompatible change.
--
messages: 195263
nosy: asvetlov
priority: normal
severity: normal
status: open
title: ''' % [1] doens't
Changes by Senthil Kumaran sent...@uthcode.com:
--
nosy: +orsenthil
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13248
___
___
Python-bugs-list
STINNER Victor added the comment:
This issue was already discussed in the atfork issue:
http://bugs.python.org/issue16500#msg179838
See also:
http://www.openwall.com/lists/oss-security/2013/04/12/3
I believe it is wrong to fix this in PostgreSQL. Rather, this is a
bug in the OpenSSL fork
STINNER Victor added the comment:
Another link:
http://article.gmane.org/gmane.comp.encryption.openssl.user/48480/match=does+child+process+still+need+reseeded+after+fork
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18747
Antoine Pitrou added the comment:
Ok, I enabled faulthandler in the child process and I got the explanation:
http://buildbot.python.org/all/builders/AMD64%20Windows%20Server%202008%20%5BSB%5D%20custom/builds/5/steps/test/logs/stdio
multiprocessing's manager Server uses daemon threads... Daemon
New submission from Antoine Pitrou:
The Server class in multiprocessing.managers creates daemon threads and never
joins them. This is in contrast with e.g. the Pool class, which creates daemon
threads but uses util.Finalize to join them.
(not joining daemon threads may have adverse effects
R. David Murray added the comment:
What is it that doesn't fail? The expression in the title is the beginning of
a triple quoted string with no closing triple quote.
If you mean '' % [1] not falling, it has been that way forever (well, python2.4
is as far back as I can test), so if it is
STINNER Victor added the comment:
I don't understand why str % list and str % dict behaves differently than str %
int:
'abc' % [1]
'abc'
'abc' % ([1],)
Traceback (most recent call last):
File stdin, line 1, in module
TypeError: not all arguments converted during string formatting
'abc' %
Antoine Pitrou added the comment:
Thanks. One more question: is there a reason you don't simply call getvalue()
at the end (rather than seek(0) followed by several readline() calls)?
--
___
Python tracker rep...@bugs.python.org
Roundup Robot added the comment:
New changeset 0e9d41edb2e4 by Terry Jan Reedy in branch '2.7':
Issue #18425: Unittests for idlelib.IdleHistory. First patch by R. Jayakrishnan.
http://hg.python.org/cpython/rev/0e9d41edb2e4
New changeset c4cac5d73e9d by Terry Jan Reedy in branch '3.3':
Issue
R. David Murray added the comment:
haypo: str % dict is a feature:
%(a)s % {'a': 1, 'b': 2}
'1'
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18750
___
Tim Peters added the comment:
+1 on fixing it in 2.7, for the reasons Mark gave.
Way back when I introduced the original scheme, log(a_long) raised an
exception, and the `int` and `long` types had a much higher wall between them.
The original scheme changed an annoying failure into a pretty
Andrew Svetlov added the comment:
For dict it is correct from my perspective.
% {'a': 'b'}
tries to substitute format specs like %(a)s and does nothing if spec is not
present.
But list case like
% [1]
confuse me.
--
___
Python tracker
Roundup Robot added the comment:
New changeset 47307e7c80e1 by Terry Jan Reedy in branch '2.7':
Issue #18226: Fix ImportError and subsequent TypeError in 2.7 backport.
http://hg.python.org/cpython/rev/47307e7c80e1
--
___
Python tracker
Changes by Terry J. Reedy tjre...@udel.edu:
--
resolution: - fixed
superseder: - IdleHistory.History: eliminate unused parameter; other cleanup.
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18425
Changes by Terry J. Reedy tjre...@udel.edu:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18425
___
___
Python-bugs-list
Terry J. Reedy added the comment:
test.regrtest is semi-useless, at least for idle, in 2.7 -- see commit message.
First run single file directly or python -m test.test_idle.
--
___
Python tracker rep...@bugs.python.org
K Richard Pixley added the comment:
New info...
I see the degradation on most of the linux boxes I've tried:
* ubuntu-13.04, (raring), 64-bit
* rhel-5.4 64-bit
* rhel-5.7 64-bit
* suse-11 64-bit
I see some degradation on MacOsX-10.8.4 but it's in the acceptable range, more
like 2x than 60x.
K Richard Pixley added the comment:
Here's a script that tests for the problem.
--
Added file: http://bugs.python.org/file31303/tarproblem.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18744
Christian Heimes added the comment:
Thomas H. Ptacek pointed me to a good explanation:
http://security.stackexchange.com/a/3939
TL;DR: Just use /dev/urandom and be happy.
--
___
Python tracker rep...@bugs.python.org
Mark Dickinson added the comment:
Here's a patch that simply backports the Python 3.x code to Python 2.7.
--
keywords: +patch
Added file: http://bugs.python.org/file31304/issue18739.patch
___
Python tracker rep...@bugs.python.org
R. David Murray added the comment:
Yes, I suspect you are right that that is a bug...and a long standing one :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18750
___
Changes by Mark Dickinson dicki...@gmail.com:
--
assignee: - mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18739
___
___
Antoine Pitrou added the comment:
I'm gonna close this entry, since there's no actual issue to fix in Python.
--
resolution: - invalid
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13647
Roundup Robot added the comment:
New changeset 7339dcff171f by Terry Jan Reedy in branch '2.7':
Issue #18732: Remove unused* parameter output_sep from IdleHistory.History
http://hg.python.org/cpython/rev/7339dcff171f
New changeset 3105b78d3434 by Terry Jan Reedy in branch '3.3':
Issue #18732:
Antoine Pitrou added the comment:
Agreed with a re-wording.
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16190
___
___
Changes by Terry J. Reedy tjre...@udel.edu:
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18732
___
Antoine Pitrou added the comment:
Barry, do you still want to keep this issue open?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13146
___
___
Changes by Antoine Pitrou pit...@free.fr:
--
type: - crash
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17970
___
___
Python-bugs-list mailing
Antoine Pitrou added the comment:
I'm closing this as out-of-date (due to the new GIL in 3.2 and upwards).
--
resolution: - out of date
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6132
Antoine Pitrou added the comment:
Regenerated patch against latest default (fixing conflicts).
--
nosy: +pitrou
stage: needs patch - patch review
Added file: http://bugs.python.org/file31305/tarcli.patch
___
Python tracker rep...@bugs.python.org
Antoine Pitrou added the comment:
I would like to reject this approach. I am still adding Christian to the CC
list, in case he has something to say about it :)
--
nosy: +christian.heimes
resolution: - rejected
status: open - closed
___
Python
Christian Heimes added the comment:
I agree with Antoine. I'm not sure what is going to happen if you use a single
SSLContext for unrelated services and different hosts -- not to mention SNI.
A while ago I tried a similar patch but I was stopped by the fact that OpenSSL
doesn't provide an API
New submission from Terry J. Reedy:
It has become apparent from various discussions in recent months that
chain.from_iterable is at least as useful as chain. In fact, I now think that
'chain' should have been what chain.from_iterable is, with current chain(a,b,c)
done as chain((a,b,d)). But
Terry J. Reedy added the comment:
My counter proposal #18752 is that chain.from_iterable become a deprecated
alias for a new function, chain_iterable. With '@classmethod' removed, the
current Python equivalent would work for chain_iterable.
--
___
Ethan Furman added the comment:
+def __format__(self, *args, **kwargs):
+return self.__class__._member_type_.__format__(self.value, *args,
**kwargs)
+
With this in the Enum class all members simply forward formatting to the
mixed-in type, meaning that IntEnum behaves exactly like
Eli Bendersky added the comment:
The whole point of IntEnum and replacing stdlib constants with it was friendly
str repr out of the box. This means that just printing out an enum member
should have a nice string representation. And just printing out means:
print(member)
%s % member
Antoine Pitrou added the comment:
Here is a cleaned up patch.
However, I'm wondering if raising an error is a good idea. The effect will be
to get cryptic OSErrors at random execution points. Perhaps using
PyErr_WriteUnraisable would be better?
--
versions: -Python 2.6, Python 2.7,
Antoine Pitrou added the comment:
Outdated by PEP 442.
--
resolution: - out of date
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18121
___
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17930
___
___
Python-bugs-list
Eric V. Smith added the comment:
On 8/15/2013 5:46 PM, Eli Bendersky wrote:
The whole point of IntEnum and replacing stdlib constants with it was
friendly str repr out of the box. This means that just printing out an
enum member should have a nice string representation. And just printing
Julien Phalip added the comment:
Updated the patch to use a tuple instead of a list for the cookie flags.
--
Added file: http://bugs.python.org/file31307/cookies-httponly-secure-3.diff
___
Python tracker rep...@bugs.python.org
Eli Bendersky added the comment:
On Thu, Aug 15, 2013 at 3:20 PM, Eric V. Smith rep...@bugs.python.orgwrote:
Eric V. Smith added the comment:
On 8/15/2013 5:46 PM, Eli Bendersky wrote:
The whole point of IntEnum and replacing stdlib constants with it was
friendly str repr out of the
Ethan Furman added the comment:
Eli Bendersky added the comment:
Naturally, compatibility with % formatting is desired. '%s' is str, '%i' is
int().
Can we solve that one on this issue, or do we need to make another?
--
___
Python tracker
Eli Bendersky added the comment:
I guess there are merits to keeping it all in the same place.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18738
___
Christian Heimes added the comment:
Now with block_size
--
Added file: http://bugs.python.org/file31308/hashlib_abc3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18742
___
Changes by Christian Heimes li...@cheimes.de:
Removed file: http://bugs.python.org/file31295/hashlib_abc.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18742
___
Changes by Christian Heimes li...@cheimes.de:
Removed file: http://bugs.python.org/file31302/hashlib_abc2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18742
___
Ethan Furman added the comment:
Eric V. Smith added the comment:
I think the answers should be:
- Formats as int if the length of the format spec is = 1 and it ends in
one of bdoxX (the int presentation types).
Hmmm. How about defining the characters that will be supported for string
Eric V. Smith added the comment:
On 8/15/2013 7:09 PM, Ethan Furman wrote:
Ethan Furman added the comment:
Eric V. Smith added the comment:
I think the answers should be:
- Formats as int if the length of the format spec is = 1 and it ends in
one of bdoxX (the int presentation types).
Felipe Cruz added the comment:
Looks like PyErr_WriteUnraisable can be a better choice. Exceptions at random
execution points looks a little bit dirty at least for this case.
--
___
Python tracker rep...@bugs.python.org
Ethan Furman added the comment:
Eric V. Smith added the comment:
Ethan Furman added the comment:
Hmmm. How about defining the characters that will be supported for string
interpretation, and if there are any other
characters in format spec then go int (or whatever the mix-in type is)?
Eric V. Smith added the comment:
On 8/15/2013 8:20 PM, Ethan Furman wrote:
The characters I list are the justification chars and the digits that would
be used to specify the field width. If
those are the only characters given then treat the MixedEnum member as the
member string.
But a
Christian Heimes added the comment:
Brian Cameron from Oracle has requested a fix for Python 2.6. I have attached a
patch for 2.6. In order to compile and test the patch I had to modify _ssl.c to
handle OPENSSL_NO_SSL2. I also copied keycert.pem from 2.7 to fix two test
failures. The former
Gregory P. Smith added the comment:
your patch makes sense to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18742
___
___
Python-bugs-list
Eric V. Smith added the comment:
Objects/unicodeobject.c has this, at line 14316:
if (PyMapping_Check(args) !PyTuple_Check(args) !PyUnicode_Check(args))
ctx.dict = args;
else
ctx.dict = NULL;
and later at line 14348:
if (ctx.argidx ctx.arglen !ctx.dict) {
Changes by Eric V. Smith e...@trueblade.com:
--
title: '' % [1] doens't fail - '' % [1] doesn't fail
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18750
___
Ethan Furman added the comment:
Eric V. Smith added the comment:
But a datetime format string can end in 0, for example.
format(datetime.datetime.now(), '%H:%M:%S.00')
'20:25:27.00'
Not a problem, because once the digits were removed there would still be % : H
M S and ., so the datetime
Eric V. Smith added the comment:
On 8/16/2013 12:24 AM, Ethan Furman wrote:
Ethan Furman added the comment:
Eric V. Smith added the comment:
But a datetime format string can end in 0, for example.
format(datetime.datetime.now(), '%H:%M:%S.00')
'20:25:27.00'
Not a problem, because
96 matches
Mail list logo