From 4b023bc9ade1cd819603946192cd6164c1a4f65e Mon Sep 17 00:00:00 2001 From: Matt Baker <93600443+matthbakeredb@users.noreply.github.com> Date: Fri, 7 Jul 2023 10:19:41 +0100 Subject: [PATCH] Set encoding on open call in setup.py (#2727) * Set encoding on open call in setup.py If a host OS does not have a UTF-8 locale set the read() call is unable to read the utf-8 encoded README.rst file. * Remove non-ASCII characters from README.rst --- README.rst | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 18be2b49..84e67379 100644 --- a/README.rst +++ b/README.rst @@ -8,7 +8,7 @@ You can find a version of this documentation that is searchable and also easier There are many ways to run high availability with PostgreSQL; for a list, see the `PostgreSQL Documentation `__. -Patroni is a template for high availability (HA) PostgreSQL solutions using Python. For maximum accessibility, Patroni supports a variety of distributed configuration stores like `ZooKeeper `__, `etcd `__, `Consul `__ or `Kubernetes `__. Database engineers, DBAs, DevOps engineers, and SREs who are looking to quickly deploy HA PostgreSQL in datacenters — or anywhere else — will hopefully find it useful. +Patroni is a template for high availability (HA) PostgreSQL solutions using Python. For maximum accessibility, Patroni supports a variety of distributed configuration stores like `ZooKeeper `__, `etcd `__, `Consul `__ or `Kubernetes `__. Database engineers, DBAs, DevOps engineers, and SREs who are looking to quickly deploy HA PostgreSQL in datacenters - or anywhere else - will hopefully find it useful. We call Patroni a "template" because it is far from being a one-size-fits-all or plug-and-play replication system. It will have its own caveats. Use wisely. diff --git a/setup.py b/setup.py index bff90cd4..8b14fed9 100644 --- a/setup.py +++ b/setup.py @@ -116,7 +116,7 @@ class PyTest(_Command): def read(fname): - with open(os.path.join(__location__, fname)) as fd: + with open(os.path.join(__location__, fname), encoding='utf-8') as fd: return fd.read()