Projet

Général

Profil

0001-python3-remove-execfile-which-isn-t-a-builtin-anymor.patch

Paul Marillonnet, 02 avril 2019 12:04

Télécharger (6,9 ko)

Voir les différences:

Subject: [PATCH] python3: remove "execfile", which isn't a builtin anymore
 (#31145)

 debian-wheezy/debian_config.py                  | 3 ++-
 debian-wheezy/multitenant/config.py             | 2 +-
 debian-wheezy/multitenant/debian_config.py      | 9 ++++++---
 debian/debian_config.py                         | 3 ++-
 debian/multitenant/config.py                    | 2 +-
 debian/multitenant/debian_config.py             | 9 ++++++---
 doc/conf.py                                     | 2 +-
 src/authentic2/management/commands/load-ldif.py | 3 ++-
 src/authentic2/settings.py                      | 3 ++-
 src/django_rbac/test_settings.py                | 3 ++-
 10 files changed, 25 insertions(+), 14 deletions(-)
debian-wheezy/debian_config.py
303 303

  
304 304
CONFIG_FILE = '/etc/authentic2/config.py'
305 305
if os.path.exists(CONFIG_FILE):
306
    execfile(CONFIG_FILE)
306
    with open(CONFIG_FILE) as fd:
307
        exec(fd.read())
307 308

  
308 309
# Warn if DEFAULT_FROM_EMAIL is the default value
309 310
if DEFAULT_FROM_EMAIL == 'webmaster@localhost':
debian-wheezy/multitenant/config.py
9 9
# WARNING! Quick-start development settings unsuitable for production!
10 10
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
11 11

  
12
# This file is sourced by "execfile" from /usr/lib/authentic/debian_config.py
12
# This file is sourced by "exec" from /usr/lib/authentic/debian_config.py
13 13

  
14 14
# SECURITY WARNING: don't run with debug turned on in production!
15 15
DEBUG = False
debian-wheezy/multitenant/debian_config.py
9 9
#
10 10
# hobotization (multitenant)
11 11
#
12
execfile('/usr/lib/hobo/debian_config_common.py')
12
with open('/usr/lib/hobo/debian_config_common.py') as fd:
13
    exec(fd.read())
13 14

  
14 15
# Add the XForwardedForMiddleware
15 16
MIDDLEWARE_CLASSES = ('authentic2.middleware.XForwardedForMiddleware',) + MIDDLEWARE_CLASSES
......
50 51

  
51 52
CONFIG_FILE='/etc/%s/config.py' % PROJECT_NAME
52 53
if os.path.exists(CONFIG_FILE):
53
    execfile(CONFIG_FILE)
54
    with open(CONFIG_FILE) as fd:
55
        exec(fd.read())
54 56

  
55 57
# run additional settings snippets
56
execfile('/usr/lib/hobo/debian_config_settings_d.py')
58
with open('/usr/lib/hobo/debian_config_settings_d.py') as fd:
59
    exec(fd.read())
debian/debian_config.py
309 309

  
310 310
CONFIG_FILE = '/etc/authentic2/config.py'
311 311
if os.path.exists(CONFIG_FILE):
312
    execfile(CONFIG_FILE)
312
    with open(CONFIG_FILE) as fd:
313
        exec(fd.read())
313 314

  
314 315
# Warn if DEFAULT_FROM_EMAIL is the default value
315 316
if DEFAULT_FROM_EMAIL == 'webmaster@localhost':
debian/multitenant/config.py
9 9
# WARNING! Quick-start development settings unsuitable for production!
10 10
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
11 11

  
12
# This file is sourced by "execfile" from
12
# This file is sourced by "exec" from
13 13
# /usr/lib/authentic2-multitenant/debian_config.py
14 14

  
15 15
# SECURITY WARNING: don't run with debug turned on in production!
debian/multitenant/debian_config.py
9 9
#
10 10
# hobotization (multitenant)
11 11
#
12
execfile('/usr/lib/hobo/debian_config_common.py')
12
with open('/usr/lib/hobo/debian_config_common.py') as fd:
13
    exec(fd.read())
13 14

  
14 15
# Add the XForwardedForMiddleware
15 16
MIDDLEWARE_CLASSES = ('authentic2.middleware.XForwardedForMiddleware',) + MIDDLEWARE_CLASSES
......
49 50

  
50 51
CONFIG_FILE='/etc/%s/config.py' % PROJECT_NAME
51 52
if os.path.exists(CONFIG_FILE):
52
    execfile(CONFIG_FILE)
53
    with open(CONFIG_FILE) as fd:
54
        exec(fd.read())
53 55

  
54 56
# run additional settings snippets
55
execfile('/usr/lib/hobo/debian_config_settings_d.py')
57
with open('/usr/lib/hobo/debian_config_settings_d.py') as fd:
58
    exec(fd.read())
doc/conf.py
3 3
# Authentic2 documentation build configuration file, created by
4 4
# sphinx-quickstart on Thu Oct 13 14:38:32 2011.
5 5
#
6
# This file is execfile()d with the current directory set to its containing dir.
6
# This file is exec()d with the current directory set to its containing dir.
7 7
#
8 8
# Note that not all possible configuration values are present in this
9 9
# autogenerated file.
src/authentic2/management/commands/load-ldif.py
26 26
        self.callback = None
27 27
        if 'callback' in self.options:
28 28
            d = globals().copy()
29
            execfile(self.options['callback'], d)
29
            with open(self.options['callback'], d) as fd:
30
                exec(fd.read())
30 31
            self.callback = d.get('callback')
31 32
        ldif.LDIFParser.__init__(self, *args, **kwargs)
32 33

  
src/authentic2/settings.py
333 333
#
334 334

  
335 335
if 'AUTHENTIC2_SETTINGS_FILE' in os.environ:
336
    execfile(os.environ['AUTHENTIC2_SETTINGS_FILE'])
336
    with open(os.environ['AUTHENTIC2_SETTINGS_FILE']) as fd:
337
        exec(fd.read())
337 338
logging.config.dictConfig(LOGGING)
src/django_rbac/test_settings.py
21 21
ALLOWED_HOSTS = []
22 22

  
23 23
if 'AUTHENTIC2_SETTINGS_FILE' in os.environ:
24
    execfile(os.environ['AUTHENTIC2_SETTINGS_FILE'])
24
    with open(os.environ['AUTHENTIC2_SETTINGS_FILE']) as fd:
25
        exec(fd.read())
25
-