From d1513fd657aa7dca3df4eb0ee6886c4c5860937f Mon Sep 17 00:00:00 2001 From: jaca Date: Sat, 30 Sep 2023 11:25:21 +0200 Subject: [PATCH 1/2] add deploy-github-release workflow --- .github/workflows/tests.yml | 17 +++++++++++++++++ CHANGES.rst | 4 +++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ec0ff31..6610fb9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -110,3 +110,20 @@ jobs: fi twine check dist/* twine upload dist/* + + deploy-github-release: + # only deploy on tags, see https://stackoverflow.com/a/58478262/1320237 + if: startsWith(github.ref, 'refs/tags/v') + needs: + - run-tests + runs-on: ubuntu-latest + environment: + name: github-release + steps: + - uses: actions/checkout@v2 + - name: create release + uses: elgohr/Github-Release-Action@v4 + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} + with: + title: ${{ github.ref_name }} diff --git a/CHANGES.rst b/CHANGES.rst index 7d0b6da..0c57ecd 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -16,7 +16,9 @@ Breaking changes: New features: -- ... +- icalendar releases are deployed to Github releases + Fixes: #563 + [jacadzaca] Bug fixes: From 759f98388a15943fa4dec444fb91adbf7a22b656 Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Mon, 9 Oct 2023 14:13:02 +0200 Subject: [PATCH 2/2] Add some __eq__ Needed as 088eea7 adds comparison of elements this makes sure that they are compared by value instead of by reference. --- CHANGES.rst | 2 ++ src/icalendar/prop.py | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 5d523cf..6fc2981 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -28,6 +28,8 @@ Bug fixes: [jacadzaca] - Use non legacy timezone name. Ref: #567 +- Add some compare functions. + Ref: #568 5.0.10 (unreleased) ------------------- diff --git a/src/icalendar/prop.py b/src/icalendar/prop.py index 83c9048..131567f 100644 --- a/src/icalendar/prop.py +++ b/src/icalendar/prop.py @@ -257,6 +257,11 @@ class vDDDLists: out.append(vDDDTypes.from_ical(ical_dt, timezone=timezone)) return out + def __eq__(self, other): + if not isinstance(other, vDDDLists): + return False + return self.dts == other.dts + class vCategory: @@ -865,6 +870,11 @@ class vUTCOffset: return -offset return offset + def __eq__(self, other): + if not isinstance(other, vUTCOffset): + return False + return self.td == other.td + class vInline(str): """This is an especially dumb class that just holds raw unparsed text and