diff options
| author | Dan Davis <danizen@users.noreply.github.com> | 2019-02-13 13:59:44 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2019-02-13 14:00:53 -0500 |
| commit | 5e94c817ee26a13e141a11a2f429f9ee2cc37ab0 (patch) | |
| tree | 1e72185ce851768a48cc49812f95af6f4770c9d8 /django | |
| parent | f2b460231dc15d4d0629b856f31ff9433da07f95 (diff) | |
[2.2.x] Fixed #30184 -- Removed ellipsis characters from shell output strings.
Partially reverted 50b8493581fea3d7137dd8db33bac7008868d23a (refs #29654)
to avoid a crash when the user shell doesn't support non-ASCII characters.
Backport of 2bd8df243ac6fc35e58c9fe90b20c9e42519a5ac from master.
Diffstat (limited to 'django')
| -rw-r--r-- | django/contrib/gis/utils/layermapping.py | 2 | ||||
| -rw-r--r-- | django/core/management/commands/loaddata.py | 4 | ||||
| -rw-r--r-- | django/core/management/commands/migrate.py | 10 | ||||
| -rw-r--r-- | django/core/management/commands/runserver.py | 2 | ||||
| -rw-r--r-- | django/core/management/commands/showmigrations.py | 2 | ||||
| -rw-r--r-- | django/core/management/commands/squashmigrations.py | 2 | ||||
| -rw-r--r-- | django/db/backends/base/creation.py | 8 | ||||
| -rw-r--r-- | django/db/backends/mysql/creation.py | 2 | ||||
| -rw-r--r-- | django/db/backends/oracle/creation.py | 18 | ||||
| -rw-r--r-- | django/db/backends/postgresql/creation.py | 2 | ||||
| -rw-r--r-- | django/db/backends/sqlite3/creation.py | 4 | ||||
| -rw-r--r-- | django/db/models/query.py | 2 | ||||
| -rw-r--r-- | django/db/models/sql/query.py | 2 |
13 files changed, 30 insertions, 30 deletions
diff --git a/django/contrib/gis/utils/layermapping.py b/django/contrib/gis/utils/layermapping.py index 91537ba3ac..b7372f47b3 100644 --- a/django/contrib/gis/utils/layermapping.py +++ b/django/contrib/gis/utils/layermapping.py @@ -594,7 +594,7 @@ class LayerMapping: # Printing progress information, if requested. if progress and num_feat % progress_interval == 0: - stream.write('Processed %d features, saved %d …\n' % (num_feat, num_saved)) + stream.write('Processed %d features, saved %d ...\n' % (num_feat, num_saved)) # Only used for status output purposes -- incremental saving uses the # values returned here. diff --git a/django/core/management/commands/loaddata.py b/django/core/management/commands/loaddata.py index 40d75b58e4..5559225a80 100644 --- a/django/core/management/commands/loaddata.py +++ b/django/core/management/commands/loaddata.py @@ -226,7 +226,7 @@ class Command(BaseCommand): ser_fmts = serializers.get_public_serializer_formats() if ser_fmt is None else [ser_fmt] if self.verbosity >= 2: - self.stdout.write("Loading '%s' fixtures…" % fixture_name) + self.stdout.write("Loading '%s' fixtures..." % fixture_name) if os.path.isabs(fixture_name): fixture_dirs = [os.path.dirname(fixture_name)] @@ -247,7 +247,7 @@ class Command(BaseCommand): fixture_files = [] for fixture_dir in fixture_dirs: if self.verbosity >= 2: - self.stdout.write("Checking %s for fixtures…" % humanize(fixture_dir)) + self.stdout.write("Checking %s for fixtures..." % humanize(fixture_dir)) fixture_files_in_dir = [] path = os.path.join(fixture_dir, fixture_name) for candidate in glob.iglob(glob.escape(path) + '*'): diff --git a/django/core/management/commands/migrate.py b/django/core/management/commands/migrate.py index c2d0c16816..4914da6803 100644 --- a/django/core/management/commands/migrate.py +++ b/django/core/management/commands/migrate.py @@ -263,7 +263,7 @@ class Command(BaseCommand): if action == "apply_start": if compute_time: self.start = time.time() - self.stdout.write(" Applying %s…" % migration, ending="") + self.stdout.write(" Applying %s..." % migration, ending="") self.stdout.flush() elif action == "apply_success": elapsed = " (%.3fs)" % (time.time() - self.start) if compute_time else "" @@ -274,7 +274,7 @@ class Command(BaseCommand): elif action == "unapply_start": if compute_time: self.start = time.time() - self.stdout.write(" Unapplying %s…" % migration, ending="") + self.stdout.write(" Unapplying %s..." % migration, ending="") self.stdout.flush() elif action == "unapply_success": elapsed = " (%.3fs)" % (time.time() - self.start) if compute_time else "" @@ -285,7 +285,7 @@ class Command(BaseCommand): elif action == "render_start": if compute_time: self.start = time.time() - self.stdout.write(" Rendering model states…", ending="") + self.stdout.write(" Rendering model states...", ending="") self.stdout.flush() elif action == "render_success": elapsed = " (%.3fs)" % (time.time() - self.start) if compute_time else "" @@ -321,7 +321,7 @@ class Command(BaseCommand): # Create the tables for each model if self.verbosity >= 1: - self.stdout.write(" Creating tables…\n") + self.stdout.write(" Creating tables...\n") with connection.schema_editor() as editor: for app_name, model_list in manifest.items(): for model in model_list: @@ -338,7 +338,7 @@ class Command(BaseCommand): # Deferred SQL is executed when exiting the editor's context. if self.verbosity >= 1: - self.stdout.write(" Running deferred SQL…\n") + self.stdout.write(" Running deferred SQL...\n") @staticmethod def describe_operation(operation, backwards): diff --git a/django/core/management/commands/runserver.py b/django/core/management/commands/runserver.py index 862da12c64..90c8f9161c 100644 --- a/django/core/management/commands/runserver.py +++ b/django/core/management/commands/runserver.py @@ -113,7 +113,7 @@ class Command(BaseCommand): shutdown_message = options.get('shutdown_message', '') quit_command = 'CTRL-BREAK' if sys.platform == 'win32' else 'CONTROL-C' - self.stdout.write("Performing system checks…\n\n") + self.stdout.write("Performing system checks...\n\n") self.check(display_num_errors=True) # Need to check migrations here, so can't use the # requires_migrations_check attribute. diff --git a/django/core/management/commands/showmigrations.py b/django/core/management/commands/showmigrations.py index 4c86ba1a17..0722af7362 100644 --- a/django/core/management/commands/showmigrations.py +++ b/django/core/management/commands/showmigrations.py @@ -124,7 +124,7 @@ class Command(BaseCommand): for parent in sorted(node.parents): out.append("%s.%s" % parent.key) if out: - return " … (%s)" % ", ".join(out) + return " ... (%s)" % ", ".join(out) return "" for node in plan: diff --git a/django/core/management/commands/squashmigrations.py b/django/core/management/commands/squashmigrations.py index 4a0ab6af83..9baf91c484 100644 --- a/django/core/management/commands/squashmigrations.py +++ b/django/core/management/commands/squashmigrations.py @@ -139,7 +139,7 @@ class Command(BaseCommand): new_operations = operations else: if self.verbosity > 0: - self.stdout.write(self.style.MIGRATE_HEADING("Optimizing…")) + self.stdout.write(self.style.MIGRATE_HEADING("Optimizing...")) optimizer = MigrationOptimizer() new_operations = optimizer.optimize(operations, migration.app_label) diff --git a/django/db/backends/base/creation.py b/django/db/backends/base/creation.py index 5c55efeded..f36d60a5fe 100644 --- a/django/db/backends/base/creation.py +++ b/django/db/backends/base/creation.py @@ -45,7 +45,7 @@ class BaseDatabaseCreation: if keepdb: action = "Using existing" - self.log('%s test database for alias %s…' % ( + self.log('%s test database for alias %s...' % ( action, self._get_database_display_str(verbosity, test_database_name), )) @@ -182,7 +182,7 @@ class BaseDatabaseCreation: if autoclobber or confirm == 'yes': try: if verbosity >= 1: - self.log('Destroying old test database for alias %s…' % ( + self.log('Destroying old test database for alias %s...' % ( self._get_database_display_str(verbosity, test_database_name), )) cursor.execute('DROP DATABASE %(dbname)s' % test_db_params) @@ -206,7 +206,7 @@ class BaseDatabaseCreation: action = 'Cloning test database' if keepdb: action = 'Using existing clone' - self.log('%s for alias %s…' % ( + self.log('%s for alias %s...' % ( action, self._get_database_display_str(verbosity, source_database_name), )) @@ -248,7 +248,7 @@ class BaseDatabaseCreation: action = 'Destroying' if keepdb: action = 'Preserving' - self.log('%s test database for alias %s…' % ( + self.log('%s test database for alias %s...' % ( action, self._get_database_display_str(verbosity, test_database_name), )) diff --git a/django/db/backends/mysql/creation.py b/django/db/backends/mysql/creation.py index 8ccd211b0e..0e5bfca7b9 100644 --- a/django/db/backends/mysql/creation.py +++ b/django/db/backends/mysql/creation.py @@ -44,7 +44,7 @@ class DatabaseCreation(BaseDatabaseCreation): return try: if verbosity >= 1: - self.log('Destroying old test database for alias %s…' % ( + self.log('Destroying old test database for alias %s...' % ( self._get_database_display_str(verbosity, target_database_name), )) cursor.execute('DROP DATABASE %(dbname)s' % test_db_params) diff --git a/django/db/backends/oracle/creation.py b/django/db/backends/oracle/creation.py index 741a03ae0e..2f4abfbc99 100644 --- a/django/db/backends/oracle/creation.py +++ b/django/db/backends/oracle/creation.py @@ -44,7 +44,7 @@ class DatabaseCreation(BaseDatabaseCreation): "Type 'yes' to delete it, or 'no' to cancel: " % parameters['user']) if autoclobber or confirm == 'yes': if verbosity >= 1: - self.log("Destroying old test database for alias '%s'…" % self.connection.alias) + self.log("Destroying old test database for alias '%s'..." % self.connection.alias) try: self._execute_test_db_destruction(cursor, parameters, verbosity) except DatabaseError as e: @@ -69,7 +69,7 @@ class DatabaseCreation(BaseDatabaseCreation): if self._test_user_create(): if verbosity >= 1: - self.log('Creating test user…') + self.log('Creating test user...') try: self._create_test_user(cursor, parameters, verbosity, keepdb) except Exception as e: @@ -84,10 +84,10 @@ class DatabaseCreation(BaseDatabaseCreation): if autoclobber or confirm == 'yes': try: if verbosity >= 1: - self.log('Destroying old test user…') + self.log('Destroying old test user...') self._destroy_test_user(cursor, parameters, verbosity) if verbosity >= 1: - self.log('Creating test user…') + self.log('Creating test user...') self._create_test_user(cursor, parameters, verbosity, keepdb) except Exception as e: self.log('Got an error recreating the test user: %s' % e) @@ -143,14 +143,14 @@ class DatabaseCreation(BaseDatabaseCreation): if autoclobber or confirm == 'yes': try: if verbosity >= 1: - self.log('Destroying old test user…') + self.log('Destroying old test user...') self._destroy_test_user(cursor, parameters, verbosity) except Exception as e: self.log('Got an error destroying the test user: %s' % e) sys.exit(2) try: if verbosity >= 1: - self.log("Destroying old test database for alias '%s'…" % self.connection.alias) + self.log("Destroying old test database for alias '%s'..." % self.connection.alias) self._execute_test_db_destruction(cursor, parameters, verbosity) except Exception as e: self.log('Got an error destroying the test database: %s' % e) @@ -176,11 +176,11 @@ class DatabaseCreation(BaseDatabaseCreation): with self._maindb_connection.cursor() as cursor: if self._test_user_create(): if verbosity >= 1: - self.log('Destroying test user…') + self.log('Destroying test user...') self._destroy_test_user(cursor, parameters, verbosity) if self._test_database_create(): if verbosity >= 1: - self.log('Destroying test database tables…') + self.log('Destroying test database tables...') self._execute_test_db_destruction(cursor, parameters, verbosity) self._maindb_connection.close() @@ -262,7 +262,7 @@ class DatabaseCreation(BaseDatabaseCreation): def _destroy_test_user(self, cursor, parameters, verbosity): if verbosity >= 2: self.log('_destroy_test_user(): user=%s' % parameters['user']) - self.log('Be patient. This can take some time…') + self.log('Be patient. This can take some time...') statements = [ 'DROP USER %(user)s CASCADE', ] diff --git a/django/db/backends/postgresql/creation.py b/django/db/backends/postgresql/creation.py index b37766b834..09af818b1e 100644 --- a/django/db/backends/postgresql/creation.py +++ b/django/db/backends/postgresql/creation.py @@ -67,7 +67,7 @@ class DatabaseCreation(BaseDatabaseCreation): except Exception: try: if verbosity >= 1: - self.log('Destroying old test database for alias %s…' % ( + self.log('Destroying old test database for alias %s...' % ( self._get_database_display_str(verbosity, target_database_name), )) cursor.execute('DROP DATABASE %(dbname)s' % test_db_params) diff --git a/django/db/backends/sqlite3/creation.py b/django/db/backends/sqlite3/creation.py index d22d8358a7..3fcf668ced 100644 --- a/django/db/backends/sqlite3/creation.py +++ b/django/db/backends/sqlite3/creation.py @@ -25,7 +25,7 @@ class DatabaseCreation(BaseDatabaseCreation): if not self.is_in_memory_db(test_database_name): # Erase the old test database if verbosity >= 1: - self.log('Destroying old test database for alias %s…' % ( + self.log('Destroying old test database for alias %s...' % ( self._get_database_display_str(verbosity, test_database_name), )) if os.access(test_database_name, os.F_OK): @@ -64,7 +64,7 @@ class DatabaseCreation(BaseDatabaseCreation): if keepdb: return if verbosity >= 1: - self.log('Destroying old test database for alias %s…' % ( + self.log('Destroying old test database for alias %s...' % ( self._get_database_display_str(verbosity, target_database_name), )) try: diff --git a/django/db/models/query.py b/django/db/models/query.py index f92998e7ad..ffd8626f4b 100644 --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -249,7 +249,7 @@ class QuerySet: def __repr__(self): data = list(self[:REPR_OUTPUT_SIZE + 1]) if len(data) > REPR_OUTPUT_SIZE: - data[-1] = "…(remaining elements truncated)…" + data[-1] = "...(remaining elements truncated)..." return '<%s %r>' % (self.__class__.__name__, data) def __len__(self): diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 675ff8c176..ffa8db86f2 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -614,7 +614,7 @@ class Query: # really make sense (or return consistent value sets). Not worth # the extra complexity when you can write a real query instead. if self._extra and rhs._extra: - raise ValueError("When merging querysets using 'or', you cannot have extra(select=…) on both sides.") + raise ValueError("When merging querysets using 'or', you cannot have extra(select=...) on both sides.") self.extra.update(rhs.extra) extra_select_mask = set() if self.extra_select_mask is not None: |
