Message7671
On Wed, Nov 23, 2022 at 08:33:03PM +0000, John Rouillard wrote:
> unittest.mock isn't in 2.7. So I maybe:
>
> try:
> import unittest.mock as mock
> except ImportError:
> import mock
>
> Make the 3.x the default path and 2.x the compatibility exception.
I've tested this on the systems available to me:
- Debian oldstable python2.7.16
- Debian oldstable python3.7.3
- Debian stable python3.9.2
- custom installed python3.10.5
and pushed the fix. |
|
Date |
User |
Action |
Args |
2022-11-24 09:36:20 | schlatterbeck | set | recipients:
+ schlatterbeck, rouilj |
2022-11-24 09:36:20 | schlatterbeck | link | issue2551242 messages |
2022-11-24 09:36:20 | schlatterbeck | create | |
|