From: Federico Caselli Date: Thu, 30 Nov 2023 21:16:11 +0000 (+0100) Subject: Normalize all file headers to have consistent format X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8cab0694e6dc9f7b7fd02a4b5a8ae6bbb2e896e;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Normalize all file headers to have consistent format Change-Id: Idfa5f699280990aed3f6e46225d4202539d9e900 --- diff --git a/lib/sqlalchemy/__init__.py b/lib/sqlalchemy/__init__.py index 32dcac5f5b..2300c2d409 100644 --- a/lib/sqlalchemy/__init__.py +++ b/lib/sqlalchemy/__init__.py @@ -1,4 +1,4 @@ -# sqlalchemy/__init__.py +# __init__.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/cyextension/__init__.py b/lib/sqlalchemy/cyextension/__init__.py index e69de29bb2..67aa690e02 100644 --- a/lib/sqlalchemy/cyextension/__init__.py +++ b/lib/sqlalchemy/cyextension/__init__.py @@ -0,0 +1,6 @@ +# cyextension/__init__.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php diff --git a/lib/sqlalchemy/cyextension/collections.pyx b/lib/sqlalchemy/cyextension/collections.pyx index 4d134ccf30..a45b5d9043 100644 --- a/lib/sqlalchemy/cyextension/collections.pyx +++ b/lib/sqlalchemy/cyextension/collections.pyx @@ -1,3 +1,9 @@ +# cyextension/collections.pyx +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php cimport cython from cpython.long cimport PyLong_FromLongLong from cpython.set cimport PySet_Add diff --git a/lib/sqlalchemy/cyextension/immutabledict.pxd b/lib/sqlalchemy/cyextension/immutabledict.pxd index fe7ad6a81a..d733d48aff 100644 --- a/lib/sqlalchemy/cyextension/immutabledict.pxd +++ b/lib/sqlalchemy/cyextension/immutabledict.pxd @@ -1,2 +1,8 @@ +# cyextension/immutabledict.pxd +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php cdef class immutabledict(dict): pass diff --git a/lib/sqlalchemy/cyextension/immutabledict.pyx b/lib/sqlalchemy/cyextension/immutabledict.pyx index 100287b380..d43d465feb 100644 --- a/lib/sqlalchemy/cyextension/immutabledict.pyx +++ b/lib/sqlalchemy/cyextension/immutabledict.pyx @@ -1,3 +1,9 @@ +# cyextension/immutabledict.pyx +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php from cpython.dict cimport PyDict_New, PyDict_Update, PyDict_Size diff --git a/lib/sqlalchemy/cyextension/processors.pyx b/lib/sqlalchemy/cyextension/processors.pyx index b0ad865c54..03d8411c33 100644 --- a/lib/sqlalchemy/cyextension/processors.pyx +++ b/lib/sqlalchemy/cyextension/processors.pyx @@ -1,3 +1,9 @@ +# cyextension/processors.pyx +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php import datetime from datetime import datetime as datetime_cls from datetime import time as time_cls diff --git a/lib/sqlalchemy/cyextension/resultproxy.pyx b/lib/sqlalchemy/cyextension/resultproxy.pyx index 0d7eeece93..e81df51f38 100644 --- a/lib/sqlalchemy/cyextension/resultproxy.pyx +++ b/lib/sqlalchemy/cyextension/resultproxy.pyx @@ -1,3 +1,9 @@ +# cyextension/resultproxy.pyx +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php import operator cdef class BaseRow: diff --git a/lib/sqlalchemy/cyextension/util.pyx b/lib/sqlalchemy/cyextension/util.pyx index 92e91a6edc..63daddf464 100644 --- a/lib/sqlalchemy/cyextension/util.pyx +++ b/lib/sqlalchemy/cyextension/util.pyx @@ -1,3 +1,9 @@ +# cyextension/util.pyx +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php from collections.abc import Mapping from sqlalchemy import exc diff --git a/lib/sqlalchemy/dialects/_typing.py b/lib/sqlalchemy/dialects/_typing.py index 932742bd04..9d2500e48e 100644 --- a/lib/sqlalchemy/dialects/_typing.py +++ b/lib/sqlalchemy/dialects/_typing.py @@ -1,3 +1,9 @@ +# dialects/_typing.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php from __future__ import annotations from typing import Any diff --git a/lib/sqlalchemy/dialects/mssql/__init__.py b/lib/sqlalchemy/dialects/mssql/__init__.py index 6bbb934157..c601cba1f3 100644 --- a/lib/sqlalchemy/dialects/mssql/__init__.py +++ b/lib/sqlalchemy/dialects/mssql/__init__.py @@ -1,4 +1,4 @@ -# mssql/__init__.py +# dialects/mssql/__init__.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/mssql/aioodbc.py b/lib/sqlalchemy/dialects/mssql/aioodbc.py index 23c2790f29..e9d22155a7 100644 --- a/lib/sqlalchemy/dialects/mssql/aioodbc.py +++ b/lib/sqlalchemy/dialects/mssql/aioodbc.py @@ -1,4 +1,4 @@ -# mssql/aioodbc.py +# dialects/mssql/aioodbc.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/mssql/base.py b/lib/sqlalchemy/dialects/mssql/base.py index 80734d6061..952a7a1f69 100644 --- a/lib/sqlalchemy/dialects/mssql/base.py +++ b/lib/sqlalchemy/dialects/mssql/base.py @@ -1,4 +1,4 @@ -# mssql/base.py +# dialects/mssql/base.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/mssql/information_schema.py b/lib/sqlalchemy/dialects/mssql/information_schema.py index e770313f93..2c30c55b6e 100644 --- a/lib/sqlalchemy/dialects/mssql/information_schema.py +++ b/lib/sqlalchemy/dialects/mssql/information_schema.py @@ -1,4 +1,4 @@ -# mssql/information_schema.py +# dialects/mssql/information_schema.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/mssql/json.py b/lib/sqlalchemy/dialects/mssql/json.py index 815b5d2ff8..f79d6e3ed5 100644 --- a/lib/sqlalchemy/dialects/mssql/json.py +++ b/lib/sqlalchemy/dialects/mssql/json.py @@ -1,3 +1,9 @@ +# dialects/mssql/json.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php # mypy: ignore-errors from ... import types as sqltypes diff --git a/lib/sqlalchemy/dialects/mssql/provision.py b/lib/sqlalchemy/dialects/mssql/provision.py index 75e15ce4dc..1913c95717 100644 --- a/lib/sqlalchemy/dialects/mssql/provision.py +++ b/lib/sqlalchemy/dialects/mssql/provision.py @@ -1,3 +1,9 @@ +# dialects/mssql/provision.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php # mypy: ignore-errors from sqlalchemy import inspect diff --git a/lib/sqlalchemy/dialects/mssql/pymssql.py b/lib/sqlalchemy/dialects/mssql/pymssql.py index 3823db91b3..5351be1131 100644 --- a/lib/sqlalchemy/dialects/mssql/pymssql.py +++ b/lib/sqlalchemy/dialects/mssql/pymssql.py @@ -1,4 +1,4 @@ -# mssql/pymssql.py +# dialects/mssql/pymssql.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/mssql/pyodbc.py b/lib/sqlalchemy/dialects/mssql/pyodbc.py index a8f12fd984..17c4e4c830 100644 --- a/lib/sqlalchemy/dialects/mssql/pyodbc.py +++ b/lib/sqlalchemy/dialects/mssql/pyodbc.py @@ -1,4 +1,4 @@ -# mssql/pyodbc.py +# dialects/mssql/pyodbc.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/mysql/__init__.py b/lib/sqlalchemy/dialects/mysql/__init__.py index b6af683b5e..49d859b418 100644 --- a/lib/sqlalchemy/dialects/mysql/__init__.py +++ b/lib/sqlalchemy/dialects/mysql/__init__.py @@ -1,4 +1,4 @@ -# mysql/__init__.py +# dialects/mysql/__init__.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/mysql/aiomysql.py b/lib/sqlalchemy/dialects/mysql/aiomysql.py index 41f4c09e93..978950b878 100644 --- a/lib/sqlalchemy/dialects/mysql/aiomysql.py +++ b/lib/sqlalchemy/dialects/mysql/aiomysql.py @@ -1,4 +1,4 @@ -# mysql/aiomysql.py +# dialects/mysql/aiomysql.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # diff --git a/lib/sqlalchemy/dialects/mysql/asyncmy.py b/lib/sqlalchemy/dialects/mysql/asyncmy.py index c5caf79d3a..3029626fd5 100644 --- a/lib/sqlalchemy/dialects/mysql/asyncmy.py +++ b/lib/sqlalchemy/dialects/mysql/asyncmy.py @@ -1,4 +1,4 @@ -# mysql/asyncmy.py +# dialects/mysql/asyncmy.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py index 92f90774fb..58d7235e01 100644 --- a/lib/sqlalchemy/dialects/mysql/base.py +++ b/lib/sqlalchemy/dialects/mysql/base.py @@ -1,4 +1,4 @@ -# mysql/base.py +# dialects/mysql/base.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/mysql/cymysql.py b/lib/sqlalchemy/dialects/mysql/cymysql.py index ed3c60694a..a96a71eb4c 100644 --- a/lib/sqlalchemy/dialects/mysql/cymysql.py +++ b/lib/sqlalchemy/dialects/mysql/cymysql.py @@ -1,4 +1,4 @@ -# mysql/cymysql.py +# dialects/mysql/cymysql.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/mysql/dml.py b/lib/sqlalchemy/dialects/mysql/dml.py index dfa39f6e08..aba60103f7 100644 --- a/lib/sqlalchemy/dialects/mysql/dml.py +++ b/lib/sqlalchemy/dialects/mysql/dml.py @@ -1,4 +1,4 @@ -# mysql/dml.py +# dialects/mysql/dml.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/mysql/enumerated.py b/lib/sqlalchemy/dialects/mysql/enumerated.py index 2e1d3c3da9..a70d499e43 100644 --- a/lib/sqlalchemy/dialects/mysql/enumerated.py +++ b/lib/sqlalchemy/dialects/mysql/enumerated.py @@ -1,4 +1,4 @@ -# mysql/enumerated.py +# dialects/mysql/enumerated.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/mysql/expression.py b/lib/sqlalchemy/dialects/mysql/expression.py index c5bd0be02b..0c41aeb727 100644 --- a/lib/sqlalchemy/dialects/mysql/expression.py +++ b/lib/sqlalchemy/dialects/mysql/expression.py @@ -1,3 +1,4 @@ +# dialects/mysql/expression.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/mysql/json.py b/lib/sqlalchemy/dialects/mysql/json.py index 66fcb714d5..8359e4d36a 100644 --- a/lib/sqlalchemy/dialects/mysql/json.py +++ b/lib/sqlalchemy/dialects/mysql/json.py @@ -1,4 +1,4 @@ -# mysql/json.py +# dialects/mysql/json.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/mysql/mariadb.py b/lib/sqlalchemy/dialects/mysql/mariadb.py index a6ee5dfac9..17f858184f 100644 --- a/lib/sqlalchemy/dialects/mysql/mariadb.py +++ b/lib/sqlalchemy/dialects/mysql/mariadb.py @@ -1,4 +1,4 @@ -# mysql/mariadb.py +# dialects/mysql/mariadb.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/mysql/mariadbconnector.py b/lib/sqlalchemy/dialects/mysql/mariadbconnector.py index 9730c9b4da..3ee9c1e005 100644 --- a/lib/sqlalchemy/dialects/mysql/mariadbconnector.py +++ b/lib/sqlalchemy/dialects/mysql/mariadbconnector.py @@ -1,4 +1,4 @@ -# mysql/mariadbconnector.py +# dialects/mysql/mariadbconnector.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/mysql/mysqlconnector.py b/lib/sqlalchemy/dialects/mysql/mysqlconnector.py index fc90c65d2a..7325453016 100644 --- a/lib/sqlalchemy/dialects/mysql/mysqlconnector.py +++ b/lib/sqlalchemy/dialects/mysql/mysqlconnector.py @@ -1,4 +1,4 @@ -# mysql/mysqlconnector.py +# dialects/mysql/mysqlconnector.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/mysql/mysqldb.py b/lib/sqlalchemy/dialects/mysql/mysqldb.py index d1cf835c54..d42cdc9b0f 100644 --- a/lib/sqlalchemy/dialects/mysql/mysqldb.py +++ b/lib/sqlalchemy/dialects/mysql/mysqldb.py @@ -1,4 +1,4 @@ -# mysql/mysqldb.py +# dialects/mysql/mysqldb.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/mysql/provision.py b/lib/sqlalchemy/dialects/mysql/provision.py index b7faf77121..b3584ee5c7 100644 --- a/lib/sqlalchemy/dialects/mysql/provision.py +++ b/lib/sqlalchemy/dialects/mysql/provision.py @@ -1,3 +1,9 @@ +# dialects/mysql/provision.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php # mypy: ignore-errors from ... import exc diff --git a/lib/sqlalchemy/dialects/mysql/pymysql.py b/lib/sqlalchemy/dialects/mysql/pymysql.py index ddb99542f8..6e87173be9 100644 --- a/lib/sqlalchemy/dialects/mysql/pymysql.py +++ b/lib/sqlalchemy/dialects/mysql/pymysql.py @@ -1,4 +1,4 @@ -# mysql/pymysql.py +# dialects/mysql/pymysql.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/mysql/pyodbc.py b/lib/sqlalchemy/dialects/mysql/pyodbc.py index e4b11778af..87be2827b5 100644 --- a/lib/sqlalchemy/dialects/mysql/pyodbc.py +++ b/lib/sqlalchemy/dialects/mysql/pyodbc.py @@ -1,4 +1,4 @@ -# mysql/pyodbc.py +# dialects/mysql/pyodbc.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/mysql/reflection.py b/lib/sqlalchemy/dialects/mysql/reflection.py index c4909fe319..d678bc9f4a 100644 --- a/lib/sqlalchemy/dialects/mysql/reflection.py +++ b/lib/sqlalchemy/dialects/mysql/reflection.py @@ -1,4 +1,4 @@ -# mysql/reflection.py +# dialects/mysql/reflection.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/mysql/reserved_words.py b/lib/sqlalchemy/dialects/mysql/reserved_words.py index 9f3436e637..b092428cf3 100644 --- a/lib/sqlalchemy/dialects/mysql/reserved_words.py +++ b/lib/sqlalchemy/dialects/mysql/reserved_words.py @@ -1,4 +1,4 @@ -# mysql/reserved_words.py +# dialects/mysql/reserved_words.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/mysql/types.py b/lib/sqlalchemy/dialects/mysql/types.py index aa1de1b699..3fc96e6107 100644 --- a/lib/sqlalchemy/dialects/mysql/types.py +++ b/lib/sqlalchemy/dialects/mysql/types.py @@ -1,4 +1,4 @@ -# mysql/types.py +# dialects/mysql/types.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/oracle/__init__.py b/lib/sqlalchemy/dialects/oracle/__init__.py index 46a5d0a205..49464d6de7 100644 --- a/lib/sqlalchemy/dialects/oracle/__init__.py +++ b/lib/sqlalchemy/dialects/oracle/__init__.py @@ -1,4 +1,4 @@ -# oracle/__init__.py +# dialects/oracle/__init__.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/oracle/base.py b/lib/sqlalchemy/dialects/oracle/base.py index d993ef2692..10dd69e99d 100644 --- a/lib/sqlalchemy/dialects/oracle/base.py +++ b/lib/sqlalchemy/dialects/oracle/base.py @@ -1,4 +1,4 @@ -# oracle/base.py +# dialects/oracle/base.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/oracle/cx_oracle.py b/lib/sqlalchemy/dialects/oracle/cx_oracle.py index c595b56c56..95b7abe3b8 100644 --- a/lib/sqlalchemy/dialects/oracle/cx_oracle.py +++ b/lib/sqlalchemy/dialects/oracle/cx_oracle.py @@ -1,3 +1,4 @@ +# dialects/oracle/cx_oracle.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/oracle/dictionary.py b/lib/sqlalchemy/dialects/oracle/dictionary.py index fdf47ef31e..5d4056ad2a 100644 --- a/lib/sqlalchemy/dialects/oracle/dictionary.py +++ b/lib/sqlalchemy/dialects/oracle/dictionary.py @@ -1,3 +1,4 @@ +# dialects/oracle/dictionary.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/oracle/oracledb.py b/lib/sqlalchemy/dialects/oracle/oracledb.py index 7defbc9f06..c4e2b1ffff 100644 --- a/lib/sqlalchemy/dialects/oracle/oracledb.py +++ b/lib/sqlalchemy/dialects/oracle/oracledb.py @@ -1,3 +1,4 @@ +# dialects/oracle/oracledb.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/oracle/provision.py b/lib/sqlalchemy/dialects/oracle/provision.py index c8599e8e22..c9100192e1 100644 --- a/lib/sqlalchemy/dialects/oracle/provision.py +++ b/lib/sqlalchemy/dialects/oracle/provision.py @@ -1,3 +1,9 @@ +# dialects/oracle/provision.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php # mypy: ignore-errors from ... import create_engine diff --git a/lib/sqlalchemy/dialects/oracle/types.py b/lib/sqlalchemy/dialects/oracle/types.py index 4f82c43c69..bc9e563ff7 100644 --- a/lib/sqlalchemy/dialects/oracle/types.py +++ b/lib/sqlalchemy/dialects/oracle/types.py @@ -1,3 +1,4 @@ +# dialects/oracle/types.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/postgresql/__init__.py b/lib/sqlalchemy/dialects/postgresql/__init__.py index c3ed7c1fc0..5e327a6eef 100644 --- a/lib/sqlalchemy/dialects/postgresql/__init__.py +++ b/lib/sqlalchemy/dialects/postgresql/__init__.py @@ -1,4 +1,4 @@ -# postgresql/__init__.py +# dialects/postgresql/__init__.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/postgresql/_psycopg_common.py b/lib/sqlalchemy/dialects/postgresql/_psycopg_common.py index dfb25a5689..95f549dc68 100644 --- a/lib/sqlalchemy/dialects/postgresql/_psycopg_common.py +++ b/lib/sqlalchemy/dialects/postgresql/_psycopg_common.py @@ -1,3 +1,4 @@ +# dialects/postgresql/_psycopg_common.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/postgresql/array.py b/lib/sqlalchemy/dialects/postgresql/array.py index 3496ed6b63..5c677059b7 100644 --- a/lib/sqlalchemy/dialects/postgresql/array.py +++ b/lib/sqlalchemy/dialects/postgresql/array.py @@ -1,4 +1,4 @@ -# postgresql/array.py +# dialects/postgresql/array.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/postgresql/asyncpg.py b/lib/sqlalchemy/dialects/postgresql/asyncpg.py index d57c94a170..ec0017a449 100644 --- a/lib/sqlalchemy/dialects/postgresql/asyncpg.py +++ b/lib/sqlalchemy/dialects/postgresql/asyncpg.py @@ -1,4 +1,4 @@ -# postgresql/asyncpg.py +# dialects/postgresql/asyncpg.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index 0aec40ea97..ea7ac156fe 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -1,4 +1,4 @@ -# postgresql/base.py +# dialects/postgresql/base.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/postgresql/dml.py b/lib/sqlalchemy/dialects/postgresql/dml.py index dee7af3311..26300c27de 100644 --- a/lib/sqlalchemy/dialects/postgresql/dml.py +++ b/lib/sqlalchemy/dialects/postgresql/dml.py @@ -1,4 +1,4 @@ -# postgresql/dml.py +# dialects/postgresql/dml.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/postgresql/ext.py b/lib/sqlalchemy/dialects/postgresql/ext.py index ad1267750b..22815d9fd6 100644 --- a/lib/sqlalchemy/dialects/postgresql/ext.py +++ b/lib/sqlalchemy/dialects/postgresql/ext.py @@ -1,4 +1,4 @@ -# postgresql/ext.py +# dialects/postgresql/ext.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/postgresql/hstore.py b/lib/sqlalchemy/dialects/postgresql/hstore.py index 83c4932a6e..0ef548e794 100644 --- a/lib/sqlalchemy/dialects/postgresql/hstore.py +++ b/lib/sqlalchemy/dialects/postgresql/hstore.py @@ -1,4 +1,4 @@ -# postgresql/hstore.py +# dialects/postgresql/hstore.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/postgresql/json.py b/lib/sqlalchemy/dialects/postgresql/json.py index ee56a74504..a0f1814a7a 100644 --- a/lib/sqlalchemy/dialects/postgresql/json.py +++ b/lib/sqlalchemy/dialects/postgresql/json.py @@ -1,4 +1,4 @@ -# postgresql/json.py +# dialects/postgresql/json.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/postgresql/named_types.py b/lib/sqlalchemy/dialects/postgresql/named_types.py index 19994d4b99..26d690ccd3 100644 --- a/lib/sqlalchemy/dialects/postgresql/named_types.py +++ b/lib/sqlalchemy/dialects/postgresql/named_types.py @@ -1,4 +1,4 @@ -# postgresql/named_types.py +# dialects/postgresql/named_types.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/postgresql/operators.py b/lib/sqlalchemy/dialects/postgresql/operators.py index f393451c6e..a712022bcb 100644 --- a/lib/sqlalchemy/dialects/postgresql/operators.py +++ b/lib/sqlalchemy/dialects/postgresql/operators.py @@ -1,4 +1,4 @@ -# postgresql/operators.py +# dialects/postgresql/operators.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/postgresql/pg8000.py b/lib/sqlalchemy/dialects/postgresql/pg8000.py index c9829ac681..d0de5cd894 100644 --- a/lib/sqlalchemy/dialects/postgresql/pg8000.py +++ b/lib/sqlalchemy/dialects/postgresql/pg8000.py @@ -1,4 +1,4 @@ -# postgresql/pg8000.py +# dialects/postgresql/pg8000.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # diff --git a/lib/sqlalchemy/dialects/postgresql/pg_catalog.py b/lib/sqlalchemy/dialects/postgresql/pg_catalog.py index fa4b30f03f..25bd6bb99d 100644 --- a/lib/sqlalchemy/dialects/postgresql/pg_catalog.py +++ b/lib/sqlalchemy/dialects/postgresql/pg_catalog.py @@ -1,5 +1,5 @@ -# postgresql/pg_catalog.py -# Copyright (C) 2005-2021 the SQLAlchemy authors and contributors +# dialects/postgresql/pg_catalog.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # # This module is part of SQLAlchemy and is released under diff --git a/lib/sqlalchemy/dialects/postgresql/provision.py b/lib/sqlalchemy/dialects/postgresql/provision.py index 87f1c9a4ce..9fafaed9ba 100644 --- a/lib/sqlalchemy/dialects/postgresql/provision.py +++ b/lib/sqlalchemy/dialects/postgresql/provision.py @@ -1,3 +1,9 @@ +# dialects/postgresql/provision.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php # mypy: ignore-errors import time diff --git a/lib/sqlalchemy/dialects/postgresql/psycopg.py b/lib/sqlalchemy/dialects/postgresql/psycopg.py index 4856876380..743d038880 100644 --- a/lib/sqlalchemy/dialects/postgresql/psycopg.py +++ b/lib/sqlalchemy/dialects/postgresql/psycopg.py @@ -1,4 +1,4 @@ -# postgresql/psycopg2.py +# dialects/postgresql/psycopg.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/postgresql/psycopg2.py b/lib/sqlalchemy/dialects/postgresql/psycopg2.py index 2719f3dc5e..ef960c297d 100644 --- a/lib/sqlalchemy/dialects/postgresql/psycopg2.py +++ b/lib/sqlalchemy/dialects/postgresql/psycopg2.py @@ -1,4 +1,4 @@ -# postgresql/psycopg2.py +# dialects/postgresql/psycopg2.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/postgresql/psycopg2cffi.py b/lib/sqlalchemy/dialects/postgresql/psycopg2cffi.py index 211432c6dc..df8675bf86 100644 --- a/lib/sqlalchemy/dialects/postgresql/psycopg2cffi.py +++ b/lib/sqlalchemy/dialects/postgresql/psycopg2cffi.py @@ -1,4 +1,4 @@ -# testing/engines.py +# dialects/postgresql/psycopg2cffi.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/postgresql/ranges.py b/lib/sqlalchemy/dialects/postgresql/ranges.py index f1c29897d0..ede52634fe 100644 --- a/lib/sqlalchemy/dialects/postgresql/ranges.py +++ b/lib/sqlalchemy/dialects/postgresql/ranges.py @@ -1,3 +1,4 @@ +# dialects/postgresql/ranges.py # Copyright (C) 2013-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/postgresql/types.py b/lib/sqlalchemy/dialects/postgresql/types.py index 2cac5d816d..75abab8384 100644 --- a/lib/sqlalchemy/dialects/postgresql/types.py +++ b/lib/sqlalchemy/dialects/postgresql/types.py @@ -1,3 +1,4 @@ +# dialects/postgresql/types.py # Copyright (C) 2013-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/sqlite/__init__.py b/lib/sqlalchemy/dialects/sqlite/__init__.py index 56bca47fae..18edf67f10 100644 --- a/lib/sqlalchemy/dialects/sqlite/__init__.py +++ b/lib/sqlalchemy/dialects/sqlite/__init__.py @@ -1,4 +1,4 @@ -# sqlite/__init__.py +# dialects/sqlite/__init__.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/sqlite/aiosqlite.py b/lib/sqlalchemy/dialects/sqlite/aiosqlite.py index 41e406164e..7eccf5fb17 100644 --- a/lib/sqlalchemy/dialects/sqlite/aiosqlite.py +++ b/lib/sqlalchemy/dialects/sqlite/aiosqlite.py @@ -1,4 +1,4 @@ -# sqlite/aiosqlite.py +# dialects/sqlite/aiosqlite.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/sqlite/base.py b/lib/sqlalchemy/dialects/sqlite/base.py index d4eb3bca41..1052c3d4d3 100644 --- a/lib/sqlalchemy/dialects/sqlite/base.py +++ b/lib/sqlalchemy/dialects/sqlite/base.py @@ -1,4 +1,4 @@ -# sqlite/base.py +# dialects/sqlite/base.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/sqlite/dml.py b/lib/sqlalchemy/dialects/sqlite/dml.py index ec428f5b17..007502e915 100644 --- a/lib/sqlalchemy/dialects/sqlite/dml.py +++ b/lib/sqlalchemy/dialects/sqlite/dml.py @@ -1,4 +1,4 @@ -# sqlite/dml.py +# dialects/sqlite/dml.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/sqlite/json.py b/lib/sqlalchemy/dialects/sqlite/json.py index 69df3171c2..6a8f374f94 100644 --- a/lib/sqlalchemy/dialects/sqlite/json.py +++ b/lib/sqlalchemy/dialects/sqlite/json.py @@ -1,3 +1,9 @@ +# dialects/sqlite/json.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php # mypy: ignore-errors from ... import types as sqltypes diff --git a/lib/sqlalchemy/dialects/sqlite/provision.py b/lib/sqlalchemy/dialects/sqlite/provision.py index 2ed8253ab4..397ef10088 100644 --- a/lib/sqlalchemy/dialects/sqlite/provision.py +++ b/lib/sqlalchemy/dialects/sqlite/provision.py @@ -1,3 +1,9 @@ +# dialects/sqlite/provision.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php # mypy: ignore-errors import os diff --git a/lib/sqlalchemy/dialects/sqlite/pysqlcipher.py b/lib/sqlalchemy/dialects/sqlite/pysqlcipher.py index 28b900ea53..df8d7c5d83 100644 --- a/lib/sqlalchemy/dialects/sqlite/pysqlcipher.py +++ b/lib/sqlalchemy/dialects/sqlite/pysqlcipher.py @@ -1,4 +1,4 @@ -# sqlite/pysqlcipher.py +# dialects/sqlite/pysqlcipher.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/dialects/sqlite/pysqlite.py b/lib/sqlalchemy/dialects/sqlite/pysqlite.py index 5925b405cf..0d80446eba 100644 --- a/lib/sqlalchemy/dialects/sqlite/pysqlite.py +++ b/lib/sqlalchemy/dialects/sqlite/pysqlite.py @@ -1,4 +1,4 @@ -# sqlite/pysqlite.py +# dialects/sqlite/pysqlite.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/engine/_py_processors.py b/lib/sqlalchemy/engine/_py_processors.py index 1cc5e8dea4..bedfaeedfb 100644 --- a/lib/sqlalchemy/engine/_py_processors.py +++ b/lib/sqlalchemy/engine/_py_processors.py @@ -1,4 +1,4 @@ -# sqlalchemy/processors.py +# engine/_py_processors.py # Copyright (C) 2010-2023 the SQLAlchemy authors and contributors # # Copyright (C) 2010 Gaetan de Menten gdementen@gmail.com diff --git a/lib/sqlalchemy/engine/_py_row.py b/lib/sqlalchemy/engine/_py_row.py index 3358abd784..50705a7655 100644 --- a/lib/sqlalchemy/engine/_py_row.py +++ b/lib/sqlalchemy/engine/_py_row.py @@ -1,3 +1,9 @@ +# engine/_py_row.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php from __future__ import annotations import operator diff --git a/lib/sqlalchemy/engine/_py_util.py b/lib/sqlalchemy/engine/_py_util.py index 538c075a2b..2ef9d03ffd 100644 --- a/lib/sqlalchemy/engine/_py_util.py +++ b/lib/sqlalchemy/engine/_py_util.py @@ -1,3 +1,9 @@ +# engine/_py_util.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php from __future__ import annotations import typing diff --git a/lib/sqlalchemy/engine/characteristics.py b/lib/sqlalchemy/engine/characteristics.py index c0feb000be..aed2fd6b38 100644 --- a/lib/sqlalchemy/engine/characteristics.py +++ b/lib/sqlalchemy/engine/characteristics.py @@ -1,3 +1,9 @@ +# engine/characteristics.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php from __future__ import annotations import abc diff --git a/lib/sqlalchemy/engine/events.py b/lib/sqlalchemy/engine/events.py index aac756d18a..4f6353080b 100644 --- a/lib/sqlalchemy/engine/events.py +++ b/lib/sqlalchemy/engine/events.py @@ -1,4 +1,4 @@ -# sqlalchemy/engine/events.py +# engine/events.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/engine/processors.py b/lib/sqlalchemy/engine/processors.py index c01d3b7406..bdca5351c5 100644 --- a/lib/sqlalchemy/engine/processors.py +++ b/lib/sqlalchemy/engine/processors.py @@ -1,4 +1,4 @@ -# sqlalchemy/processors.py +# engine/processors.py # Copyright (C) 2010-2023 the SQLAlchemy authors and contributors # # Copyright (C) 2010 Gaetan de Menten gdementen@gmail.com diff --git a/lib/sqlalchemy/events.py b/lib/sqlalchemy/events.py index 2f7b23db4e..0124d14dd5 100644 --- a/lib/sqlalchemy/events.py +++ b/lib/sqlalchemy/events.py @@ -1,4 +1,4 @@ -# sqlalchemy/events.py +# events.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/exc.py b/lib/sqlalchemy/exc.py index a5a66de877..0e90c60e56 100644 --- a/lib/sqlalchemy/exc.py +++ b/lib/sqlalchemy/exc.py @@ -1,4 +1,4 @@ -# sqlalchemy/exc.py +# exc.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/ext/baked.py b/lib/sqlalchemy/ext/baked.py index 64c9ce6ec2..82db494e41 100644 --- a/lib/sqlalchemy/ext/baked.py +++ b/lib/sqlalchemy/ext/baked.py @@ -1,4 +1,4 @@ -# sqlalchemy/ext/baked.py +# ext/baked.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/ext/indexable.py b/lib/sqlalchemy/ext/indexable.py index dbaad3c407..b3d90a6e92 100644 --- a/lib/sqlalchemy/ext/indexable.py +++ b/lib/sqlalchemy/ext/indexable.py @@ -1,4 +1,4 @@ -# ext/index.py +# ext/indexable.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/ext/mypy/__init__.py b/lib/sqlalchemy/ext/mypy/__init__.py index e69de29bb2..8a2e38098e 100644 --- a/lib/sqlalchemy/ext/mypy/__init__.py +++ b/lib/sqlalchemy/ext/mypy/__init__.py @@ -0,0 +1,6 @@ +# ext/mypy/__init__.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php diff --git a/lib/sqlalchemy/ext/mypy/apply.py b/lib/sqlalchemy/ext/mypy/apply.py index 1bfaf1d7b0..e18cd08a3f 100644 --- a/lib/sqlalchemy/ext/mypy/apply.py +++ b/lib/sqlalchemy/ext/mypy/apply.py @@ -1,5 +1,5 @@ # ext/mypy/apply.py -# Copyright (C) 2021 the SQLAlchemy authors and contributors +# Copyright (C) 2021-2023 the SQLAlchemy authors and contributors # # # This module is part of SQLAlchemy and is released under diff --git a/lib/sqlalchemy/ext/mypy/decl_class.py b/lib/sqlalchemy/ext/mypy/decl_class.py index 9c7b44b758..9e2dcbb9ab 100644 --- a/lib/sqlalchemy/ext/mypy/decl_class.py +++ b/lib/sqlalchemy/ext/mypy/decl_class.py @@ -1,5 +1,5 @@ # ext/mypy/decl_class.py -# Copyright (C) 2021 the SQLAlchemy authors and contributors +# Copyright (C) 2021-2023 the SQLAlchemy authors and contributors # # # This module is part of SQLAlchemy and is released under diff --git a/lib/sqlalchemy/ext/mypy/infer.py b/lib/sqlalchemy/ext/mypy/infer.py index e8345d09ae..f7626bdf6b 100644 --- a/lib/sqlalchemy/ext/mypy/infer.py +++ b/lib/sqlalchemy/ext/mypy/infer.py @@ -1,5 +1,5 @@ # ext/mypy/infer.py -# Copyright (C) 2021 the SQLAlchemy authors and contributors +# Copyright (C) 2021-2023 the SQLAlchemy authors and contributors # # # This module is part of SQLAlchemy and is released under diff --git a/lib/sqlalchemy/ext/mypy/names.py b/lib/sqlalchemy/ext/mypy/names.py index ae55ca47b0..256e0be636 100644 --- a/lib/sqlalchemy/ext/mypy/names.py +++ b/lib/sqlalchemy/ext/mypy/names.py @@ -1,5 +1,5 @@ # ext/mypy/names.py -# Copyright (C) 2021 the SQLAlchemy authors and contributors +# Copyright (C) 2021-2023 the SQLAlchemy authors and contributors # # # This module is part of SQLAlchemy and is released under diff --git a/lib/sqlalchemy/future/__init__.py b/lib/sqlalchemy/future/__init__.py index bfc31d4267..c76360fcff 100644 --- a/lib/sqlalchemy/future/__init__.py +++ b/lib/sqlalchemy/future/__init__.py @@ -1,4 +1,4 @@ -# sql/future/__init__.py +# future/__init__.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/future/engine.py b/lib/sqlalchemy/future/engine.py index 1984f34ca7..bc43f4601c 100644 --- a/lib/sqlalchemy/future/engine.py +++ b/lib/sqlalchemy/future/engine.py @@ -1,4 +1,4 @@ -# sql/future/engine.py +# future/engine.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/inspection.py b/lib/sqlalchemy/inspection.py index 7d8479b5ec..1fe37d925f 100644 --- a/lib/sqlalchemy/inspection.py +++ b/lib/sqlalchemy/inspection.py @@ -1,4 +1,4 @@ -# sqlalchemy/inspect.py +# inspection.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/log.py b/lib/sqlalchemy/log.py index 39af45714d..1663f32847 100644 --- a/lib/sqlalchemy/log.py +++ b/lib/sqlalchemy/log.py @@ -1,4 +1,4 @@ -# sqlalchemy/log.py +# log.py # Copyright (C) 2006-2023 the SQLAlchemy authors and contributors # # Includes alterations by Vinay Sajip vinay_sajip@yahoo.co.uk diff --git a/lib/sqlalchemy/orm/_typing.py b/lib/sqlalchemy/orm/_typing.py index 3085351ba3..07f5e61a0f 100644 --- a/lib/sqlalchemy/orm/_typing.py +++ b/lib/sqlalchemy/orm/_typing.py @@ -1,5 +1,5 @@ # orm/_typing.py -# Copyright (C) 2022 the SQLAlchemy authors and contributors +# Copyright (C) 2022-2023 the SQLAlchemy authors and contributors # # # This module is part of SQLAlchemy and is released under diff --git a/lib/sqlalchemy/orm/clsregistry.py b/lib/sqlalchemy/orm/clsregistry.py index 10f1db03b6..4f4dab895e 100644 --- a/lib/sqlalchemy/orm/clsregistry.py +++ b/lib/sqlalchemy/orm/clsregistry.py @@ -1,4 +1,4 @@ -# ext/declarative/clsregistry.py +# orm/clsregistry.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/orm/decl_api.py b/lib/sqlalchemy/orm/decl_api.py index bd18ce5f4b..f2039afcd5 100644 --- a/lib/sqlalchemy/orm/decl_api.py +++ b/lib/sqlalchemy/orm/decl_api.py @@ -1,4 +1,4 @@ -# orm/declarative/api.py +# orm/decl_api.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/orm/decl_base.py b/lib/sqlalchemy/orm/decl_base.py index 0037379bd5..6e8578863e 100644 --- a/lib/sqlalchemy/orm/decl_base.py +++ b/lib/sqlalchemy/orm/decl_base.py @@ -1,4 +1,4 @@ -# ext/declarative/base.py +# orm/decl_base.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/orm/mapped_collection.py b/lib/sqlalchemy/orm/mapped_collection.py index 9e479d0d30..6a0ee22b3b 100644 --- a/lib/sqlalchemy/orm/mapped_collection.py +++ b/lib/sqlalchemy/orm/mapped_collection.py @@ -1,4 +1,4 @@ -# orm/collections.py +# orm/mapped_collection.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/orm/strategy_options.py b/lib/sqlalchemy/orm/strategy_options.py index e090d5b258..c62851e1b3 100644 --- a/lib/sqlalchemy/orm/strategy_options.py +++ b/lib/sqlalchemy/orm/strategy_options.py @@ -1,3 +1,4 @@ +# orm/strategy_options.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/pool/__init__.py b/lib/sqlalchemy/pool/__init__.py index 7929b6e4be..c25a8f85d8 100644 --- a/lib/sqlalchemy/pool/__init__.py +++ b/lib/sqlalchemy/pool/__init__.py @@ -1,4 +1,4 @@ -# sqlalchemy/pool/__init__.py +# pool/__init__.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/pool/base.py b/lib/sqlalchemy/pool/base.py index 90ed32ec27..90ad1d4764 100644 --- a/lib/sqlalchemy/pool/base.py +++ b/lib/sqlalchemy/pool/base.py @@ -1,4 +1,4 @@ -# sqlalchemy/pool.py +# pool/base.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/pool/events.py b/lib/sqlalchemy/pool/events.py index 762418b14f..8e06fdbd2b 100644 --- a/lib/sqlalchemy/pool/events.py +++ b/lib/sqlalchemy/pool/events.py @@ -1,4 +1,4 @@ -# sqlalchemy/pool/events.py +# pool/events.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/pool/impl.py b/lib/sqlalchemy/pool/impl.py index af4f788e27..ced015088c 100644 --- a/lib/sqlalchemy/pool/impl.py +++ b/lib/sqlalchemy/pool/impl.py @@ -1,4 +1,4 @@ -# sqlalchemy/pool.py +# pool/impl.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/sql/_orm_types.py b/lib/sqlalchemy/sql/_orm_types.py index 90986ec0cc..26e289c779 100644 --- a/lib/sqlalchemy/sql/_orm_types.py +++ b/lib/sqlalchemy/sql/_orm_types.py @@ -1,5 +1,5 @@ # sql/_orm_types.py -# Copyright (C) 2022 the SQLAlchemy authors and contributors +# Copyright (C) 2022-2023 the SQLAlchemy authors and contributors # # # This module is part of SQLAlchemy and is released under diff --git a/lib/sqlalchemy/sql/_typing.py b/lib/sqlalchemy/sql/_typing.py index 0793fbb3db..003cc51245 100644 --- a/lib/sqlalchemy/sql/_typing.py +++ b/lib/sqlalchemy/sql/_typing.py @@ -1,5 +1,5 @@ # sql/_typing.py -# Copyright (C) 2022 the SQLAlchemy authors and contributors +# Copyright (C) 2022-2023 the SQLAlchemy authors and contributors # # # This module is part of SQLAlchemy and is released under diff --git a/lib/sqlalchemy/sql/events.py b/lib/sqlalchemy/sql/events.py index b34d074120..43102ecc2a 100644 --- a/lib/sqlalchemy/sql/events.py +++ b/lib/sqlalchemy/sql/events.py @@ -1,4 +1,4 @@ -# sqlalchemy/sql/events.py +# sql/events.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/sql/naming.py b/lib/sqlalchemy/sql/naming.py index 03c9aab67b..a0daa2ca86 100644 --- a/lib/sqlalchemy/sql/naming.py +++ b/lib/sqlalchemy/sql/naming.py @@ -1,4 +1,4 @@ -# sqlalchemy/naming.py +# sql/naming.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/sql/type_api.py b/lib/sqlalchemy/sql/type_api.py index 9cf4872d02..9226b01e61 100644 --- a/lib/sqlalchemy/sql/type_api.py +++ b/lib/sqlalchemy/sql/type_api.py @@ -1,4 +1,4 @@ -# sql/types_api.py +# sql/type_api.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/testing/plugin/__init__.py b/lib/sqlalchemy/testing/plugin/__init__.py index e69de29bb2..16031a9824 100644 --- a/lib/sqlalchemy/testing/plugin/__init__.py +++ b/lib/sqlalchemy/testing/plugin/__init__.py @@ -0,0 +1,6 @@ +# testing/plugin/__init__.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php diff --git a/lib/sqlalchemy/testing/plugin/bootstrap.py b/lib/sqlalchemy/testing/plugin/bootstrap.py index f93b8d3e62..e331224b21 100644 --- a/lib/sqlalchemy/testing/plugin/bootstrap.py +++ b/lib/sqlalchemy/testing/plugin/bootstrap.py @@ -1,3 +1,9 @@ +# testing/plugin/bootstrap.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php # mypy: ignore-errors """ diff --git a/lib/sqlalchemy/testing/plugin/plugin_base.py b/lib/sqlalchemy/testing/plugin/plugin_base.py index f6a7f152b7..1f17fc595f 100644 --- a/lib/sqlalchemy/testing/plugin/plugin_base.py +++ b/lib/sqlalchemy/testing/plugin/plugin_base.py @@ -1,4 +1,4 @@ -# plugin/plugin_base.py +# testing/plugin/plugin_base.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/testing/plugin/pytestplugin.py b/lib/sqlalchemy/testing/plugin/pytestplugin.py index a676e7e28d..47644e3d28 100644 --- a/lib/sqlalchemy/testing/plugin/pytestplugin.py +++ b/lib/sqlalchemy/testing/plugin/pytestplugin.py @@ -1,3 +1,9 @@ +# testing/plugin/pytestplugin.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php # mypy: ignore-errors from __future__ import annotations diff --git a/lib/sqlalchemy/testing/provision.py b/lib/sqlalchemy/testing/provision.py index 0ff564e245..dcea52d3ba 100644 --- a/lib/sqlalchemy/testing/provision.py +++ b/lib/sqlalchemy/testing/provision.py @@ -1,3 +1,9 @@ +# testing/provision.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php # mypy: ignore-errors from __future__ import annotations diff --git a/lib/sqlalchemy/testing/suite/__init__.py b/lib/sqlalchemy/testing/suite/__init__.py index 30817e1e44..08f31c6c06 100644 --- a/lib/sqlalchemy/testing/suite/__init__.py +++ b/lib/sqlalchemy/testing/suite/__init__.py @@ -1,3 +1,9 @@ +# testing/suite/__init__.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php from .test_cte import * # noqa from .test_ddl import * # noqa from .test_deprecations import * # noqa diff --git a/lib/sqlalchemy/testing/suite/test_cte.py b/lib/sqlalchemy/testing/suite/test_cte.py index fb767e4635..f73a5a6a78 100644 --- a/lib/sqlalchemy/testing/suite/test_cte.py +++ b/lib/sqlalchemy/testing/suite/test_cte.py @@ -1,3 +1,9 @@ +# testing/suite/test_cte.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php # mypy: ignore-errors from .. import fixtures diff --git a/lib/sqlalchemy/testing/suite/test_ddl.py b/lib/sqlalchemy/testing/suite/test_ddl.py index 35651170d1..2256a03163 100644 --- a/lib/sqlalchemy/testing/suite/test_ddl.py +++ b/lib/sqlalchemy/testing/suite/test_ddl.py @@ -1,3 +1,9 @@ +# testing/suite/test_ddl.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php # mypy: ignore-errors import random diff --git a/lib/sqlalchemy/testing/suite/test_deprecations.py b/lib/sqlalchemy/testing/suite/test_deprecations.py index c453cbfed9..793b401ba8 100644 --- a/lib/sqlalchemy/testing/suite/test_deprecations.py +++ b/lib/sqlalchemy/testing/suite/test_deprecations.py @@ -1,3 +1,9 @@ +# testing/suite/test_deprecations.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php # mypy: ignore-errors from .. import fixtures diff --git a/lib/sqlalchemy/testing/suite/test_dialect.py b/lib/sqlalchemy/testing/suite/test_dialect.py index 6edf93ffdc..68ae800330 100644 --- a/lib/sqlalchemy/testing/suite/test_dialect.py +++ b/lib/sqlalchemy/testing/suite/test_dialect.py @@ -1,3 +1,9 @@ +# testing/suite/test_dialect.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php # mypy: ignore-errors diff --git a/lib/sqlalchemy/testing/suite/test_insert.py b/lib/sqlalchemy/testing/suite/test_insert.py index 09f24d356d..e03d4c6430 100644 --- a/lib/sqlalchemy/testing/suite/test_insert.py +++ b/lib/sqlalchemy/testing/suite/test_insert.py @@ -1,3 +1,9 @@ +# testing/suite/test_insert.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php # mypy: ignore-errors from decimal import Decimal diff --git a/lib/sqlalchemy/testing/suite/test_reflection.py b/lib/sqlalchemy/testing/suite/test_reflection.py index f2ecf1cae9..26839ab877 100644 --- a/lib/sqlalchemy/testing/suite/test_reflection.py +++ b/lib/sqlalchemy/testing/suite/test_reflection.py @@ -1,3 +1,9 @@ +# testing/suite/test_reflection.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php # mypy: ignore-errors import operator diff --git a/lib/sqlalchemy/testing/suite/test_results.py b/lib/sqlalchemy/testing/suite/test_results.py index e439d6ca6d..3e688c7ceb 100644 --- a/lib/sqlalchemy/testing/suite/test_results.py +++ b/lib/sqlalchemy/testing/suite/test_results.py @@ -1,3 +1,9 @@ +# testing/suite/test_results.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php # mypy: ignore-errors import datetime diff --git a/lib/sqlalchemy/testing/suite/test_rowcount.py b/lib/sqlalchemy/testing/suite/test_rowcount.py index 58295a5c53..651e746d46 100644 --- a/lib/sqlalchemy/testing/suite/test_rowcount.py +++ b/lib/sqlalchemy/testing/suite/test_rowcount.py @@ -1,3 +1,9 @@ +# testing/suite/test_rowcount.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php # mypy: ignore-errors from sqlalchemy import bindparam diff --git a/lib/sqlalchemy/testing/suite/test_select.py b/lib/sqlalchemy/testing/suite/test_select.py index a0aa147f9c..4825c53a39 100644 --- a/lib/sqlalchemy/testing/suite/test_select.py +++ b/lib/sqlalchemy/testing/suite/test_select.py @@ -1,3 +1,9 @@ +# testing/suite/test_select.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php # mypy: ignore-errors import collections.abc as collections_abc diff --git a/lib/sqlalchemy/testing/suite/test_sequence.py b/lib/sqlalchemy/testing/suite/test_sequence.py index 43e2d066bb..b3f63076ae 100644 --- a/lib/sqlalchemy/testing/suite/test_sequence.py +++ b/lib/sqlalchemy/testing/suite/test_sequence.py @@ -1,3 +1,9 @@ +# testing/suite/test_sequence.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php # mypy: ignore-errors from .. import config diff --git a/lib/sqlalchemy/testing/suite/test_types.py b/lib/sqlalchemy/testing/suite/test_types.py index 5debb450f6..c9a5d6c260 100644 --- a/lib/sqlalchemy/testing/suite/test_types.py +++ b/lib/sqlalchemy/testing/suite/test_types.py @@ -1,3 +1,9 @@ +# testing/suite/test_types.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php # mypy: ignore-errors diff --git a/lib/sqlalchemy/testing/suite/test_unicode_ddl.py b/lib/sqlalchemy/testing/suite/test_unicode_ddl.py index 0159789372..cd7f6309bd 100644 --- a/lib/sqlalchemy/testing/suite/test_unicode_ddl.py +++ b/lib/sqlalchemy/testing/suite/test_unicode_ddl.py @@ -1,3 +1,9 @@ +# testing/suite/test_unicode_ddl.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php # mypy: ignore-errors diff --git a/lib/sqlalchemy/testing/suite/test_update_delete.py b/lib/sqlalchemy/testing/suite/test_update_delete.py index 2d13bda34a..17238a0205 100644 --- a/lib/sqlalchemy/testing/suite/test_update_delete.py +++ b/lib/sqlalchemy/testing/suite/test_update_delete.py @@ -1,3 +1,9 @@ +# testing/suite/test_update_delete.py +# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php # mypy: ignore-errors from .. import fixtures diff --git a/lib/sqlalchemy/util/_has_cy.py b/lib/sqlalchemy/util/_has_cy.py index 37f716ad3b..37e0c4e891 100644 --- a/lib/sqlalchemy/util/_has_cy.py +++ b/lib/sqlalchemy/util/_has_cy.py @@ -1,3 +1,4 @@ +# util/_has_cy.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/util/preloaded.py b/lib/sqlalchemy/util/preloaded.py index f3609c8e47..c5b4a0fabb 100644 --- a/lib/sqlalchemy/util/preloaded.py +++ b/lib/sqlalchemy/util/preloaded.py @@ -1,4 +1,4 @@ -# util/_preloaded.py +# util/preloaded.py # Copyright (C) 2005-2023 the SQLAlchemy authors and contributors # # diff --git a/lib/sqlalchemy/util/tool_support.py b/lib/sqlalchemy/util/tool_support.py index 5a2fc3ba05..4a9f9473de 100644 --- a/lib/sqlalchemy/util/tool_support.py +++ b/lib/sqlalchemy/util/tool_support.py @@ -27,6 +27,7 @@ from typing import Any from typing import Dict from typing import Iterator from typing import Optional +from typing import Union from . import compat @@ -121,7 +122,7 @@ class code_writer_cmd: sys.stderr.write(" ".join(text)) def write_output_file_from_text( - self, text: str, destination_path: str + self, text: str, destination_path: Union[str, Path] ) -> None: if self.args.check: self._run_diff(destination_path, source=text) @@ -129,7 +130,9 @@ class code_writer_cmd: print(text) else: self.write_status(f"Writing {destination_path}...") - Path(destination_path).write_text(text) + Path(destination_path).write_text( + text, encoding="utf-8", newline="\n" + ) self.write_status("done\n") def write_output_file_from_tempfile( @@ -149,24 +152,24 @@ class code_writer_cmd: def _run_diff( self, - destination_path: str, + destination_path: Union[str, Path], *, source: Optional[str] = None, source_file: Optional[str] = None, ) -> None: if source_file: - with open(source_file) as tf: + with open(source_file, encoding="utf-8") as tf: source_lines = list(tf) elif source is not None: source_lines = source.splitlines(keepends=True) else: assert False, "source or source_file is required" - with open(destination_path) as dp: + with open(destination_path, encoding="utf-8") as dp: d = difflib.unified_diff( list(dp), source_lines, - fromfile=destination_path, + fromfile=Path(destination_path).as_posix(), tofile="", n=3, lineterm="\n", diff --git a/lib/sqlalchemy/util/typing.py b/lib/sqlalchemy/util/typing.py index 3d15d43db7..aad5709451 100644 --- a/lib/sqlalchemy/util/typing.py +++ b/lib/sqlalchemy/util/typing.py @@ -1,5 +1,5 @@ # util/typing.py -# Copyright (C) 2022 the SQLAlchemy authors and contributors +# Copyright (C) 2022-2023 the SQLAlchemy authors and contributors # # # This module is part of SQLAlchemy and is released under diff --git a/tools/normalize_file_headers.py b/tools/normalize_file_headers.py new file mode 100644 index 0000000000..8d82f84955 --- /dev/null +++ b/tools/normalize_file_headers.py @@ -0,0 +1,69 @@ +from datetime import date +from pathlib import Path +import re + +from sqlalchemy.util.tool_support import code_writer_cmd + +sa_path = Path(__file__).parent.parent / "lib/sqlalchemy" + + +file_re = re.compile(r"^# [\w+/]+.(?:pyx?|pxd)$", re.MULTILINE) +license_re = re.compile( + r"Copyright .C. (\d+)-\d+ the SQLAlchemy authors and contributors" +) + +this_year = date.today().year +license_ = f""" +# Copyright (C) 2005-{this_year} the SQLAlchemy authors and \ +contributors +# +# +# This module is part of SQLAlchemy and is released under +# the MIT License: https://www.opensource.org/licenses/mit-license.php +""" + + +def run_file(cmd: code_writer_cmd, file: Path, update_year: bool): + content = file.read_text("utf-8") + path = str(file.relative_to(sa_path)).replace("\\", "/") # handle windows + path_comment = f"# {path}" + has_license = bool(license_re.search(content)) + if file_re.match(content.strip()): + if has_license: + to_sub = path_comment + else: + to_sub = path_comment + license_ + content = file_re.sub(to_sub, content, count=1) + else: + content = path_comment + ("\n" if has_license else license_) + content + + if has_license and update_year: + content = license_re.sub( + rf"Copyright (C) \1-{this_year} the SQLAlchemy " + "authors and contributors", + content, + 1, + ) + cmd.write_output_file_from_text(content, file) + + +def run(cmd: code_writer_cmd, update_year: bool): + i = 0 + for ext in ('py', 'pyx', 'pxd'): + for file in sa_path.glob(f"**/*.{ext}"): + run_file(cmd, file, update_year) + i += 1 + cmd.write_status(f"\nDone. Processed {i} files.") + + +if __name__ == "__main__": + cmd = code_writer_cmd(__file__) + with cmd.add_arguments() as parser: + parser.add_argument( + "--update-year", + action="store_true", + help="Update the year in the license files", + ) + + with cmd.run_program(): + run(cmd, cmd.args.update_year) diff --git a/tox.ini b/tox.ini index 22a7a7d994..bcba1190b2 100644 --- a/tox.ini +++ b/tox.ini @@ -244,6 +244,7 @@ commands = python ./tools/generate_proxy_methods.py --check python ./tools/sync_test_files.py --check python ./tools/generate_sql_functions.py --check + python ./tools/normalize_file_headers.py --check python ./tools/walk_packages.py