Re: Exporting some of the `datetime` functions from `django.utils.timezone`

2023-03-20 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
I agree with Mariusz. Encouraging alternative import paths for standard library functions can only lead to confusing code. On Mon, Mar 20, 2023 at 11:47 AM Mariusz Felisiak < felisiak.mari...@gmail.com> wrote: > > I find it confusing that we have to import now from django.utils.timezone, > but ti

Test Errors, if `getpass.getuser` fails, i.e. tox on windows

2023-03-20 Thread Glen Fletcher
There are 4 tests in `auth_test/test_management.py` which fail when run by tox on windows. - `test_system_username` - Raises an `ImportError` - `test_non_ascii_verbose_name` - mock input mapping assumes default username, and raise an error - `test_default_username` - Enters an infinite loop aski

Re: Exporting some of the `datetime` functions from `django.utils.timezone`

2023-03-20 Thread Mariusz Felisiak
I find it confusing that we have to import now from django.utils.timezone, but timedelta from Python's internal datetime. This btw. is a violation of the Law of Demeter , hence I agree with Suayip's proposal. – Jacob There is a big difference be

Re: Exporting some of the `datetime` functions from `django.utils.timezone`

2023-03-20 Thread Jacob Rief
I find it confusing that we have to import now from django.utils.timezone, but timedelta from Python's internal datetime. This btw. is a violation of the Law of Demeter , hence I agree with Suayip's proposal. – Jacob On Monday, March 20, 2023 at 10

Re: Exporting some of the `datetime` functions from `django.utils.timezone`

2023-03-20 Thread Mariusz Felisiak
Hi, > I would say we should at least consider exporting `timedelta` What do you think? I'm strongly against it. Things should be imported from source modules, not cross-imported from Django modules just because we use them. This is confusing to the users who might have the impression that `dj

Django 4.2 release candidate 1 released

2023-03-20 Thread Mariusz Felisiak
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2023/mar/20/django-42-rc1/ -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop r