Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

fractions.gcd() is deprecated. Use math.gcd() instead. #967

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyspider/libs/base_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import sys
import inspect
import functools
import fractions
import math

import six
from six import add_metaclass, iteritems
Expand Down Expand Up @@ -112,7 +112,7 @@ def __new__(cls, name, bases, attrs):
for each in attrs.values():
if inspect.isfunction(each) and getattr(each, 'is_cronjob', False):
cron_jobs.append(each)
min_tick = fractions.gcd(min_tick, each.tick)
min_tick = math.gcd(min_tick, each.tick)
newcls = type.__new__(cls, name, bases, attrs)
newcls._cron_jobs = cron_jobs
newcls._min_tick = min_tick
Expand Down