Commit 94f3181
Fix pkg_resources exception handling for py312
The exception that is generated on parsing errors has changed in Python
3.12, match on the generic ValueError instead. Also switch to using
the simpler assertRaises() call instead of explicitly dealing with
exceptions.
Note that this is just a temporary workaround, we should really move
away for using pkg_resources completely, see [0] and [1].
[0] https://setuptools.pypa.io/en/latest/pkg_resources.html
[1] https://importlib-resources.readthedocs.io/en/latest/migration.html
Change-Id: I20422194f6fc6d1c4ba49da754a2c3aab99a282c
(cherry picked from commit c7d9856)1 parent 275c459 commit 94f3181
1 file changed
+3
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
| |||
107 | 105 | | |
108 | 106 | | |
109 | 107 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
| 108 | + | |
117 | 109 | | |
118 | 110 | | |
119 | 111 | | |
| |||
153 | 145 | | |
154 | 146 | | |
155 | 147 | | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
| 148 | + | |
| 149 | + | |
163 | 150 | | |
164 | 151 | | |
165 | 152 | | |
| |||
0 commit comments