--- spyder/config/base.py.orig	2023-04-10 22:33:18
+++ spyder/config/base.py	2023-04-10 22:34:25
@@ -127,28 +127,33 @@
 #==============================================================================
 def get_conf_subfolder():
     """Return the configuration subfolder for different ooperating systems."""
-    # Spyder settings dir
-    # NOTE: During the 2.x.x series this dir was named .spyder2, but
-    # since 3.0+ we've reverted back to use .spyder to simplify major
-    # updates in version (required when we change APIs by Linux
-    # packagers)
-    if sys.platform.startswith('linux'):
-        SUBFOLDER = 'spyder'
-    else:
-        SUBFOLDER = '.spyder'
-
-    # We can't have PY2 and PY3 settings in the same dir because:
-    # 1. This leads to ugly crashes and freezes (e.g. by trying to
-    #    embed a PY2 interpreter in PY3)
-    # 2. We need to save the list of installed modules (for code
-    #    completion) separately for each version
-    SUBFOLDER = SUBFOLDER + '-py3'
+##    # Spyder settings dir
+##    # NOTE: During the 2.x.x series this dir was named .spyder2, but
+##    # since 3.0+ we've reverted back to use .spyder to simplify major
+##    # updates in version (required when we change APIs by Linux
+##    # packagers)
+##    if sys.platform.startswith('linux'):
+##        SUBFOLDER = 'spyder'
+##    else:
+##        SUBFOLDER = '.spyder'
+##
+##    # We can't have PY2 and PY3 settings in the same dir because:
+##    # 1. This leads to ugly crashes and freezes (e.g. by trying to
+##    #    embed a PY2 interpreter in PY3)
+##    # 2. We need to save the list of installed modules (for code
+##    #    completion) separately for each version
+##    SUBFOLDER = SUBFOLDER + '-py3'
+##
+##    # If running a development/beta version, save config in a separate
+##    # directory to avoid wiping or contaiminating the user's saved stable
+##    # configuration.
+##    if use_dev_config_dir():
+##        SUBFOLDER = SUBFOLDER + '-dev'
 
-    # If running a development/beta version, save config in a separate
-    # directory to avoid wiping or contaiminating the user's saved stable
-    # configuration.
-    if use_dev_config_dir():
-        SUBFOLDER = SUBFOLDER + '-dev'
+    # MacPorts: we allow multiple Python 3.x versions side-by-side;
+    # keep preferences separate.
+    SUBFOLDER = '.spyder%s-%s%s' % (__version__.split('.')[0],
+                                    sys.version_info[0], sys.version_info[1])
 
     return SUBFOLDER