From: Mike Bayer Date: Mon, 11 Oct 2021 16:30:10 +0000 (-0400) Subject: rename elements to main X-Git-Tag: rel_1_4_26~24^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b91e76a4f7b9827d0d15c3c562af77f900a92091;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git rename elements to main There are still some SQLite / MySQL specific occurrences of "master" but this is most of it. Change-Id: I0144c992e2f0207777e20e058b63a11c031986b9 --- diff --git a/.github/workflows/run-on-pr.yaml b/.github/workflows/run-on-pr.yaml index afa2066666..ca18648998 100644 --- a/.github/workflows/run-on-pr.yaml +++ b/.github/workflows/run-on-pr.yaml @@ -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 diff --git a/.github/workflows/run-test.yaml b/.github/workflows/run-test.yaml index eae148d5f8..cd71555bdf 100644 --- a/.github/workflows/run-test.yaml +++ b/.github/workflows/run-test.yaml @@ -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_*" diff --git a/lib/sqlalchemy/testing/plugin/bootstrap.py b/lib/sqlalchemy/testing/plugin/bootstrap.py index 1f568dfc8f..b4691c57d4 100644 --- a/lib/sqlalchemy/testing/plugin/bootstrap.py +++ b/lib/sqlalchemy/testing/plugin/bootstrap.py @@ -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. """ diff --git a/lib/sqlalchemy/testing/plugin/plugin_base.py b/lib/sqlalchemy/testing/plugin/plugin_base.py index 8f486dc8db..d2e4a0f690 100644 --- a/lib/sqlalchemy/testing/plugin/plugin_base.py +++ b/lib/sqlalchemy/testing/plugin/plugin_base.py @@ -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") diff --git a/setup.cfg b/setup.cfg index dd96a5f3c4..b79602728a 100644 --- 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 diff --git a/test/orm/declarative/test_basic.py b/test/orm/declarative/test_basic.py index 14f25c4793..a405b9f2c6 100644 --- a/test/orm/declarative/test_basic.py +++ b/test/orm/declarative/test_basic.py @@ -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) diff --git a/test/orm/test_froms.py b/test/orm/test_froms.py index 640ee45d21..d6579cebd1 100644 --- a/test/orm/test_froms.py +++ b/test/orm/test_froms.py @@ -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 67731240ad..ef85da8196 100644 --- 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