[Notes] [Git][BuildStream/buildstream][aevri/affect] 3 commits: Fix python warnings: Use collections.abc instead collections



Title: GitLab

Angelos Evripiotis pushed to branch aevri/affect at BuildStream / buildstream

Commits:

22 changed files:

Changes:

  • buildstream/_artifactcache/artifactcache.py
    ... ... @@ -19,7 +19,8 @@
    19 19
     
    
    20 20
     import os
    
    21 21
     import string
    
    22
    -from collections import Mapping, namedtuple
    
    22
    +from collections import namedtuple
    
    23
    +from collections.abc import Mapping
    
    23 24
     
    
    24 25
     from ..types import _KeyStrength
    
    25 26
     from .._exceptions import ArtifactError, ImplError, LoadError, LoadErrorReason
    

  • buildstream/_context.py
    ... ... @@ -19,7 +19,8 @@
    19 19
     
    
    20 20
     import os
    
    21 21
     import datetime
    
    22
    -from collections import deque, Mapping
    
    22
    +from collections import deque
    
    23
    +from collections.abc import Mapping
    
    23 24
     from contextlib import contextmanager
    
    24 25
     from . import utils
    
    25 26
     from . import _cachekey
    

  • buildstream/_includes.py
    1 1
     import os
    
    2
    -from collections import Mapping
    
    2
    +from collections.abc import Mapping
    
    3 3
     from . import _yaml
    
    4 4
     from ._exceptions import LoadError, LoadErrorReason
    
    5 5
     
    

  • buildstream/_loader/loadelement.py
    ... ... @@ -18,7 +18,7 @@
    18 18
     #        Tristan Van Berkom <tristan vanberkom codethink co uk>
    
    19 19
     
    
    20 20
     # System imports
    
    21
    -from collections import Mapping
    
    21
    +from collections.abc import Mapping
    
    22 22
     
    
    23 23
     # BuildStream toplevel imports
    
    24 24
     from .._exceptions import LoadError, LoadErrorReason
    

  • buildstream/_loader/loader.py
    ... ... @@ -19,7 +19,8 @@
    19 19
     
    
    20 20
     import os
    
    21 21
     from functools import cmp_to_key
    
    22
    -from collections import Mapping, namedtuple
    
    22
    +from collections import namedtuple
    
    23
    +from collections.abc import Mapping
    
    23 24
     import tempfile
    
    24 25
     import shutil
    
    25 26
     
    

  • buildstream/_options/optionpool.py
    ... ... @@ -18,7 +18,7 @@
    18 18
     #        Tristan Van Berkom <tristan vanberkom codethink co uk>
    
    19 19
     #
    
    20 20
     
    
    21
    -from collections import Mapping
    
    21
    +from collections.abc import Mapping
    
    22 22
     import jinja2
    
    23 23
     
    
    24 24
     from .. import _yaml
    

  • buildstream/_project.py
    ... ... @@ -19,7 +19,8 @@
    19 19
     #        Tiago Gomes <tiago gomes codethink co uk>
    
    20 20
     
    
    21 21
     import os
    
    22
    -from collections import Mapping, OrderedDict
    
    22
    +from collections import OrderedDict
    
    23
    +from collections.abc import Mapping
    
    23 24
     from pluginbase import PluginBase
    
    24 25
     from . import utils
    
    25 26
     from . import _cachekey
    

  • buildstream/_scheduler/queues/queue.py
    ... ... @@ -208,7 +208,7 @@ class Queue():
    208 208
         # This will have different results for elements depending
    
    209 209
         # on the Queue.status() implementation.
    
    210 210
         #
    
    211
    -    #   o Elements which are QueueStatus.WAIT will not be effected
    
    211
    +    #   o Elements which are QueueStatus.WAIT will not be affected
    
    212 212
         #
    
    213 213
         #   o Elements which are QueueStatus.SKIP will move directly
    
    214 214
         #     to the dequeue pool
    

  • buildstream/_yaml.py
    ... ... @@ -972,7 +972,7 @@ def node_validate(node, valid_keys):
    972 972
     #
    
    973 973
     # The purpose of this is to create a virtual copy-on-write
    
    974 974
     # copy of a dictionary, so that mutating it in any way does
    
    975
    -# not effect the underlying dictionaries.
    
    975
    +# not affect the underlying dictionaries.
    
    976 976
     #
    
    977 977
     # collections.ChainMap covers this already mostly, but fails
    
    978 978
     # to record internal state so as to hide keys which have been
    

  • buildstream/buildelement.py
    ... ... @@ -176,7 +176,7 @@ class BuildElement(Element):
    176 176
     
    
    177 177
             # Specifying notparallel for a given element effects the
    
    178 178
             # cache key, while having the side effect of setting max-jobs to 1,
    
    179
    -        # which is normally automatically resolved and does not effect
    
    179
    +        # which is normally automatically resolved and does not affect
    
    180 180
             # the cache key.
    
    181 181
             if self.get_variable('notparallel'):
    
    182 182
                 dictionary['notparallel'] = True
    

  • buildstream/element.py
    ... ... @@ -76,7 +76,8 @@ import os
    76 76
     import re
    
    77 77
     import stat
    
    78 78
     import copy
    
    79
    -from collections import Mapping, OrderedDict
    
    79
    +from collections import OrderedDict
    
    80
    +from collections.abc import Mapping
    
    80 81
     from contextlib import contextmanager
    
    81 82
     import tempfile
    
    82 83
     import shutil
    

  • buildstream/plugin.py
    ... ... @@ -266,7 +266,7 @@ class Plugin():
    266 266
             such as an sha256 sum of a tarball content.
    
    267 267
     
    
    268 268
             Elements and Sources should implement this by collecting any configurations
    
    269
    -        which could possibly effect the output and return a dictionary of these settings.
    
    269
    +        which could possibly affect the output and return a dictionary of these settings.
    
    270 270
     
    
    271 271
             For Sources, this is guaranteed to only be called if
    
    272 272
             :func:`Source.get_consistency() <buildstream.source.Source.get_consistency>`
    

  • buildstream/plugins/elements/autotools.yaml
    ... ... @@ -123,7 +123,7 @@ environment:
    123 123
       V: 1
    
    124 124
     
    
    125 125
     # And dont consider MAKEFLAGS or V as something which may
    
    126
    -# effect build output.
    
    126
    +# affect build output.
    
    127 127
     environment-nocache:
    
    128 128
     - MAKEFLAGS
    
    129 129
     - V

  • buildstream/plugins/elements/cmake.yaml
    ... ... @@ -66,7 +66,7 @@ environment:
    66 66
       V: 1
    
    67 67
     
    
    68 68
     # And dont consider JOBS or V as something which may
    
    69
    -# effect build output.
    
    69
    +# affect build output.
    
    70 70
     environment-nocache:
    
    71 71
     - JOBS
    
    72 72
     - V

  • buildstream/plugins/elements/junction.py
    ... ... @@ -124,7 +124,7 @@ the user to resolve possibly conflicting nested junctions by creating a junction
    124 124
     with the same name in the top-level project, which then takes precedence.
    
    125 125
     """
    
    126 126
     
    
    127
    -from collections import Mapping
    
    127
    +from collections.abc import Mapping
    
    128 128
     from buildstream import Element
    
    129 129
     from buildstream._pipeline import PipelineError
    
    130 130
     
    

  • buildstream/plugins/elements/make.yaml
    ... ... @@ -36,7 +36,7 @@ environment:
    36 36
       V: 1
    
    37 37
     
    
    38 38
     # And dont consider MAKEFLAGS or V as something which may
    
    39
    -# effect build output.
    
    39
    +# affect build output.
    
    40 40
     environment-nocache:
    
    41 41
     - MAKEFLAGS
    
    42 42
     - V

  • buildstream/plugins/elements/manual.yaml
    ... ... @@ -35,7 +35,7 @@ environment:
    35 35
       V: 1
    
    36 36
     
    
    37 37
     # And dont consider MAKEFLAGS or V as something which may
    
    38
    -# effect build output.
    
    38
    +# affect build output.
    
    39 39
     environment-nocache:
    
    40 40
     - MAKEFLAGS
    
    41 41
     - V

  • buildstream/plugins/elements/meson.yaml
    ... ... @@ -74,6 +74,6 @@ environment:
    74 74
         %{max-jobs}
    
    75 75
     
    
    76 76
     # And dont consider NINJAJOBS as something which may
    
    77
    -# effect build output.
    
    77
    +# affect build output.
    
    78 78
     environment-nocache:
    
    79 79
     - NINJAJOBS

  • buildstream/plugins/elements/qmake.yaml
    ... ... @@ -44,7 +44,7 @@ environment:
    44 44
       V: 1
    
    45 45
     
    
    46 46
     # And dont consider MAKEFLAGS or V as something which may
    
    47
    -# effect build output.
    
    47
    +# affect build output.
    
    48 48
     environment-nocache:
    
    49 49
     - MAKEFLAGS
    
    50 50
     - V

  • buildstream/plugins/sources/git.py
    ... ... @@ -89,7 +89,7 @@ import os
    89 89
     import errno
    
    90 90
     import re
    
    91 91
     import shutil
    
    92
    -from collections import Mapping
    
    92
    +from collections.abc import Mapping
    
    93 93
     from io import StringIO
    
    94 94
     
    
    95 95
     from configparser import RawConfigParser
    
    ... ... @@ -415,7 +415,7 @@ class GitSource(Source):
    415 415
         def get_unique_key(self):
    
    416 416
             # Here we want to encode the local name of the repository and
    
    417 417
             # the ref, if the user changes the alias to fetch the same sources
    
    418
    -        # from another location, it should not effect the cache key.
    
    418
    +        # from another location, it should not affect the cache key.
    
    419 419
             key = [self.original_url, self.mirror.ref]
    
    420 420
     
    
    421 421
             # Only modify the cache key with checkout_submodules if it's something
    

  • buildstream/source.py
    ... ... @@ -155,7 +155,7 @@ Class Reference
    155 155
     """
    
    156 156
     
    
    157 157
     import os
    
    158
    -from collections import Mapping
    
    158
    +from collections.abc import Mapping
    
    159 159
     from contextlib import contextmanager
    
    160 160
     
    
    161 161
     from . import Plugin, Consistency
    

  • tests/yaml/yaml.py
    1 1
     import os
    
    2 2
     import pytest
    
    3 3
     import tempfile
    
    4
    -from collections import Mapping
    
    4
    +from collections.abc import Mapping
    
    5 5
     
    
    6 6
     from buildstream import _yaml
    
    7 7
     from buildstream._exceptions import LoadError, LoadErrorReason
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]