mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	[1.8.x] Refs #24324 -- Fixed UnicodeEncodeError in SQLite backend while testing.
If 'name' contained non-ASCII characters, the comparison raised a
UnicodeEncodeError on Python 2.
Backport of 63c5c98701 from master
			
			
This commit is contained in:
		| @@ -299,7 +299,7 @@ class DatabaseWrapper(BaseDatabaseWrapper): | |||||||
|         self.cursor().execute("BEGIN") |         self.cursor().execute("BEGIN") | ||||||
|  |  | ||||||
|     def is_in_memory_db(self, name): |     def is_in_memory_db(self, name): | ||||||
|         return name == ":memory:" or "mode=memory" in name |         return name == ":memory:" or "mode=memory" in force_text(name) | ||||||
|  |  | ||||||
|  |  | ||||||
| FORMAT_QMARK_REGEX = re.compile(r'(?<!%)%s') | FORMAT_QMARK_REGEX = re.compile(r'(?<!%)%s') | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user