Custom Query (26902 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (10 - 12 of 26902)

1 2 3 4 5 6 7 8 9 10 11 12 13 14
Ticket Resolution Summary Owner Reporter
#29007 fixed DecimalValidator crashes on NaN, SNan, Inf, and Infinity values nobody Fabio Bonelli
Description

DecimalValidator crashes if it receives a value like NaN, SNan, Inf, and Infinity.

>>> DecimalValidator(decimal_places=2, max_digits=10)(Decimal('NaN'))
...
  File "django/tests/validators/tests.py", line 322, in test_func
    validator(value)
  File "django/django/core/validators.py", line 417, in __call__
    if exponent >= 0:
TypeError: unorderable types: str() >= int()

PR

#29006 fixed DecimalField.clean() crashes on sNaN values Tim Graham Tim Graham
Description
>>> from django.forms import DecimalField
>>> DecimalField(max_digits=4, decimal_places=2)
>>> f.clean('sNan')
....
  File "django/django/forms/fields.py", line 148, in clean
    self.validate(value)
  File "django/django/forms/fields.py", line 354, in validate
    if not math.isfinite(value):
ValueError: cannot convert signaling NaN to float
#29005 wontfix django object builder nobody Sergey Glazyrin
Description

Hello guys!

I faced a situation where I need to patch django.contrib,auth.get_user function because the "openstack auth backend" should be aware of django request. Let me describe the situation.

We use django-websocket-redis python package for websocket stuff. We do subscribe to user's channels, so, uwsgi_websocket process should be aware of currently signed in user.

For example, here, django websocket redis requires a recognized user in request object https://github.com/jrief/django-websocket-redis/blob/master/ws4redis/redis_store.py#L22

BUT, the backend we use in our project requires "request object" inside to recognize if user signed in.

https://github.com/openstack/horizon/blob/master/openstack_auth/backend.py#L78

And as it suggests, it requires some monkey-patching

This required monkey-patching the contrib.auth middleware to make the request object available to the auth backend class.

Instead I propose to add a simple way to do monkey patching directly in django

For such purpose I added simple changes based on "Builder" design pattern, so we may build Django object in iterative way and avoid monkey patches at all in different python packages.

https://github.com/django/django/compare/master...sergeyglazyrindev:master

Such change will simplify django object adaptation in another python packages.

What do you think ?

1 2 3 4 5 6 7 8 9 10 11 12 13 14
Note: See TracQuery for help on using queries.
Back to Top