Skip to content

Commit 354bdc4

Browse files
author
alrex
authored
update open calls to pass encoding (#684)
1 parent 1cf5021 commit 354bdc4

File tree

44 files changed

+86
-84
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+86
-84
lines changed

_template/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"version.py",
2828
)
2929
PACKAGE_INFO = {}
30-
with open(VERSION_FILENAME) as f:
30+
with open(VERSION_FILENAME, encoding="utf-8") as f:
3131
exec(f.read(), PACKAGE_INFO)
3232

3333
setuptools.setup(

exporter/opentelemetry-exporter-datadog/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
BASE_DIR, "src", "opentelemetry", "exporter", "datadog", "version.py"
2222
)
2323
PACKAGE_INFO = {}
24-
with open(VERSION_FILENAME) as f:
24+
with open(VERSION_FILENAME, encoding="utf-8") as f:
2525
exec(f.read(), PACKAGE_INFO)
2626

2727
setuptools.setup(version=PACKAGE_INFO["__version__"])

instrumentation/opentelemetry-instrumentation-aiohttp-client/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"aiohttp_client",
4747
"version.py",
4848
)
49-
with open(VERSION_FILENAME) as f:
49+
with open(VERSION_FILENAME, encoding="utf-8") as f:
5050
exec(f.read(), PACKAGE_INFO)
5151

5252
PACKAGE_FILENAME = os.path.join(
@@ -57,7 +57,7 @@
5757
"aiohttp_client",
5858
"package.py",
5959
)
60-
with open(PACKAGE_FILENAME) as f:
60+
with open(PACKAGE_FILENAME, encoding="utf-8") as f:
6161
exec(f.read(), PACKAGE_INFO)
6262

6363
# Mark any instruments/runtime dependencies as test dependencies as well.

instrumentation/opentelemetry-instrumentation-aiopg/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@
4141
VERSION_FILENAME = os.path.join(
4242
BASE_DIR, "src", "opentelemetry", "instrumentation", "aiopg", "version.py"
4343
)
44-
with open(VERSION_FILENAME) as f:
44+
with open(VERSION_FILENAME, encoding="utf-8") as f:
4545
exec(f.read(), PACKAGE_INFO)
4646

4747
PACKAGE_FILENAME = os.path.join(
4848
BASE_DIR, "src", "opentelemetry", "instrumentation", "aiopg", "package.py"
4949
)
50-
with open(PACKAGE_FILENAME) as f:
50+
with open(PACKAGE_FILENAME, encoding="utf-8") as f:
5151
exec(f.read(), PACKAGE_INFO)
5252

5353
# Mark any instruments/runtime dependencies as test dependencies as well.

instrumentation/opentelemetry-instrumentation-asgi/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@
4141
VERSION_FILENAME = os.path.join(
4242
BASE_DIR, "src", "opentelemetry", "instrumentation", "asgi", "version.py"
4343
)
44-
with open(VERSION_FILENAME) as f:
44+
with open(VERSION_FILENAME, encoding="utf-8") as f:
4545
exec(f.read(), PACKAGE_INFO)
4646

4747
PACKAGE_FILENAME = os.path.join(
4848
BASE_DIR, "src", "opentelemetry", "instrumentation", "asgi", "package.py"
4949
)
50-
with open(PACKAGE_FILENAME) as f:
50+
with open(PACKAGE_FILENAME, encoding="utf-8") as f:
5151
exec(f.read(), PACKAGE_INFO)
5252

5353
# Mark any instruments/runtime dependencies as test dependencies as well.

instrumentation/opentelemetry-instrumentation-asyncpg/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"asyncpg",
4747
"version.py",
4848
)
49-
with open(VERSION_FILENAME) as f:
49+
with open(VERSION_FILENAME, encoding="utf-8") as f:
5050
exec(f.read(), PACKAGE_INFO)
5151

5252
PACKAGE_FILENAME = os.path.join(
@@ -57,7 +57,7 @@
5757
"asyncpg",
5858
"package.py",
5959
)
60-
with open(PACKAGE_FILENAME) as f:
60+
with open(PACKAGE_FILENAME, encoding="utf-8") as f:
6161
exec(f.read(), PACKAGE_INFO)
6262

6363
# Mark any instruments/runtime dependencies as test dependencies as well.

instrumentation/opentelemetry-instrumentation-boto/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@
4141
VERSION_FILENAME = os.path.join(
4242
BASE_DIR, "src", "opentelemetry", "instrumentation", "boto", "version.py"
4343
)
44-
with open(VERSION_FILENAME) as f:
44+
with open(VERSION_FILENAME, encoding="utf-8") as f:
4545
exec(f.read(), PACKAGE_INFO)
4646

