Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
516 commits
Select commit Hold shift + click to select a range
d5d386f
chore: add IANA timezone alias added in 2022.2
ecederstrand Aug 19, 2022
7533ac6
Update protocol.py (#1110)
jpays Aug 22, 2022
18dcaef
fix: support fromisoformat() on EWSDateTime. Fixes #1114
ecederstrand Aug 29, 2022
05b7edf
ci: split EWS* tests into one test class per EWS* class
ecederstrand Aug 29, 2022
6733a5b
fix: explicitly insert client ID in request, to support older version…
ecederstrand Sep 12, 2022
3b400de
Document creating Contacts with indexed property fields
ecederstrand Sep 26, 2022
9471506
ci: Move inherently flaky timezone test cases under integration testi…
ecederstrand Sep 28, 2022
f3052bd
chore: implement suggestions from refurb. Mainly using suppress() con…
ecederstrand Sep 28, 2022
cee88df
Support delegate access with OAuth (#1121)
ecederstrand Oct 3, 2022
737c912
docs: regenerate. Remove suppress from __del__ where the function may…
ecederstrand Oct 4, 2022
fc230f6
Bump version
ecederstrand Oct 4, 2022
c32374e
docs: Spelling check run
ecederstrand Oct 7, 2022
4b90050
ci: split up large test cases. Make extended prop register and deregi…
ecederstrand Oct 7, 2022
b18bcd5
chore: Create a base class for OAuth credentials classes. This makes …
ecederstrand Oct 10, 2022
5a649af
chore: migrate file handling code to pathlib (#1129)
ecederstrand Oct 11, 2022
6d4930a
Refurb suggestions (#1130)
ecederstrand Oct 11, 2022
8efeb6d
ci: Python 3.11 is out
ecederstrand Oct 25, 2022
6044fb1
chore: align mixin class spelling
ecederstrand Nov 7, 2022
aa96d5a
chore: extract supported/deprecated functions into common mixin classes
ecederstrand Nov 7, 2022
73f1869
chore: Add a new exception type to retry on
ecederstrand Nov 7, 2022
e0019f8
chore: Replace ResolveNames with the more lightweight ConvertId for v…
ecederstrand Nov 7, 2022
2dc473b
Add GitHub Dependency Review
ecederstrand Nov 9, 2022
9f255c5
Add CodeQL Scanning
ecederstrand Nov 9, 2022
92c9355
Bump actions versions
ecederstrand Nov 9, 2022
d71ec02
chore: Update regexp and point to solution used
ecederstrand Nov 9, 2022
3a4a53c
ci: Only run when Python files are committed
ecederstrand Nov 9, 2022
59ecfbb
ci: Only test oldest and newest supported Python versions, to reduce …
ecederstrand Nov 9, 2022
56211a0
ci: Python 12-dev is now available
ecederstrand Nov 9, 2022
34154fc
chore: Also replace ResolveNames with ConvertId for auth type guessing.
ecederstrand Nov 10, 2022
9ba7cc1
chore: Make wrap() a method on EWSService, to allow overriding
ecederstrand Nov 10, 2022
2d02ff1
chore: Push paging parameters to the paging service
ecederstrand Nov 13, 2022
845798e
chore: Move API hints out of base class
ecederstrand Nov 14, 2022
358081c
chore: Remove unused allow_redirects option to post_ratelimited()
ecederstrand Nov 14, 2022
8eb0760
fix: shelve does not handle pathlib objects
ecederstrand Nov 17, 2022
c427d9c
chore: clean up Version implementation. Only implement version guessi…
ecederstrand Nov 17, 2022
df58655
chore: remove unused expected_prefix arg. Support SOAP exceptions wit…
ecederstrand Nov 17, 2022
f4e20f0
chore: minor fixes
ecederstrand Nov 21, 2022
24148ae
chore: Move dummy_xml() to Protocol
ecederstrand Nov 21, 2022
ed7d3a2
ci: Fix and re-enable autodiscover tests. They now work with OAuth
ecederstrand Nov 21, 2022
c153910
chore: Rename test file
ecederstrand Nov 21, 2022
eaad12c
chore: simplify rendering of Identity
ecederstrand Nov 22, 2022
8bf43b0
chore: Add X-AnchorMailbox for OAuth even if we don't have the account
ecederstrand Nov 22, 2022
741c462
chore: Support Exchange2015 API version. Fix __str__
ecederstrand Nov 22, 2022
3270fea
feat: Add support for SOAP-based autodiscovery. Refs #1089
ecederstrand Nov 23, 2022
1bb0e9c
Re-generate docs
ecederstrand Nov 23, 2022
af8ca8a
Bump version
ecederstrand Nov 23, 2022
85e2b15
ci: Update secrets file
ecederstrand Nov 23, 2022
48a0e79
feat: Remove POX autodiscovery support
ecederstrand Nov 23, 2022
3bd256f
ci: Mock out token refresh HTTP calls
ecederstrand Nov 23, 2022
e1c75ae
ci: Fix assert in credentials access_token setter
ecederstrand Nov 23, 2022
0edcae0
ci: mock oauth token method for two remaining tests
ecederstrand Nov 23, 2022
2b1e039
chore: remove dead code and improve test coverage
ecederstrand Nov 24, 2022
50153c0
ci: add coverage of a failure case
ecederstrand Nov 24, 2022
9891174
fix: properly handle exceptions that we want to retry
ecederstrand Nov 24, 2022
1ee86e4
chore: Move actual HTTP request retries out of post_ratelimited() so …
ecederstrand Nov 30, 2022
e7d7d84
fix: Support updating the Folder.permission_set field. Closes #1145
ecederstrand Nov 30, 2022
419eafc
chore: Add timezone in latest tzdata release
ecederstrand Dec 1, 2022
05b7fde
fix: Return the ID that send() returns back to the caller
ecederstrand Dec 2, 2022
642a3b8
added option to change from_address when creating reply (#1167)
tamasbakos Mar 1, 2023
0887fdb
ci: Catch up with timezone updates
ecederstrand Mar 1, 2023
4161079
ci: Support newer Pygments
ecederstrand Mar 1, 2023
32992f0
fix: Make subfolders lock an instance variable. Fixes #1161
ecederstrand Mar 2, 2023
fcd5b49
fix: get_xml_attr() may return None. Fixes #1178
ecederstrand Mar 28, 2023
f7fe630
fix: Take folder_class into account when guessing folder type by fold…
ecederstrand Mar 29, 2023
6be4f56
chore: Let send_and_save() return whatever upstream returns.
ecederstrand Mar 29, 2023
be1cfee
docs: Re-generate docs
ecederstrand Mar 29, 2023
fa8a519
Bump version
ecederstrand Mar 29, 2023
32b435c
fix: Build package from fresh build folder. Fixes #1181
ecederstrand Mar 31, 2023
7a736df
chore: Simplify logic
ecederstrand Apr 13, 2023
8cfa12d
fix: support folder guessing also for folders that don't define a CON…
ecederstrand Apr 13, 2023
dc79362
chore: regenerate docs
ecederstrand Apr 13, 2023
9fadf77
Bump version
ecederstrand Apr 13, 2023
8f6ced5
docs: clean up more
ecederstrand Apr 13, 2023
23f10d5
fix: Let autodiscover survive not finding an auth type for the server…
ecederstrand May 4, 2023
f1f3dbe
fix: Remove UniqueBody from Contact, Task and Persona classes. O365 t…
ecederstrand May 4, 2023
3685ff8
fix: Fix places where we didn't respect the folder or item type when …
ecederstrand May 4, 2023
d2815e6
chore: Add 'Asia/Hanoi' to satisfy test on GitHub
ecederstrand May 4, 2023
cb3622d
docs: Rebuild docs
ecederstrand May 11, 2023
ee65628
Bump version
ecederstrand May 11, 2023
7bc8159
docs: Add documentation on creating an app in Azure with delegate per…
ecederstrand May 22, 2023
3354411
docs: Fix filename
ecederstrand May 22, 2023
8d67eb2
docs: Fix spelling
ecederstrand May 22, 2023
9c9d6ed
docs: filenames were swapped
ecederstrand May 22, 2023
37d5911
chore: Improve test coverage a bit
ecederstrand May 22, 2023
c752e18
docs: Document MSAL with interactive login to O365
ecederstrand May 23, 2023
d3780f6
fix: Don't restrict OAuth2 Credentials classes unnecessarily in their…
ecederstrand May 23, 2023
f527172
chore: reuse more code between GetUserSettings and UserResponse classes
ecederstrand May 23, 2023
24d507c
chore: add better test coverate of public folders root
ecederstrand May 23, 2023
3153d18
chore: Implement some suggestions by DeepSource
ecederstrand May 23, 2023
2851c3d
chore: Improve test coverage
ecederstrand May 23, 2023
7e72dfa
chore: Improve test coverage
ecederstrand May 23, 2023
55e1999
ci: Emergency fix fo test soute
ecederstrand May 23, 2023
4209eb1
fix: Make div folder navigation case insensitive. Fixes #1206
ecederstrand Jun 14, 2023
fc648d1
fix: Exchange 2019 apparently uses Exchange2016 as version header val…
ecederstrand Jun 20, 2023
a858cf6
doc: Small fixes
Jun 22, 2023
2115c62
docs: Minor fixes
ecederstrand Jun 22, 2023
3273cc0
chore: Better logic for whether we should delete subfolders
ecederstrand Jul 22, 2023
54dde60
chore: better wording
ecederstrand Jul 22, 2023
357a0b2
chore: Don't need a real EWS ID here
ecederstrand Jul 22, 2023
9d45d79
fix: Replare is_distinguished in favor of _distinguished_id Folder at…
ecederstrand Jul 22, 2023
fcc6296
chore: fix CI pipeline after unittest-parallel version bump
ecederstrand Jul 22, 2023
254feb3
docs: Add blackening of code snippets in markdown
ecederstrand Jul 22, 2023
17a846d
docs: Blacken code snippets
ecederstrand Jul 22, 2023
9eccab0
chore: Python 3.7 is now EOL
ecederstrand Jul 23, 2023
7428a34
fix: Handle invalid XML also in streaming XML parser. Fixes #1200
ecederstrand Jul 23, 2023
0027d66
fix: Support expatreader in at least Python 3.8
ecederstrand Jul 23, 2023
909cab4
fix: Add workaround for weird, undocumented Booking items. Refs #877
ecederstrand Aug 17, 2023
ae4f77a
fix: Support globbing with a glob pattern that's more than 2 levels d…
ecederstrand Aug 20, 2023
336d3a6
ci: Attempt to make item update tests more stable
ecederstrand Aug 20, 2023
6f4e63c
ci: Use Long instead of Integer, to avoid overflow. Refs #171
ecederstrand Aug 20, 2023
6145018
ci: Only use bulk_update when strictly required
ecederstrand Aug 20, 2023
3e15e50
ci: Move all bulk tests to test_bulk.py
ecederstrand Aug 20, 2023
191d483
Revert "ci: Attempt to make item update tests more stable"
ecederstrand Aug 20, 2023
6e03d05
ci: New attempt at letting tests survive random ErrorIrresolvableConf…
ecederstrand Aug 21, 2023
454f431
ci: Add fix for cancel() as well
ecederstrand Aug 21, 2023
63a70df
fix: Fix shared-folder queysets based on DistinguishedFolderId. Refs …
ecederstrand Aug 21, 2023
66ee68f
fix: Add one more DNS exception type
ecederstrand Aug 21, 2023
12dbdfa
docs: Update docs
ecederstrand Aug 22, 2023
490f734
Bump version
ecederstrand Aug 22, 2023
5a92b57
fix: Add new folder type uncovered by tests
ecederstrand Aug 23, 2023
b2eeb1b
fix: Add new folder to folder_cls_from_container_class, missed in pre…
ecederstrand Aug 23, 2023
a8c2779
Merge remote-tracking branch 'origin/master'
Aug 24, 2023
4abaaaa
Update index.md (#1217)
claell Aug 25, 2023
22af5ee
docs: Improve warning text to suggest how to fix the issue. While her…
ecederstrand Aug 26, 2023
0a0c0f4
fix: Remove duplicate recipient in reply when author and recipient is…
ecederstrand Aug 28, 2023
b6d9e82
ci: Make get_test_item(folder=None) work as intended
ecederstrand Aug 28, 2023
5937a48
Merge remote-tracking branch 'origin/master'
Aug 30, 2023
d3bd51a
chore: improve error message on invalid setting names for GetUserSett…
Sep 5, 2023
22f3201
extended Attendee class - added ProposedStart and ProposedEnd (#1236)
ekulakov-express Oct 6, 2023
6a8289a
Python 3.12 is now available
ecederstrand Oct 10, 2023
71d9871
docs: Add links to *SubscriptionRequest elements (#1245)
ecederstrand Oct 31, 2023
e054388
Add SubscribeToAllFolders support to subscriptions (#1244)
ecederstrand Oct 31, 2023
29b1142
docs: Expand subscription documentation after #1244 (#1247)
ecederstrand Oct 31, 2023
b6e4b1c
Bump requests requirement due to CVE-2023-32681 (#1246)
ecederstrand Oct 31, 2023
c11e794
chore: Switch to pyproject.toml
Dec 12, 2023
7bf720d
ci: setup.py no longer exists
Dec 12, 2023
f5c454a
test: Update timezone tests to newst timezone releases
ecederstrand Mar 3, 2024
1ba43a8
test: Disable autodiscover test that's throwing a server error
ecederstrand Mar 3, 2024
3ee351a
fix: re-add explicit mailbox to distinguised folders. Needed in deleg…
ecederstrand Mar 3, 2024
c233fa2
Merge from master
ecederstrand Mar 3, 2024
7401f51
Feature: 🚀 Add InboxRule implement (#1272)
a76yyyy Mar 3, 2024
568dc45
fix: Allow setting max_connections from config when in autodiscover mode
ecederstrand Mar 7, 2024
985e130
chore: Update generated docs
ecederstrand Mar 8, 2024
014f36e
Bump version
ecederstrand Mar 8, 2024
7b93cc7
chore: ask for and use DistinguishedFolderId directly. Fixes #1278
ecederstrand Mar 17, 2024
a3db309
docs: Remove repeated sentence
ecederstrand Mar 17, 2024
04d8cb4
test: Refresh client_id of test account
ecederstrand Mar 17, 2024
140b883
chore: Clean up known folders, add more distinguished folders, and im…
ecederstrand Mar 18, 2024
f0c661c
fix: ApplicationData is not deletable but throws a different error
ecederstrand Mar 18, 2024
1fa4a05
test: add ome more possible exception
ecederstrand Mar 18, 2024
6020866
test: update to latest actions
ecederstrand Mar 18, 2024
bab137a
fix: get() should never return an exception instance
ecederstrand Mar 18, 2024
72df4ee
fix: fix and test more inbox rule actions. Fixes #1280 #1283
ecederstrand Mar 26, 2024
8c07041
chore: just pass account here. We weren't using root anyway
ecederstrand Mar 26, 2024
dd5f9a4
chore: I can't find any indication that 2007 was not supported
ecederstrand Mar 26, 2024
a39ed40
feat: add a more intuitive API for inbox rules
ecederstrand Mar 26, 2024
b47983a
feat: Simplify move/copy to folder inbox rul action creation
ecederstrand Mar 26, 2024
32bc90a
fix: Support deleting disabled rules. Simplify delete_rule() by requi…
ecederstrand Mar 26, 2024
d2fbf1d
chore: Alicn and clean up from_xml() subclassing
ecederstrand Mar 26, 2024
7afd889
fix: Catch and return all exceptions that _folders_map() expects to h…
Apr 4, 2024
6f6515b
Bump version
ecederstrand Apr 11, 2024
ff43417
docs: Update docs
ecederstrand Apr 11, 2024
cc45183
fix: improve error messages for inbox rule validation errors
ecederstrand Apr 11, 2024
17bc8d6
chore: deduplicate code
ecederstrand Apr 11, 2024
f65079f
fix: Require folders requested via a service to define its root. Refs…
ecederstrand Apr 16, 2024
56270b9
fix: no need for a setter. Consequences of switching root are not han…
ecederstrand Apr 23, 2024
d9035d0
fix: Ensure that all other distinguished folders than PublicFoldersRo…
ecederstrand Apr 23, 2024
661b809
chore: Move common code up
ecederstrand Apr 23, 2024
6330c4c
chore: label is directly settable
ecederstrand Apr 23, 2024
54390d0
feat: make Contact.im_addresses writable
ecederstrand Apr 23, 2024
5144b88
chore: Simplify code
Apr 24, 2024
f8ea801
docs: Add section on pre-commit hooks
Apr 24, 2024
a2922f0
Fix syntax
Apr 24, 2024
864b7c8
fix: That clean() only works for single-field indexed fields
Apr 24, 2024
e212218
chore: blacken
Apr 24, 2024
7b74fcf
Bump version
ecederstrand Apr 25, 2024
1371649
docs: Update docs
ecederstrand Apr 25, 2024
6ed6617
fix: allow deleting even though the rule is not valid. Refs #1305
May 2, 2024
be0cd9f
Mark some distinguished folders with supported_from based on feedback…
May 8, 2024
ae3bff0
Add two more folders that have appeared on test account
May 13, 2024
1de9757
Only request DistinguishedFolderId on servers that support that field…
May 13, 2024
138697e
These are actually distinguished folders.
May 13, 2024
1e77961
Only allow values on the DistinguishedFolderId field if we recognize …
May 13, 2024
f9fde28
chore: Sort __all_ entries
ecederstrand May 13, 2024
3fc7890
fix: These folders aren't distinguished even though the response XML …
ecederstrand May 13, 2024
fbb8c45
chore: Sort classes in the known_folders module
ecederstrand May 13, 2024
17ea29a
fix: move _distinguished_id wiping into the from_xml_with_root method…
ecederstrand May 13, 2024
c33040c
test: Assert that we get the expected master ID after refreshing
ecederstrand May 13, 2024
d971534
ci: 3.13-dev is available for testing
May 13, 2024
cc6e276
docs: fix code brackets
May 14, 2024
e3d544c
feat: Add the 'msal' install flavor
May 14, 2024
54ba36c
feat: Add O365 MSAL auth helper to reduce boilerplate
May 14, 2024
39df56a
Bump version
ecederstrand May 14, 2024
73d3167
docs: Update docs
ecederstrand May 14, 2024
5da9b0b
feat: Attempt to fetch all user settings when autodiscovering
May 17, 2024
61a97d2
test: test server has a new folder type
May 17, 2024
c74b153
chore: improve dev docs
May 17, 2024
8559eb9
chore: Fix some Deepsource suggestions
May 17, 2024
0b7962b
test: Reuse global retry strategy for autodiscover tests
May 17, 2024
cf2a77d
ci: One more package needs to be installed from source on Python dev
May 29, 2024
bc988fa
docs: fix typos
ecederstrand Jun 5, 2024
2831454
fix: Use a class name that matches the distinguished name
ecederstrand Jun 5, 2024
c310c65
fix: Don't request new distinguished folders on older Exchange versio…
ecederstrand Jun 5, 2024
3c13440
Change the 'parent' attribute of direct public subfolders (#1316)
ecederstrand Jun 9, 2024
e86f915
Bump version
Jun 10, 2024
5fa602e
docs: Update docs
Jun 10, 2024
7350d3d
Fixes error thrown when using NoVerifyHTTPAdapter with requests 2.32.…
jamaalscarlett Jul 11, 2024
9462ad2
fix: Give GetUserAvailability enough info to parse datetimes as tz-aw…
Jul 11, 2024
6bdddeb
Bump version
ecederstrand Jul 12, 2024
07e189c
docs: Update docs
ecederstrand Jul 12, 2024
73a3b94
ci: Remove arvhived location of python-cffi
ecederstrand Jul 12, 2024
e8a811d
docs: Fix example code for shared folder access. Fixes #1325
Jul 29, 2024
88d04bf
chore: Bring in timezone updates
Sep 2, 2024
4317e4b
Don't override a custom mailbox. Fixes #1325
Sep 2, 2024
2a4f294
Bump version
ecederstrand Sep 5, 2024
4abf34c
docs: Update docs
ecederstrand Sep 5, 2024
c1fba89
'Asia/Choibalsan' is no longer in CLDR
Oct 4, 2024
b4ce187
Some servers only accept UTC timestamps. Refs #1323
Oct 4, 2024
573f6b7
Add data copyright information (#1337)
stefan6419846 Oct 22, 2024
3b2b02c
Drop support for Python 3.8
Oct 28, 2024
243a7cf
Bump version
ecederstrand Oct 28, 2024
44a020e
Update docs
ecederstrand Oct 28, 2024
3da439b
chore: Bump git commit hook versions
ecederstrand Oct 28, 2024
5bc53bd
test: Ensure that recurrence updates are reflected
ecederstrand Nov 2, 2024
7da64d7
test: remove debug prints
ecederstrand Nov 4, 2024
b63353d
chore: This is also an indication of an expired token. Refs #1345
ecederstrand Dec 20, 2024
cac0e46
chore: Compress
ecederstrand Jan 20, 2025
575dded
fix: Support date strings with UTC timezone info. Closes #1351
ecederstrand Jan 20, 2025
999a930
test: Skip archive tests when the server throws an ErrorInternalServe…
ecederstrand Jan 21, 2025
fd6cee6
test: Improve coverage of AQS querystring filtering
ecederstrand Jan 21, 2025
7a00a2b
fix: Support extra attributes of QueryString
ecederstrand Jan 21, 2025
bc8e9c1
test: fix type
ecederstrand Jan 21, 2025
f2c12db
test: test AQS query result caching
ecederstrand Jan 21, 2025
3a07502
fix: This field is required on update if routing type is MAPIPDL. Fix…
ecederstrand Feb 24, 2025
6bd5298
fix: Allow lazy resolving of Account.version
ecederstrand Feb 24, 2025
ab27e5a
chore: fixes from newer package versions
ecederstrand Feb 24, 2025
93ae1b6
Bump version
ecederstrand Mar 14, 2025
139debc
docs: Regenerate docs
ecederstrand Mar 14, 2025
7ef7606
Fix DateRange, SizeRange, FromAddresses and SentToAddresses reference…
cduarte-ta Mar 19, 2025
1c8cd45
chore: Only set auth_type and retry_policy if one was supplied
ecederstrand Mar 31, 2025
562b0a0
chore: These internal field values are always created from scratch in…
ecederstrand Mar 31, 2025
4f5be81
fix: Support non-Microsoft implementations of the EWS API with non-st…
ecederstrand Mar 31, 2025
7ca668d
test: Update for newer zoneinfo package
ecederstrand Mar 31, 2025
d3036d6
Revert "chore: These internal field values are always created from sc…
ecederstrand Mar 31, 2025
842e77e
docs: Remove deprecated usage of backports in docs
ecederstrand Jun 11, 2025
4145f14
chore: Fix timezone tests
ecederstrand Jun 11, 2025
54fa301
docs: Fix link
ecederstrand Jul 2, 2025
d8394de
Don't retry TLS errors when attempting to get the service auth type (…
pR0Ps Aug 19, 2025
d407561
chore: Add two more gropus that CI pipeline failed on
ecederstrand Aug 19, 2025
f1b2e97
test: Fix grouping test
Sep 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[flake8]
ignore = E203, W503
max-line-length = 120
exclude = .git,__pycache__,vendor
74 changes: 74 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
schedule:
- cron: '35 7 * * 1'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
20 changes: 20 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v4
38 changes: 22 additions & 16 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ jobs:
needs: pre_job
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, 3.10-dev]
python-version: ['3.9', '3.13']
include:
# Allow failure on Python dev - e.g. Cython install regularly fails
- python-version: 3.10-dev
# Allow failure on Python dev - e.g. Cython install regularly fails
- python-version: "3.14-dev"
allowed_failure: true
max-parallel: 1

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -50,21 +50,21 @@ jobs:
# Only repo owners have access to the secret. PRs will run only the unit tests
if: env.AES_256_CBC_PASS != ''
run: |
openssl aes-256-cbc -d -in settings.yml.ghenc -out settings.yml -pass env:AES_256_CBC_PASS
openssl aes-256-cbc -d -md sha256 -in settings.yml.ghenc -out settings.yml -pass env:AES_256_CBC_PASS

- name: Upgrade pip
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pip wheel

- name: Install cutting-edge Cython-based packages on Python dev versions
continue-on-error: ${{ matrix.allowed_failure || false }}
if: matrix.python-version == '3.10-dev'
if: matrix.python-version == '3.14-dev'
run: |
sudo apt-get install libxml2-dev libxslt1-dev
python -m pip install hg+https://foss.heptapod.net/pypy/cffi
python -m pip install git+https://github.com/cython/cython.git
python -m pip install git+https://github.com/lxml/lxml.git
python -m pip install git+https://github.com/yaml/pyyaml.git
python -m pip install git+https://github.com/python-cffi/cffi.git

- name: Install dependencies
continue-on-error: ${{ matrix.allowed_failure || false }}
Expand All @@ -77,7 +77,11 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
unittest-parallel -j 4 --class-fixtures --coverage --coverage-source exchangelib
black --check --diff exchangelib tests scripts
isort --check --diff exchangelib tests scripts
flake8 exchangelib tests scripts
blacken-docs *.md docs/*.md
unittest-parallel -j 4 --level=class --coverage --coverage-source exchangelib
coveralls --service=github

cleanup:
Expand All @@ -87,24 +91,26 @@ jobs:
if: ${{ always() }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.13'

- name: Unencrypt secret file
env:
AES_256_CBC_PASS: ${{ secrets.AES_256_CBC_PASS }}
# Only repo owners have access to the secret. PRs will run only the unit tests
# Only repo owners have access to the secret. PRs will run only the unit tests.
# The encrypted file was created as:
# openssl aes-256-cbc -e -md sha256 -in settings.yml -out settings.yml.ghenc
if: env.AES_256_CBC_PASS != ''
run: |
openssl aes-256-cbc -d -in settings.yml.ghenc -out settings.yml -pass env:AES_256_CBC_PASS
openssl aes-256-cbc -d -md sha256 -in settings.yml.ghenc -out settings.yml -pass env:AES_256_CBC_PASS

- name: Upgrade pip
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pip wheel

- name: Install dependencies
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
build
dist
__pycache__
venv

settings.yml
scratch*.py
42 changes: 42 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.6.0
hooks:
- id: conventional-pre-commit
stages: [ commit-msg ]
args: [ ] # optional: list of Conventional Commits types to allow
- repo: local
hooks:
- id: black
name: black
stages: [ pre-commit ]
entry: black --check --diff
language: system
types: [ python ]
- id: isort
name: isort
stages: [ pre-commit ]
entry: isort --check --diff
types: [ python ]
language: system
- id: flake8
name: flake8
stages: [ pre-commit ]
entry: flake8
types: [ python ]
language: system
- id: blacken-docs
name: blacken-docs
stages: [ pre-commit ]
entry: blacken-docs
types: [ markdown ]
language: system
Loading