From ee4bfd229191abe0e759215500159069e4946aac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@ericsson.com>
Date: Wed, 18 Sep 2024 11:50:09 +0200
Subject: [PATCH] fixed circular import

---
 .codeclimate.yml                              | 45 ---------
 .github/workflows/ci.yml                      | 96 -------------------
 .readthedocs.yaml                             | 10 --
 CHANGELOG.md                                  |  2 +-
 satella/__init__.py                           |  2 +-
 .../structures/dictionaries/cache_dict.py     |  8 +-
 6 files changed, 6 insertions(+), 157 deletions(-)
 delete mode 100644 .codeclimate.yml
 delete mode 100644 .github/workflows/ci.yml
 delete mode 100644 .readthedocs.yaml

diff --git a/.codeclimate.yml b/.codeclimate.yml
deleted file mode 100644
index 1cb06657..00000000
--- a/.codeclimate.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-plugins:
-  duplication:
-    enabled: true
-    config:
-      languages:
-        python:
-  pep8:
-    enabled: true
-  pylint:
-    enabled: true
-    checks:
-      missing-module-docstring:
-        enabled: false
-      missing-class-docstring:
-        enabled: false
-    missing-function-docstring:
-        enabled: false
-    global-statement:
-        enabled: false
-    invalid-name:
-        enabled: false
-    too-many-arguments:
-        enabled: false
-  radon:
-    enabled: true
-exclude_paths:
-  - tests/**
-  - docs/**
-ratings:
-  paths:
-    - satella/**
-checks:
-  argument-count:
-    config:
-      threshold: 15
-  method-complexity:
-    config:
-      threshold: 50
-  method-count:
-    config:
-      threshold: 85
-  file-lines:
-    enabled: true
-    config:
-      threshold: 700
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
deleted file mode 100644
index 8f496387..00000000
--- a/.github/workflows/ci.yml
+++ /dev/null
@@ -1,96 +0,0 @@
-name: CI
-run-name: ${{ github.actor }}
-on: [ push ]
-jobs:
-  tests:
-    runs-on: ubuntu-20.04
-    environment: Env1
-    strategy:
-      matrix:
-        python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ]
-    steps:
-      - uses: actions/checkout@main
-      - uses: actions/setup-python@main
-        with:
-          python-version: ${{ matrix.python-version }}
-          cache: pip
-      - name: Before the coverage
-        run: |
-          wget https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
-          chmod ugo+x test-reporter-latest-linux-amd64
-          ./test-reporter-latest-linux-amd64 before-build
-        env:
-          CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
-      - name: Install everything
-        run: |
-          sudo apt-get update
-          sudo apt-get install -y python3-setuptools python3-yaml
-          pip install -U pip setuptools wheel disttools packaging pyproject.toml
-      - name: Install tools
-        run: pip install ".[test,dev]"
-      - name: Test
-        run: pytest -n 8 -vv --cov=satella
-      - name: Submit the code coverage
-        run: |
-          coverage xml
-          ./test-reporter-latest-linux-amd64 after-build -t coverage.py
-          ./test-reporter-latest-linux-amd64 format-coverage -t coverage.py -o codeclimate.json
-          ./test-reporter-latest-linux-amd64 upload-coverage -i codeclimate.json
-        env:
-          CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
-  build-project:
-    runs-on: ubuntu-20.04
-    steps:
-      - uses: actions/checkout@main
-      - uses: actions/setup-python@main
-        name: Setup Python
-        with:
-          python-version: '3.8'
-          cache: 'pip'
-      - name: Update system
-        run: |
-          sudo apt-get update
-          sudo apt-get install -y python3-setuptools python3-yaml
-          pip install -U pip setuptools wheel disttools packaging build
-      - name: Alter Version
-        if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
-        run: |
-          echo -n '__version__ = "' > satella/__init__.py
-          echo -n  $TAG_NAME >> satella/__init__.py
-          echo '"' >> satella/__init__.py
-          cat satella/__init__.py
-        env:
-          TAG_NAME: ${{ github.ref_name }}
-      - name: Build
-        run: python -m build .
-      - name: Archive production artifacts
-        uses: actions/upload-artifact@main
-        with:
-          name: builds
-          path: |
-            dist
-  send-to-pypi:
-    runs-on: "ubuntu-20.04"
-    needs: [ "build-project", "tests" ]
-    if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
-    environment: Env1
-    steps:
-      - uses: actions/checkout@main
-      - uses: actions/setup-python@main
-        name: Setup Python
-        with:
-          python-version: '3.8'
-          cache: 'pip'
-      - name: Install Twine
-        run: pip install twine
-      - name: Download all builds artifacts
-        uses: actions/download-artifact@main
-        with:
-          name: builds
-      - name: Send over packages to PyPI
-        run: |
-          echo $PYPIRC_PASSWORD_DATA > ~/.pypirc
-          twine upload /home/runner/work/satella/satella/satella*.whl /home/runner/work/satella/satella/satella*.tar.gz
-        env:
-          PYPIRC_PASSWORD_DATA: ${{ secrets.PYPIRC_PASSWORD_DATA }}
-
diff --git a/.readthedocs.yaml b/.readthedocs.yaml
deleted file mode 100644
index 5ce3c4d7..00000000
--- a/.readthedocs.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-version: 2
-build:
-  os: ubuntu-22.04
-  tools:
-    python: "3.9"
-python:
-  install:
-    - psutil
-sphinx:
-  configuration: docs/conf.py
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4ed09000..d912699e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-# v.25.6.
+# v.25.a3
 
 * fixed circular import
 
diff --git a/satella/__init__.py b/satella/__init__.py
index 2d7ccb57..e4b1c621 100644
--- a/satella/__init__.py
+++ b/satella/__init__.py
@@ -1 +1 @@
-__version__ = '2.25.6a2'
+__version__ = '2.25.6a3'
diff --git a/satella/coding/structures/dictionaries/cache_dict.py b/satella/coding/structures/dictionaries/cache_dict.py
index a0267e83..e6ebb4f1 100644
--- a/satella/coding/structures/dictionaries/cache_dict.py
+++ b/satella/coding/structures/dictionaries/cache_dict.py
@@ -7,11 +7,11 @@ from satella.coding.decorators.decorators import short_none
 from satella.coding.recast_exceptions import silence_excs
 from satella.coding.structures.lru import LRU
 from satella.coding.typing import K, V, NoArgCallable
-from satella.time.parse import parse_time_string
 
 logger = logging.getLogger(__name__)
 
 
+
 class CacheDict(tp.Mapping[K, V]):
     """
     A dictionary that you can use as a cache.
@@ -90,8 +90,8 @@ class CacheDict(tp.Mapping[K, V]):
                  cache_failures_interval: tp.Optional[tp.Union[float, int, str]] = None,
                  time_getter: NoArgCallable[float] = time.monotonic,
                  default_value_factory: tp.Optional[NoArgCallable[V]] = None):
-        self.stale_interval = parse_time_string(stale_interval)
-        self.expiration_interval = parse_time_string(expiration_interval)
+        self.stale_interval = _parse_time_string(stale_interval)
+        self.expiration_interval = _parse_time_string(expiration_interval)
         assert self.stale_interval <= self.expiration_interval, 'Stale interval may not be larger ' \
                                                                 'than expiration interval!'
         self.default_value_factory = default_value_factory
@@ -103,7 +103,7 @@ class CacheDict(tp.Mapping[K, V]):
         self.timestamp_data = {}  # type: tp.Dict[K, float]
         self.cache_missed = set()  # type: tp.Set[K]
         self.cache_failures = cache_failures_interval is not None
-        self.cache_failures_interval = short_none(parse_time_string)(cache_failures_interval)
+        self.cache_failures_interval = short_none(_parse_time_string)(cache_failures_interval)
         self.time_getter = time_getter
 
     def get_value_block(self, key: K) -> V:
-- 
GitLab