4747
PACKAGE_FILENAME = os.path.join(
4848
BASE_DIR, "src", "opentelemetry", "instrumentation", "boto", "package.py"
4949
)
50-
with open(PACKAGE_FILENAME) as f:
50+
with open(PACKAGE_FILENAME, encoding="utf-8") as f:
5151
exec(f.read(), PACKAGE_INFO)
5252

5353
# Mark any instruments/runtime dependencies as test dependencies as well.

instrumentation/opentelemetry-instrumentation-botocore/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"botocore",
4747
"version.py",
4848
)
49-
with open(VERSION_FILENAME) as f:
49+
with open(VERSION_FILENAME, encoding="utf-8") as f:
5050
exec(f.read(), PACKAGE_INFO)
5151

5252
PACKAGE_FILENAME = os.path.join(
@@ -57,7 +57,7 @@
5757
"botocore",
5858
"package.py",
5959
)
60-
with open(PACKAGE_FILENAME) as f:
60+
with open(PACKAGE_FILENAME, encoding="utf-8") as f:
6161
exec(f.read(), PACKAGE_INFO)
6262

6363
# Mark any instruments/runtime dependencies as test dependencies as well.

instrumentation/opentelemetry-instrumentation-celery/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@
4141
VERSION_FILENAME = os.path.join(
4242
BASE_DIR, "src", "opentelemetry", "instrumentation", "celery", "version.py"
4343
)
44-
with open(VERSION_FILENAME) as f:
44+
with open(VERSION_FILENAME, encoding="utf-8") as f:
4545
exec(f.read(), PACKAGE_INFO)
4646

4747
PACKAGE_FILENAME = os.path.join(
4848
BASE_DIR, "src", "opentelemetry", "instrumentation", "celery", "package.py"
4949
)
50-
with open(PACKAGE_FILENAME) as f:
50+
with open(PACKAGE_FILENAME, encoding="utf-8") as f:
5151
exec(f.read(), PACKAGE_INFO)
5252

5353
# Mark any instruments/runtime dependencies as test dependencies as well.

instrumentation/opentelemetry-instrumentation-dbapi/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@
4141
VERSION_FILENAME = os.path.join(
4242
BASE_DIR, "src", "opentelemetry", "instrumentation", "dbapi", "version.py"
4343
)
44-
with open(VERSION_FILENAME) as f:
44+
with open(VERSION_FILENAME, encoding="utf-8") as f:
4545
exec(f.read(), PACKAGE_INFO)
4646

4747
PACKAGE_FILENAME = os.path.join(
4848
BASE_DIR, "src", "opentelemetry", "instrumentation", "dbapi", "package.py"
4949
)
50-
with open(PACKAGE_FILENAME) as f:
50+
with open(PACKAGE_FILENAME, encoding="utf-8") as f:
5151
exec(f.read(), PACKAGE_INFO)
5252

5353
# Mark any instruments/runtime dependencies as test dependencies as well.

instrumentation/opentelemetry-instrumentation-django/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@
4141
VERSION_FILENAME = os.path.join(
4242
BASE_DIR, "src", "opentelemetry", "instrumentation", "django", "version.py"
4343
)
44-
with open(VERSION_FILENAME) as f:
44+
with open(VERSION_FILENAME, encoding="utf-8") as f:
4545
exec(f.read(), PACKAGE_INFO)
4646

4747
PACKAGE_FILENAME = os.path.join(
4848
BASE_DIR, "src", "opentelemetry", "instrumentation", "django", "package.py"
4949
)
50-
with open(PACKAGE_FILENAME) as f:
50+
with open(PACKAGE_FILENAME, encoding="utf-8") as f:
5151
exec(f.read(), PACKAGE_INFO)
5252

5353
# Mark any instruments/runtime dependencies as test dependencies as well.

instrumentation/opentelemetry-instrumentation-elasticsearch/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"elasticsearch",
4747
"version.py",
4848
)
49-
with open(VERSION_FILENAME) as f:
49+
with open(VERSION_FILENAME, encoding="utf-8") as f:
5050
exec(f.read(), PACKAGE_INFO)
5151

5252
PACKAGE_FILENAME = os.path.join(
@@ -57,7 +57,7 @@
5757
"elasticsearch",
5858
"package.py",
5959
)
60-
with open(PACKAGE_FILENAME) as f:
60+
with open(PACKAGE_FILENAME, encoding="utf-8") as f:
6161
exec(f.read(), PACKAGE_INFO)
6262

6363
# Mark any instruments/runtime dependencies as test dependencies as well.

instrumentation/opentelemetry-instrumentation-falcon/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@
4141
VERSION_FILENAME = os.path.join(
4242
BASE_DIR, "src", "opentelemetry", "instrumentation", "falcon", "version.py"
4343
)
44-
with open(VERSION_FILENAME) as f:
44+
with open(VERSION_FILENAME, encoding="utf-8") as f:
4545
exec(f.read(), PACKAGE_INFO)
4646

