Skip to content

time.clock DeprecationWarning under python3.7 #2265

@chestm007

Description

@chestm007

Expected behaviour:

This isnt a breaking issue as such, but it potentially will be in python 3.8 when time.clock is deprecated
for now it just fills your logs with

Dec 08 00:27:55 citadel flexget[1765]: /usr/lib/python3.7/site-packages/flexget/plugins/parsers/parser_internal.py:23: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be removed from Python 3.8: use time.perf_counter or time.process_time instead
Dec 08 00:27:55 citadel flexget[1765]:   start = time.clock()

Actual behaviour:

Steps to reproduce:

  • Step 1: install flexget under python 3.7
  • Ster 2: invoke either method from ParserInternal in flexget/plugins/parsers/parser_internal.py

Config:

(click to expand)
tasks:
  Movies:
    exists_movie: 
      path: /mnt/raid/Movies
      lookup: imdb
      allow_different_qualities: better
    imdb_lookup: yes
    html:
      url: https://thepiratebay.org/top/207
      title_from: url
      links_re: [ magnet ]
    proper_movies: yes
    quality:
      - 1080p+
      - h264+
      - dvdrip+
    seen_movies:
      scope: local
    regexp:
      accept:
        - '2018'
        - '2017'
        - '2016'
        - '2015'
        - '2014'
        - 1080p
        - BRRip
        - DvdRip
        - BluRay
      reject:
        - Hindi
    template: 
      - deluge_settings
      - piratebay_manipulate

  TvShows:
    exists_series: 
      - /mnt/raid/TvShows/
      - /mnt/raid/Movies/
    template: deluge_settings
    series:
      shows:
        - 13 Reasons Why
        - Shooter
        - Silicon Valley
        - Mr Robot
        - Game of Thrones
        - Vikings
        - Wanted
        - This is us
        - Breaking Bad
        - Archer
        - Orphan Black
        - Continuum
        - Narcos
        - House of Cards
        - Stranger Things
        - Wire
        - The Big Bang Theory
    discover:
      interval: 1 hour
      release_estimations: loose
      what:
        - next_series_episodes: yes
      from:
        - piratebay:
            category: tv
            sort_by: seeds  
    set:
      movedone: "/mnt/raid/TvShows/{{series_name}}/Season {{series_season}}/"
      path: "/mnt/raid/TvShows/{{series_name}}/Season {{series_season}}/"

templates:
  deluge_settings:
    deluge:
      username: localclient
      password: <some_hash>

  piratebay_manipulate:
    manipulate:
      - title:
          from: url
          extract: '&dn=(.*?)&tr=udp'
      - title:
          replace:
            regexp: '\+'
            format: ' '

schedules:
  - tasks: '*'
    interval:
      hours: 1

Log:

(click to expand)
Dec 08 00:33:19 citadel flexget[1765]: /usr/lib/python3.7/site-packages/flexget/plugins/parsers/parser_internal.py:23: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be r>
Dec 08 00:33:19 citadel flexget[1765]:   start = time.clock()
Dec 08 00:33:19 citadel flexget[1765]: /usr/lib/python3.7/site-packages/flexget/plugins/parsers/parser_internal.py:37: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be r>
Dec 08 00:33:19 citadel flexget[1765]:   end = time.clock()
Dec 08 00:33:19 citadel flexget[1765]: /usr/lib/python3.7/site-packages/flexget/plugins/parsers/parser_internal.py:23: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be r>
Dec 08 00:33:19 citadel flexget[1765]:   start = time.clock()
Dec 08 00:33:19 citadel flexget[1765]: /usr/lib/python3.7/site-packages/flexget/plugins/parsers/parser_internal.py:37: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be r>
Dec 08 00:33:19 citadel flexget[1765]:   end = time.clock()
Dec 08 00:33:19 citadel flexget[1765]: /usr/lib/python3.7/site-packages/flexget/plugins/parsers/parser_internal.py:23: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be r>
Dec 08 00:33:19 citadel flexget[1765]:   start = time.clock()
Dec 08 00:33:19 citadel flexget[1765]: /usr/lib/python3.7/site-packages/flexget/plugins/parsers/parser_internal.py:37: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be r>
Dec 08 00:33:19 citadel flexget[1765]:   end = time.clock()
Dec 08 00:33:19 citadel flexget[1765]: /usr/lib/python3.7/site-packages/flexget/plugins/parsers/parser_internal.py:23: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be r>
Dec 08 00:33:19 citadel flexget[1765]:   start = time.clock()
Dec 08 00:33:19 citadel flexget[1765]: /usr/lib/python3.7/site-packages/flexget/plugins/parsers/parser_internal.py:37: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be r>
Dec 08 00:33:19 citadel flexget[1765]:   end = time.clock()
Dec 08 00:33:19 citadel flexget[1765]: /usr/lib/python3.7/site-packages/flexget/plugins/parsers/parser_internal.py:23: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be r>
Dec 08 00:33:19 citadel flexget[1765]:   start = time.clock()
Dec 08 00:33:19 citadel flexget[1765]: /usr/lib/python3.7/site-packages/flexget/plugins/parsers/parser_internal.py:37: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be r>
Dec 08 00:33:19 citadel flexget[1765]:   end = time.clock()
Dec 08 00:33:19 citadel flexget[1765]: /usr/lib/python3.7/site-packages/flexget/plugins/parsers/parser_internal.py:23: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be r>
Dec 08 00:33:19 citadel flexget[1765]:   start = time.clock()
Dec 08 00:33:19 citadel flexget[1765]: /usr/lib/python3.7/site-packages/flexget/plugins/parsers/parser_internal.py:37: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be r>
Dec 08 00:33:19 citadel flexget[1765]:   end = time.clock()
Dec 08 00:33:19 citadel flexget[1765]: /usr/lib/python3.7/site-packages/flexget/plugins/parsers/parser_internal.py:23: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be r>
Dec 08 00:33:19 citadel flexget[1765]:   start = time.clock()
Dec 08 00:33:19 citadel flexget[1765]: /usr/lib/python3.7/site-packages/flexget/plugins/parsers/parser_internal.py:37: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be r>
Dec 08 00:33:19 citadel flexget[1765]:   end = time.clock()
Dec 08 00:33:19 citadel flexget[1765]: /usr/lib/python3.7/site-packages/flexget/plugins/parsers/parser_internal.py:23: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be r>
Dec 08 00:33:19 citadel flexget[1765]:   start = time.clock()
Dec 08 00:33:19 citadel flexget[1765]: /usr/lib/python3.7/site-packages/flexget/plugins/parsers/parser_internal.py:37: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be r>
Dec 08 00:33:19 citadel flexget[1765]:   end = time.clock()
Dec 08 00:33:19 citadel flexget[1765]: /usr/lib/python3.7/site-packages/flexget/plugins/parsers/parser_internal.py:23: DeprecationWarning: time.clock has been deprecated in Python 3.3 and will be r>
Dec 08 00:33:19 citadel flexget[1765]:   start = time.clock()

Additional information:

  • FlexGet version: 2.17.18.dev
  • Python version: Python 3.7.1 (default, Oct 22 2018, 10:41:28)
  • Installation method: AUR package[flexget-git] (Arch Linux) built from the latest git commit
  • Using daemon (yes/no): yes
  • OS and version: Arch Linux... latest? lol

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions