-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare 1.3.0 #68
Merged
Prepare 1.3.0 #68
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Importing icalendar fails like this: ``` Traceback (most recent call last): File "yokadi/tests/tests.py", line 18, in <module> import icalendar # noqa: F401 File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/icalendar/__init__.py", line 1, in <module> from icalendar.cal import ( File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/icalendar/cal.py", line 9, in <module> from icalendar.parser import Contentline File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/icalendar/parser.py", line 371, in <module> from icalendar.prop import vText File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/icalendar/prop.py", line 151, in <module> class vBoolean(int): File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/icalendar/prop.py", line 154, in vBoolean BOOL_MAP = CaselessDict(true=True, false=False) File "/opt/hostedtoolcache/Python/3.8.15/x64/lib/python3.8/site-packages/icalendar/caselessdict.py", line 32, in __init__ for key, value in self.items(): RuntimeError: dictionary keys changed during iteration ```
Keep CI-specific code light.
Add GitHub action
Running the test suite would fail with: ``` ___________________________________________________________________________________ ERROR collecting yokadi/tests/tests.py ___________________________________________________________________________________ yokadi/tests/tests.py:17: in <module> import icalendar # noqa: F401 .venv/lib/python3.10/site-packages/icalendar/__init__.py:1: in <module> from icalendar.cal import ( .venv/lib/python3.10/site-packages/icalendar/cal.py:9: in <module> from icalendar.parser import Contentline .venv/lib/python3.10/site-packages/icalendar/parser.py:371: in <module> from icalendar.prop import vText .venv/lib/python3.10/site-packages/icalendar/prop.py:151: in <module> class vBoolean(int): .venv/lib/python3.10/site-packages/icalendar/prop.py:154: in vBoolean BOOL_MAP = CaselessDict(true=True, false=False) .venv/lib/python3.10/site-packages/icalendar/caselessdict.py:32: in __init__ for key, value in self.items(): E RuntimeError: dictionary keys changed during iteration ``` Bump icalendar to 3.7.
Session.merge() is useful to update an instance which is already in the session with a newly created instance, but we never do that. When we need the ID of a newly created instance, call Session.flush() instead. Changing this fixes issues with SQLAlchemy 2.0.
It makes DB calls, so better had tests before to help porting to SQLAlchemy 2.0.
When running tests like this: ``` SQLALCHEMY_WARN_20=1 \ python -W error::DeprecationWarning -m pytest yokadi/tests/tests.py ``` They pass without failing.
This is more readable and more compact than the existing `(k1, k2)` format.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@k1 @k2