4747
PACKAGE_FILENAME = os.path.join(
4848
BASE_DIR, "src", "opentelemetry", "instrumentation", "falcon", "package.py"
4949
)
50-
with open(PACKAGE_FILENAME) as f:
50+
with open(PACKAGE_FILENAME, encoding="utf-8") as f:
5151
exec(f.read(), PACKAGE_INFO)
5252

5353
# Mark any instruments/runtime dependencies as test dependencies as well.

instrumentation/opentelemetry-instrumentation-fastapi/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"fastapi",
4747
"version.py",
4848
)
49-
with open(VERSION_FILENAME) as f:
49+
with open(VERSION_FILENAME, encoding="utf-8") as f:
5050
exec(f.read(), PACKAGE_INFO)
5151

5252
PACKAGE_FILENAME = os.path.join(
@@ -57,7 +57,7 @@
5757
"fastapi",
5858
"package.py",
5959
)
60-
with open(PACKAGE_FILENAME) as f:
60+
with open(PACKAGE_FILENAME, encoding="utf-8") as f:
6161
exec(f.read(), PACKAGE_INFO)
6262

6363
# Mark any instruments/runtime dependencies as test dependencies as well.

instrumentation/opentelemetry-instrumentation-flask/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@
4141
VERSION_FILENAME = os.path.join(
4242
BASE_DIR, "src", "opentelemetry", "instrumentation", "flask", "version.py"
4343
)
44-
with open(VERSION_FILENAME) as f:
44+
with open(VERSION_FILENAME, encoding="utf-8") as f:
4545
exec(f.read(), PACKAGE_INFO)
4646

4747
PACKAGE_FILENAME = os.path.join(
4848
BASE_DIR, "src", "opentelemetry", "instrumentation", "flask", "package.py"
4949
)
50-
with open(PACKAGE_FILENAME) as f:
50+
with open(PACKAGE_FILENAME, encoding="utf-8") as f:
5151
exec(f.read(), PACKAGE_INFO)
5252

5353
# Mark any instruments/runtime dependencies as test dependencies as well.

instrumentation/opentelemetry-instrumentation-grpc/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@
4141
VERSION_FILENAME = os.path.join(
4242
BASE_DIR, "src", "opentelemetry", "instrumentation", "grpc", "version.py"
4343
)
44-
with open(VERSION_FILENAME) as f:
44+
with open(VERSION_FILENAME, encoding="utf-8") as f:
4545
exec(f.read(), PACKAGE_INFO)
4646

4747
PACKAGE_FILENAME = os.path.join(
4848
BASE_DIR, "src", "opentelemetry", "instrumentation", "grpc", "package.py"
4949
)
50-
with open(PACKAGE_FILENAME) as f:
50+
with open(PACKAGE_FILENAME, encoding="utf-8") as f:
5151
exec(f.read(), PACKAGE_INFO)
5252

5353
# Mark any instruments/runtime dependencies as test dependencies as well.

instrumentation/opentelemetry-instrumentation-httpx/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@
4141
VERSION_FILENAME = os.path.join(
4242
BASE_DIR, "src", "opentelemetry", "instrumentation", "httpx", "version.py"
4343
)
44-
with open(VERSION_FILENAME) as f:
44+
with open(VERSION_FILENAME, encoding="utf-8") as f:
4545
exec(f.read(), PACKAGE_INFO)
4646

4747
PACKAGE_FILENAME = os.path.join(
4848
BASE_DIR, "src", "opentelemetry", "instrumentation", "httpx", "package.py"
4949
)
50-
with open(PACKAGE_FILENAME) as f:
50+
with open(PACKAGE_FILENAME, encoding="utf-8") as f:
5151
exec(f.read(), PACKAGE_INFO)
5252

5353
# Mark any instruments/runtime dependencies as test dependencies as well.

instrumentation/opentelemetry-instrumentation-jinja2/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@
4141
VERSION_FILENAME = os.path.join(
4242
BASE_DIR, "src", "opentelemetry", "instrumentation", "jinja2", "version.py"
4343
)
44-
with open(VERSION_FILENAME) as f:
44+
with open(VERSION_FILENAME, encoding="utf-8") as f:
4545
exec(f.read(), PACKAGE_INFO)
4646

4747
PACKAGE_FILENAME = os.path.join(
4848
BASE_DIR, "src", "opentelemetry", "instrumentation", "jinja2", "package.py"
4949
)
50-
with open(PACKAGE_FILENAME) as f:
50+
with open(PACKAGE_FILENAME, encoding="utf-8") as f:
5151
exec(f.read(), PACKAGE_INFO)
5252

5353
# Mark any instruments/runtime dependencies as test dependencies as well.

instrumentation/opentelemetry-instrumentation-logging/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"logging",
4747
"version.py",
4848
)
49-
with open(VERSION_FILENAME) as f:
49+
with open(VERSION_FILENAME, encoding="utf-8") as f:
5050
exec(f.read(), PACKAGE_INFO)
5151

5252
PACKAGE_FILENAME = os.path.join(
@@ -57,7 +57,7 @@
5757
"logging",
5858
"package.py",
5959
)
60-
with open(PACKAGE_FILENAME) as f:
60+
with open(PACKAGE_FILENAME, encoding="utf-8") as f:
6161
exec(f.read(), PACKAGE_INFO)
6262

6363
# Mark any instruments/runtime dependencies as test dependencies as well.

instrumentation/opentelemetry-instrumentation-mysql/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@
4141
VERSION_FILENAME = os.path.join(
4242
BASE_DIR, "src", "opentelemetry", "instrumentation", "mysql", "version.py"
4343
)
44-
with open(VERSION_FILENAME) as f:
44+
with open(VERSION_FILENAME, encoding="utf-8") as f:
4545
exec(f.read(), PACKAGE_INFO)
4646

4747
PACKAGE_FILENAME = os.path.join(
4848
BASE_DIR, "src", "opentelemetry", "instrumentation", "mysql", "package.py"
4949
)
50-
with open(PACKAGE_FILENAME) as f:
50+
with open(PACKAGE_FILENAME, encoding="utf-8") as f:
5151
exec(f.read(), PACKAGE_INFO)
5252

5353
# Mark any instruments/runtime dependencies as test dependencies as well.

instrumentation/opentelemetry-instrumentation-psycopg2/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"psycopg2",
4747
"version.py",
4848
)
49-
with open(VERSION_FILENAME) as f:
49+
with open(VERSION_FILENAME, encoding="utf-8") as f:
5050
exec(f.read(), PACKAGE_INFO)
5151

5252
PACKAGE_FILENAME = os.path.join(
@@ -57,7 +57,7 @@
5757
"psycopg2",
5858
"package.py",
5959
)
60-
with open(PACKAGE_FILENAME) as f:
60+
with open(PACKAGE_FILENAME, encoding="utf-8") as f:
6161
exec(f.read(), PACKAGE_INFO)
6262

6363
# Mark any instruments/runtime dependencies as test dependencies as well.

instrumentation/opentelemetry-instrumentation-pymemcache/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"pymemcache",
4747
"version.py",
4848
)
49-
with open(VERSION_FILENAME) as f:
49+
with open(VERSION_FILENAME, encoding="utf-8") as f:
5050
exec(f.read(), PACKAGE_INFO)
5151

5252
PACKAGE_FILENAME = os.path.join(
@@ -57,7 +57,7 @@
5757
"pymemcache",
5858
"package.py",
5959
)
60-
with open(PACKAGE_FILENAME) as f:
60+
with open(PACKAGE_FILENAME, encoding="utf-8") as f:
6161
exec(f.read(), PACKAGE_INFO)
6262

6363
# Mark any instruments/runtime dependencies as test dependencies as well.

instrumentation/opentelemetry-instrumentation-pymongo/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"pymongo",
4747
"version.py",
4848
)
49-
with open(VERSION_FILENAME) as f:
49+
with open(VERSION_FILENAME, encoding="utf-8") as f:
5050
exec(f.read(), PACKAGE_INFO)
5151

5252
PACKAGE_FILENAME = os.path.join(
@@ -57,7 +57,7 @@
5757
"pymongo",
5858
"package.py",
5959
)
60-
with open(PACKAGE_FILENAME) as f:
60+
with open(PACKAGE_FILENAME, encoding="utf-8") as f:
6161
exec(f.read(), PACKAGE_INFO)
6262

6363
# Mark any instruments/runtime dependencies as test dependencies as well.

instrumentation/opentelemetry-instrumentation-pymysql/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"pymysql",
4747
"version.py",
4848
)
49-
with open(VERSION_FILENAME) as f:
49+
with open(VERSION_FILENAME, encoding="utf-8") as f:
5050
exec(f.read(), PACKAGE_INFO)
5151

5252
PACKAGE_FILENAME = os.path.join(
@@ -57,7 +57,7 @@
5757
"pymysql",
5858
"package.py",
5959
)
60-
with open(PACKAGE_FILENAME) as f:
60+
with open(PACKAGE_FILENAME, encoding="utf-8") as f:
6161
exec(f.read(), PACKAGE_INFO)
6262

6363
# Mark any instruments/runtime dependencies as test dependencies as well.

0 commit comments

Comments
 (0)