]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
rename elements to main
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 11 Oct 2021 16:30:10 +0000 (12:30 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 11 Oct 2021 16:32:45 +0000 (12:32 -0400)
There are still some SQLite / MySQL specific occurrences
of "master" but this is most of it.

Change-Id: I0144c992e2f0207777e20e058b63a11c031986b9

.github/workflows/run-on-pr.yaml
.github/workflows/run-test.yaml
lib/sqlalchemy/testing/plugin/bootstrap.py
lib/sqlalchemy/testing/plugin/plugin_base.py
setup.cfg
test/orm/declarative/test_basic.py
test/orm/test_froms.py
tox.ini

index afa2066666612dc9bdabd37be688534e7449128a..ca1864899823a40944a7c1a86462bd0712ac1d5b 100644 (file)
@@ -1,10 +1,10 @@
 name: Run tests on a pr
 
 on:
-  # run on pull request to master excluding changes that are only on doc or example folders
+  # run on pull request to main excluding changes that are only on doc or example folders
   pull_request:
     branches:
-      - master
+      - main
     paths-ignore:
       - "examples/**"
 
@@ -118,7 +118,7 @@ jobs:
       - name: Run tests
         run: tox -e pep8
 
-  # Arm emulation is quite slow (~20min) so for now just run it when merging to master
+  # Arm emulation is quite slow (~20min) so for now just run it when merging to main
   # run-test-arm64:
   #   name: ${{ matrix.python-version }}-${{ matrix.build-type }}-arm64-ubuntu-latest
   #   runs-on: ubuntu-latest
index eae148d5f8fb5d296d913af40812195a75617b5b..cd71555bdf7b3e7497383b69cc9d0c176b77b2fb 100644 (file)
@@ -1,10 +1,10 @@
 name: Run tests
 
 on:
-  # run on push in master or rel_* branches excluding changes are only on doc or example folders
+  # run on push in main or rel_* branches excluding changes are only on doc or example folders
   push:
     branches:
-      - master
+      - main
       - "rel_*"
       # branches used to test the workflow
       - "workflow_test_*"
index 1f568dfc8f52638d0e433b8c8e3a756a4d450ffd..b4691c57d421a7960e490e171cebea09d1233ddf 100644 (file)
@@ -12,7 +12,7 @@ of the same test environment and standard suites available to
 SQLAlchemy/Alembic themselves without the need to ship/install a separate
 package outside of SQLAlchemy.
 
-NOTE:  copied/adapted from SQLAlchemy master for backwards compatibility;
+NOTE:  copied/adapted from SQLAlchemy main for backwards compatibility;
 this should be removable when Alembic targets SQLAlchemy 1.0.0.
 
 """
index 8f486dc8db8bddcabd2f96bc9437cae964362386..d2e4a0f690ab3e9aec211c5452d6456c68370226 100644 (file)
@@ -434,7 +434,7 @@ def _engine_uri(options, file_config):
     for db_url in expanded_urls:
         log.info("Adding database URL: %s", db_url)
 
-        if options.write_idents and provision.FOLLOWER_IDENT:  # != 'master':
+        if options.write_idents and provision.FOLLOWER_IDENT:
             with open(options.write_idents, "a") as file_:
                 file_.write(provision.FOLLOWER_IDENT + " " + db_url + "\n")
 
index dd96a5f3c49f2fa8846e724ad03cf171e6179b4b..b79602728a968b4841261dc91d778d78538083e5 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -175,4 +175,4 @@ mssql_pymssql = mssql+pymssql://scott:tiger@ms_2008
 docker_mssql = mssql+pymssql://scott:tiger^5HHH@127.0.0.1:1433/test
 oracle = oracle://scott:tiger@127.0.0.1:1521
 oracle8 = oracle://scott:tiger@127.0.0.1:1521/?use_ansi=0
-firebird = firebird://sysdba:masterkey@localhost//Users/classic/foo.fdb
+firebird = firebird://sysdba:mainkey@localhost//Users/classic/foo.fdb
index 14f25c4793893d0a5ce6500d92323ffd2b7ed6ee..a405b9f2c6a93c7e7d2c21743e3ce60c234fe633 100644 (file)
@@ -1211,9 +1211,9 @@ class DeclarativeTest(DeclarativeTestBase):
 
         # test [ticket:1492]
 
-        class Master(Base):
+        class Topic(Base):
 
-            __tablename__ = "master"
+            __tablename__ = "topic"
             id = Column(
                 Integer, primary_key=True, test_needs_autoincrement=True
             )
@@ -1224,23 +1224,23 @@ class DeclarativeTest(DeclarativeTestBase):
             id = Column(
                 Integer, primary_key=True, test_needs_autoincrement=True
             )
-            master_id = Column(None, ForeignKey(Master.id))
-            master = relationship(Master)
+            topic_id = Column(None, ForeignKey(Topic.id))
+            topic = relationship(Topic)
 
         Base.metadata.create_all(testing.db)
         configure_mappers()
-        assert class_mapper(Detail).get_property("master").strategy.use_get
-        m1 = Master()
-        d1 = Detail(master=m1)
+        assert class_mapper(Detail).get_property("topic").strategy.use_get
+        t1 = Topic()
+        d1 = Detail(topic=t1)
         sess = fixture_session()
         sess.add(d1)
         sess.flush()
         sess.expunge_all()
         d1 = sess.query(Detail).first()
-        m1 = sess.query(Master).first()
+        t1 = sess.query(Topic).first()
 
         def go():
-            assert d1.master
+            assert d1.topic
 
         self.assert_sql_count(testing.db, go, 0)
 
index 640ee45d21296a517c431448ba47f541fda5afe9..d6579cebd1d5778f6f5f4075a75b36724771133c 100644 (file)
@@ -3636,7 +3636,7 @@ class ExternalColumnsTest(QueryTest):
         # TODO: ISSUE: BUG:  cached metadata is confusing the user.id
         # column here with the anon_1 for some reason, when we
         # use compiled cache.  this bug may even be present in
-        # regular master / 1.3.  right now the caching of result
+        # regular main / 1.3.  right now the caching of result
         # metadata is disabled.
         eq_(sess.query(Address).all(), address_result)
 
diff --git a/tox.ini b/tox.ini
index 67731240aded08e4a734961f2a4d03971a92f7b4..ef85da8196aa7896e074dd12147314ff5904319b 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -38,20 +38,20 @@ deps=
 
      mssql: .[mssql]
 
-     dbapimaster-sqlite: git+https://github.com/omnilib/aiosqlite.git#egg=aiosqlite
-     dbapimaster-sqlite: git+https://github.com/coleifer/sqlcipher3.git#egg=sqlcipher3
+     dbapimain-sqlite: git+https://github.com/omnilib/aiosqlite.git#egg=aiosqlite
+     dbapimain-sqlite: git+https://github.com/coleifer/sqlcipher3.git#egg=sqlcipher3
 
-     dbapimaster-postgresql: git+https://github.com/psycopg/psycopg2.git@master#egg=psycopg2
-     dbapimaster-postgresql: git+https://github.com/MagicStack/asyncpg.git#egg=asyncpg
-     dbapimaster-postgresql: git+https://github.com/tlocke/pg8000.git#egg=pg8000
+     dbapimain-postgresql: git+https://github.com/psycopg/psycopg2.git#egg=psycopg2
+     dbapimain-postgresql: git+https://github.com/MagicStack/asyncpg.git#egg=asyncpg
+     dbapimain-postgresql: git+https://github.com/tlocke/pg8000.git#egg=pg8000
 
-     dbapimaster-mysql: git+https://github.com/PyMySQL/mysqlclient-python.git@master#egg=mysqlclient
-     dbapimaster-mysql: git+https://github.com/PyMySQL/PyMySQL.git@master#egg=pymysql
-     dbapimaster-mysql: git+https://github.com/mariadb-corporation/mariadb-connector-python@master#egg=mariadb
+     dbapimain-mysql: git+https://github.com/PyMySQL/mysqlclient-python.git#egg=mysqlclient
+     dbapimain-mysql: git+https://github.com/PyMySQL/PyMySQL.git#egg=pymysql
+     dbapimain-mysql: git+https://github.com/mariadb-corporation/mariadb-connector-python#egg=mariadb
 
-     dbapimaster-oracle: git+https://github.com/oracle/python-cx_Oracle.git@main#egg=cx_Oracle
+     dbapimain-oracle: git+https://github.com/oracle/python-cx_Oracle.git#egg=cx_Oracle
 
-     dbapimaster-mssql: git+https://github.com/mkleehammer/pyodbc.git@master#egg=pyodbc
+     dbapimain-mssql: git+https://github.com/mkleehammer/pyodbc.git#egg=pyodbc
 
      cov: pytest-cov