Legend:

1. global mutable data structures (lists and dictionaries, also instances) that are assigned to at module level but whose elements are modified in functions and that are accessed without using the `global` keyword (NOT THREAD-SAFE unless never modified).

22

22

23

We won't deal with read-only globals. `grep` in Django source finds the following other globals.

23

The following modules' use of globals needs review.

24

25

See below for raw `grep` results.

26

27

'''THE FOLLOWING IS WORK IN PROGRESS.'''

28

29

=== Settings ===

30

31

FIXME: not reviewed. Replacing the `global_settings` with `settings` -- probably no major issues.

Out of these, the following are read-only (i.e. not changed anywhere in code) or otherwise irrelevant: `contrib/admin, formtools tests, localflavor mappings, core/cache, core/handlers, core/serializers/__init__.py:BUILTIN_SERIALIZERS, core/servers,

162

163

`SITE_CACHE` and everything in `django.utils.translation.trans_real` has already been listed under `globals` above.

164

165

`_callable_cache` and `_resolver_cache` in django/core/urlresolvers.py are used within the memoize decorator, `result = func(*args)` may be called more than once in `utils/functional.py`, but this should generally be a non-issue.