Changes between Version 11 and Version 12 of DjangoSpecifications/Core/Threading


Ignore:
Timestamp:
04/13/2008 03:16:34 PM (7 years ago)
Author:
mrts
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DjangoSpecifications/Core/Threading

    v11 v12  
    2121 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).
    2222
    23 We won't deal with read-only globals. `grep` in Django source finds the following other globals.
     23The following modules' use of globals needs review.
     24
     25See below for raw `grep` results.
     26
     27'''THE FOLLOWING IS WORK IN PROGRESS.'''
     28
     29=== Settings ===
     30
     31FIXME: not reviewed. Replacing the `global_settings` with `settings` -- probably no major issues.
     32
     33=== django/contrib/sites/models.py ===
     34
     35Globals used:
     36{{{
     37SITE_CACHE
     38}}}
     39
     40=== django/template ===
     41
     42Globals used:
     43{{{
     44context.py: _standard_context_processors
     45__init__.py: invalid_var_format_string, libraries
     46loader.py: template_source_loaders
     47}}}
     48
     49=== django/utils/translation ===
     50
     51Globals used:
     52{{{
     53trans_real.py: _accepted, _active, _default, _translations
     54}}}
     55
     56=== django/contrib/sites/models.py ===
     57
     58Globals used:
     59{{{
     60SITE_CACHE
     61}}}
     62
     63
     64
     65{{{
     66}}}
     67
     68== Raw `grep` results ==
    2469
    2570=== Globals accessed with the `global` keyword ===
     
    4388django/utils/translation/trans_real.py:    global _translations
    4489}}}
     90
     91Out of these, `django.core.management` is not used in multi-threading context.
    4592
    4693=== Global dictionaries ===
     
    112159}}}
    113160
     161Out 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.
     166
     167That leaves the following relevant global dicts not listed before:
     168{{{
     169django/core/serializers/__init__.py:_serializers = {}
     170}}}
     171
    114172=== Global lists ===
    115173
Back to Top