Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-17088

Fix collections import deprecation warning in python 3.7

    XMLWordPrintable

    Details

    • Story Points:
      0.5
    • Sprint:
      Arch 2019-01-07
    • Team:
      Architecture

      Description

      In python3.7 these warnings turn up:

      DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working

      pex_config and daf_persistence are known to have the problem.

        Attachments

          Issue Links

            Activity

            No builds found.
            tjenness Tim Jenness created issue -
            tjenness Tim Jenness made changes -
            Field Original Value New Value
            Component/s pex_config [ 10729 ]
            tjenness Tim Jenness made changes -
            Description In python3.7 these warnings turn up:

            {quote}
            DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
            {quote}
            In python3.7 these warnings turn up:

            {quote}
            DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
            {quote}

            pex_config and daf_persistence are known to have the problem.
            tjenness Tim Jenness made changes -
            Link This issue relates to RFC-564 [ RFC-564 ]
            Hide
            tjenness Tim Jenness added a comment -

            Kian-Tat Lim would you be able to take a quick look at this? The changes are relatively minor across four packages. Jenkins is running at the moment.

            Show
            tjenness Tim Jenness added a comment - Kian-Tat Lim would you be able to take a quick look at this? The changes are relatively minor across four packages. Jenkins is running at the moment.
            tjenness Tim Jenness made changes -
            Reviewers Kian-Tat Lim [ ktl ]
            Status To Do [ 10001 ] In Review [ 10004 ]
            Hide
            ktl Kian-Tat Lim added a comment -

            Trivial changes, of course.

            One small thing: it looks like LayerDict in meas_modelfit might be even simpler if it just inherited from dict instead of MutableMapping.  The same might apply to SelectionSet in pex_config, but probably not ConfigInstanceDict.

            Show
            ktl Kian-Tat Lim added a comment - Trivial changes, of course. One small thing: it looks like LayerDict in meas_modelfit might be even simpler if it just inherited from dict instead of MutableMapping .  The same might apply to SelectionSet in pex_config , but probably not ConfigInstanceDict .
            ktl Kian-Tat Lim made changes -
            Status In Review [ 10004 ] Reviewed [ 10101 ]
            Hide
            tjenness Tim Jenness added a comment -

            Hmm. Yes, there might be some cases where inheriting from a normal dict might be better now that you can do that in modern python. I'm a bit worried that this is a bigger change than I want to make given I'm not sure what the test coverage is like for meas_modelfit.

            Show
            tjenness Tim Jenness added a comment - Hmm. Yes, there might be some cases where inheriting from a normal dict might be better now that you can do that in modern python. I'm a bit worried that this is a bigger change than I want to make given I'm not sure what the test coverage is like for meas_modelfit.
            tjenness Tim Jenness made changes -
            Resolution Done [ 10000 ]
            Status Reviewed [ 10101 ] Done [ 10002 ]

              People

              Assignee:
              tjenness Tim Jenness
              Reporter:
              tjenness Tim Jenness
              Reviewers:
              Kian-Tat Lim
              Watchers:
              Kian-Tat Lim, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.