ffmpeg-6: fix COMPONENT_REVISION
[oi-userland.git] / components / python / deprecation / patches / 01-unittest2.patch
blob76f54d20e0a2b79d1f0fb9453956aa8457b936b8
1 https://github.com/briancurtin/deprecation/pull/57
3 --- deprecation-2.1.0/docs-requirements.txt.orig
4 +++ deprecation-2.1.0/docs-requirements.txt
5 @@ -1 +1 @@
6 -unittest2
7 +unittest2;python_version<'3.5'
8 --- deprecation-2.1.0/test-requirements.txt.orig
9 +++ deprecation-2.1.0/test-requirements.txt
10 @@ -2,4 +2,4 @@
11 coverage>=4.3
12 flake8>=3.2
13 packaging>=16.8
14 -unittest2>=1.1
15 +unittest2>=1.1;python_version<'3.5'
16 --- deprecation-2.1.0/tests/test_deprecation.py.orig
17 +++ deprecation-2.1.0/tests/test_deprecation.py
18 @@ -12,7 +12,12 @@
20 # As we unfortunately support Python 2.7, it lacks TestCase.subTest which
21 # is in 3.4+ or in unittest2
22 -import unittest2
23 +try:
24 + import unittest2
25 +except ImportError:
26 + import unittest
27 + unittest2 = unittest
29 import warnings
31 import deprecation
32 --- deprecation-2.1.0/tox.ini.orig
33 +++ deprecation-2.1.0/tox.ini
34 @@ -20,6 +20,6 @@
36 [testenv:docs]
37 deps = Sphinx
38 - unittest2
39 + unittest2;python_version<'3.5'
40 changedir = docs
41 commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . _build/html