Opened 15 months ago

Closed 15 months ago

Last modified 15 months ago

#21880 closed Cleanup/optimization (fixed)

from django.utils.timezone import * does not work as expected

Reported by: wim@… Owned by: nobody
Component: Uncategorized Version: 1.6
Severity: Normal Keywords: timezone import *
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation:
Needs tests: Patch needs improvement:
Easy pickings: no UI/UX: no

Description

Hi,

from django.utils.timezone import * does not work as expected.

  1. Not all functions documented (https://docs.djangoproject.com/en/1.6/ref/utils/#module-django.utils.timezone ) are in all
  1. In Django 1.7, there is one more, but many are missing:
    __all__ = [
        'utc', 'get_fixed_timezone',
        'get_default_timezone', 'get_current_timezone',
        'activate', 'deactivate', 'override',
        'is_naive', 'is_aware', 'make_aware', 'make_naive',
    ] 
    

It would be very convenient for testing to be able to import * and get all the available functions

Change History (2)

comment:1 Changed 15 months ago by Aymeric Augustin <aymeric.augustin@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 2b154ae2803d46c68d3ec78789866d22231a92d0:

Fixed #21880 -- Added missing items to django.utils.timezone.all.

Thanks Wim for the report.

comment:2 Changed 15 months ago by Aymeric Augustin <aymeric.augustin@…>

In db60a520857dfe1564d824809dacfffd55662a16:

[1.6.x] Fixed #21880 -- Added missing items to django.utils.timezone.all.

Thanks Wim for the report.

Backport of 2b154ae from master.

Note: See TracTickets for help on using tickets.
Back to Top