File: 0001-Use-io.open-for-Python3-support.patch

package info (click to toggle)
python-django-ordered-model 2.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 252 kB
  • sloc: python: 1,050; makefile: 11
file content (23 lines) | stat: -rw-r--r-- 549 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From: Michael Fladischer <FladischerMichael@fladi.at>
Date: Fri, 12 May 2017 20:47:00 +0200
Subject: Use io.open for Python3 support.

---
 setup.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index c9e1dd5..e06374e 100644
--- a/setup.py
+++ b/setup.py
@@ -1,8 +1,9 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
+import io
 from setuptools import setup
 
-with open('requirements.txt') as f:
+with io.open('requirements.txt', encoding='utf-8') as f:
     requires = f.read().splitlines()
 
 setup(