Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:dspinella:zlib-ng-staging
python-pytest-freezegun
use-packaging.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File use-packaging.patch of Package python-pytest-freezegun
From 7f9c2db5269615e5e2dceb08dff896208eeb6f9c Mon Sep 17 00:00:00 2001 From: Christofer Bertonha <christoferbertonha@gmail.com> Date: Fri, 2 Sep 2022 16:32:50 +0200 Subject: [PATCH] Fix distutils.version deprecation --- pytest_freezegun.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pytest_freezegun.py b/pytest_freezegun.py index a08133f..e4d2719 100644 --- a/pytest_freezegun.py +++ b/pytest_freezegun.py @@ -2,7 +2,7 @@ import pytest -from distutils.version import LooseVersion +from packaging.version import Version from freezegun import freeze_time @@ -14,7 +14,7 @@ def get_closest_marker(node, name): """ Get our marker, regardless of pytest version """ - if LooseVersion(pytest.__version__) < LooseVersion('3.6.0'): + if Version(pytest.__version__) < Version('3.6.0'): return node.get_marker('freeze_time') else: return node.get_closest_marker('freeze_time')
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor