Devid

Results 140 comments of Devid

Sure, as soon as I can find enough time to work on it.

To better handle "password change" events it could be nice to insert an `AccessLog` with a null `attempt_time` which could mean "this is a logout log for this user, we...

A workaround for this is to use `ExpressionWrapper`: ```python from django.db.models import DurationField, ExpressionWrapper, F from django.db.models.functions import Extract MyModel.objects.annotate( epoch=Extract( ExpressionWrapper(F('myfield'), DurationField()), 'epoch', ), ) ```

Seems that I forgot to explicity setup the codecov token for upload, the solution would be to add the that step (as pointed [here](https://github.com/marketplace/actions/codecov#usage)) ```yaml env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}...

@auvipy yes, that may work better. I can also point out that the `WrappedAttributeError` it should be added every other properties (inside them, as it was pointed out that a...

PS: I am curious to see if the same issue would be raised by `cached_property`, this because many properties on DRF `Request` looks something which can also be implemented using...

> Noob question, but why does `Request.__getattr__` call `self.__getattribute__` when an `AttributeError` occurs? Based on the Python Data model linked above, `__getattr__` should only run if `__getattribute__` fails in the...

> either [__getattribute__()](https://docs.python.org/3.11/reference/datamodel.html#object.__getattribute__) raises an [AttributeError](https://docs.python.org/3.11/library/exceptions.html#AttributeError) because name is not an instance attribute or an attribute in the class tree for self; or [__get__()](https://docs.python.org/3.11/reference/datamodel.html#object.__get__) of a name property raises [AttributeError](https://docs.python.org/3.11/library/exceptions.html#AttributeError)...

Found the bug https://bugs.python.org/issue45985 The reason is that `.data` is a property, thus _as of now_ it is catching the `AttributeError` and thus calling `__getattr__`.

Just try it! ```python class TestBrokenPerser(SimpleTestCase): def setUp(self): self.factory = APIRequestFactory() def test_post_accessed_in_post_method(self): django_request = self.factory.post('/', {'foo': 'bar'}, content_type='application/json') request = Request(django_request, parsers=[BrokenParser()]) with self.assertRaises(AttributeError, msg='no in parse'): request._parse() with...