Repository: datajoint/datajoint-python (language: python)

Issue:
set 0.12 'enable_python_native_blobs' check to True
the enable_python_native_blobs check was intended only for 0.12 release transition. 
it should be removed for 0.13
remove 'enable_python_native_blobs' check
after https://github.com/datajoint/datajoint-matlab/issues/222
jobs table requires `enable_python_native_blobs`
Data serialized to the jobs table uses insert data which falls into the `enable_python_native_blobs` category, meaning that job reservation as currently written won't work without this flag enabled.

(some) Possible fixes:

1) Skip serializing this data for not-enabled native-blob installs
2) Temporarily set `enable_python_native_blobs` using dj.config contextmanager and insert
3) Recode blob logic to explicitly save using structured array

set 0.12 'enable_python_native_blobs' check to True
the enable_python_native_blobs check was intended only for 0.12 release transition. 
it should be removed for 0.13


Discussion / hints:
adjusted plan: 
* default value to true in 0.13
* remove entirely once dj0 is available in matlab https://github.com/datajoint/datajoint-matlab/issues/222
update README accordingly
original dj0 changes in: #520 (pr: #577)
related to default-enable in #761, and original expansion of blob formats in #520 (issue) and #577 (implementation)
Fix in #703 implements solution 2.
adjusted plan: 
* default value to true in 0.13
* remove entirely once dj0 is available in matlab https://github.com/datajoint/datajoint-matlab/issues/222
update README accordingly
original dj0 changes in: #520 (pr: #577)

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3ae977b60..e89866b04 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,7 @@
 * Support DataJoint datatype and connection plugins (#715, #729) PR 730, #735
 * Allow updating specified secondary attributes using `update1` PR #763
 * add dj.key_hash reference to dj.hash.key_hash, treat as 'public api'
+* default enable_python_native_blobs to True
 
 ### 0.12.8 -- Jan 12, 2021
 * table.children, .parents, .descendents, and ancestors can return queryable objects. PR #833
diff --git a/README.md b/README.md
index f77ae1f20..dc1577e1c 100644
--- a/README.md
+++ b/README.md
@@ -32,9 +32,10 @@ Some Python datatypes such as dicts were coerced into numpy recarrays and then f
 However, since some Python types were coerced into MATLAB types, old blobs and new blobs may now be fetched as different types of objects even if they were inserted the same way. 
 For example, new `dict` objects will be returned as `dict` while the same types of objects inserted with `datajoint 0.11` will be recarrays.
 
-Since this is a big change, we chose to disable full blob support by default as a temporary precaution, which will be removed in version 0.13.
+Since this is a big change, we chose to temporarily disable this feature by default in DataJoint for Python 0.12.x, allowing users to adjust their code if necessary. 
+From 13.x, the flag will default to True (on), and will ultimately be removed when corresponding decode support for the new format is added to datajoint-matlab (see: datajoint-matlab #222, datajoint-python #765).
 
-You may enable it by setting the `enable_python_native_blobs` flag in `dj.config`. 
+The flag is configured by setting the `enable_python_native_blobs` flag in `dj.config`. 
 
 ```python
 import datajoint as dj
@@ -68,7 +69,7 @@ as structured arrays, whereas new record inserted in DataJoint 0.12 with
 appropriate native python type (dict, etc).  
 Furthermore, DataJoint for MATLAB does not yet support unpacking native Python datatypes.
 
-With `dj.config["enable_python_native_blobs"]` set to `False` (default), 
+With `dj.config["enable_python_native_blobs"]` set to `False`, 
 any attempt to insert any datatype other than a numpy array will result in an exception.
 This is meant to get users to read this message in order to allow proper testing
 and migration of pre-0.12 pipelines to 0.12 in a safe manner.
diff --git a/datajoint/settings.py b/datajoint/settings.py
index 95cf1db20..28d386bdd 100644
--- a/datajoint/settings.py
+++ b/datajoint/settings.py
@@ -45,7 +45,7 @@
     'display.width': 14,
     'display.show_tuple_count': True,
     'database.use_tls': None,
-    'enable_python_native_blobs': False,  # python-native/dj0 encoding support
+    'enable_python_native_blobs': True,  # python-native/dj0 encoding support
 })
 
 logger = logging.getLogger(__name__)


Test patch:
diff --git a/tests/schema_external.py b/tests/schema_external.py
index 8f77e1ce0..7db44bc49 100644
--- a/tests/schema_external.py
+++ b/tests/schema_external.py
@@ -9,7 +9,6 @@
 import numpy as np
 
 schema = dj.Schema(PREFIX + '_extern', connection=dj.conn(**CONN_INFO))
-dj.config['enable_python_native_blobs'] = True
 
 
 stores_config = {
@@ -134,4 +133,4 @@ class FilepathS3(dj.Manual):
     img : filepath@repo_s3  # managed files 
     """
 
-dj.errors._switch_filepath_types(False)
\ No newline at end of file
+dj.errors._switch_filepath_types(False)
diff --git a/tests/test_blob_migrate.py b/tests/test_blob_migrate.py
index 088dad913..b76bc6790 100644
--- a/tests/test_blob_migrate.py
+++ b/tests/test_blob_migrate.py
@@ -7,7 +7,6 @@
 from . import S3_CONN_INFO, S3_MIGRATE_BUCKET
 from . import CONN_INFO
 from datajoint.migrate import _migrate_dj011_blob
-dj.config['enable_python_native_blobs'] = True
 
 
 class TestBlobMigrate:
diff --git a/tests/test_fetch.py b/tests/test_fetch.py
index c72c3c896..edd3772a0 100644
--- a/tests/test_fetch.py
+++ b/tests/test_fetch.py
@@ -7,7 +7,6 @@
 import warnings
 from . import schema
 import datajoint as dj
-dj.config['enable_python_native_blobs'] = True
 
 
 class TestFetch:
diff --git a/tests/test_fetch_same.py b/tests/test_fetch_same.py
index 08a5da4c6..976095b84 100644
--- a/tests/test_fetch_same.py
+++ b/tests/test_fetch_same.py
@@ -4,7 +4,6 @@
 import datajoint as dj
 
 schema = dj.Schema(PREFIX + '_fetch_same', connection=dj.conn(**CONN_INFO))
-dj.config['enable_python_native_blobs'] = True
 
 
 @schema
@@ -19,14 +18,13 @@ class ProjData(dj.Manual):
     """
 
 
-with dj.config(enable_python_native_blobs=True):
-    ProjData().insert([
-        {'id': 0, 'resp': 20.33, 'sim': 45.324, 'big': 3, 'blah': 'yes'},
-        {'id': 1, 'resp': 94.3, 'sim': 34.23,
-            'big': {'key1': np.random.randn(20, 10)}, 'blah': 'si'},
-        {'id': 2, 'resp': 1.90, 'sim': 10.23,
-            'big': np.random.randn(4, 2), 'blah': 'sim'}
-    ])
+ProjData().insert([
+    {'id': 0, 'resp': 20.33, 'sim': 45.324, 'big': 3, 'blah': 'yes'},
+    {'id': 1, 'resp': 94.3, 'sim': 34.23,
+        'big': {'key1': np.random.randn(20, 10)}, 'blah': 'si'},
+    {'id': 2, 'resp': 1.90, 'sim': 10.23,
+        'big': np.random.randn(4, 2), 'blah': 'sim'}
+])
 
 
 class TestFetchSame:
diff --git a/tests/test_jobs.py b/tests/test_jobs.py
index 58e47da66..5990c3019 100644
--- a/tests/test_jobs.py
+++ b/tests/test_jobs.py
@@ -4,7 +4,6 @@
 import random
 import string
 import datajoint as dj
-dj.config['enable_python_native_blobs'] = True
 
 subjects = schema.Subject()