Skip to content

fix: sync SDK with Etsy API spec — March 2026 release - #18

Merged
amitray007 merged 4 commits into
masterfrom
claude/audit-etsy-api-drift
Mar 30, 2026
Merged

fix: sync SDK with Etsy API spec — March 2026 release#18
amitray007 merged 4 commits into
masterfrom
claude/audit-etsy-api-drift

Conversation

@Claude

@Claude Claude AI commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • pytest -v — 235 tests pass
  • New tests verify is_safe=True passes through and is_safe=None is the default
  • python scripts/audit_sdk.py confirms no remaining parameter drift

🤖 Generated with Claude Code

@Claude Claude AI linked an issue Mar 30, 2026 that may be closed by this pull request
@Claude Claude AI changed the title [WIP] Audit Etsy API drift for updated endpoints and code issues fix: Add is_safe parameter and resolve implicit string concatenation in warnings Mar 30, 2026
@Claude
Claude AI requested a review from amitray007 March 30, 2026 10:50
@amitray007
amitray007 requested a review from Copilot March 30, 2026 12:41
@github-actions

github-actions Bot commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

Test Coverage Report

Overall: 93% (1533/1643 statements covered)

Coverage by file
File Statements Missing Coverage
etsy_python/v3/auth/OAuth.py 33 33 0%
etsy_python/v3/auth/__init__.py 1 1 0%
etsy_python/v3/enums/Language.py 12 12 0%
etsy_python/v3/enums/ListingInventory.py 3 3 0%
etsy_python/v3/models/ProcessingProfile.py 21 10 52%
etsy_python/v3/models/ShopReturnPolicy.py 25 11 56%
etsy_python/v3/resources/ProcessingProfile.py 26 11 58%
etsy_python/v3/models/HolidayPreferences.py 8 2 75%
etsy_python/v3/models/Miscellaneous.py 8 2 75%
etsy_python/v3/common/Utils.py 31 4 87%
etsy_python/v3/exceptions/RequestException.py 8 1 88%
etsy_python/v3/resources/Response.py 9 1 89%
etsy_python/v3/exceptions/BaseAPIException.py 10 1 90%
etsy_python/v3/models/Request.py 22 2 91%
etsy_python/v3/resources/Listing.py 81 6 93%
etsy_python/v3/models/Listing.py 148 9 94%
etsy_python/v3/resources/Session.py 94 1 99%
etsy_python/__init__.py 2 0 100%
etsy_python/_version.py 1 0 100%
etsy_python/v3/common/Env.py 10 0 100%
etsy_python/v3/common/Request.py 3 0 100%
etsy_python/v3/enums/HolidayPreferences.py 29 0 100%
etsy_python/v3/enums/Listing.py 77 0 100%
etsy_python/v3/enums/ProcessingProfile.py 7 0 100%
etsy_python/v3/enums/ShippingProfile.py 261 0 100%
etsy_python/v3/enums/ShopReceipt.py 12 0 100%
etsy_python/v3/exceptions/__init__.py 2 0 100%
etsy_python/v3/models/FileRequest.py 7 0 100%
etsy_python/v3/models/Product.py 7 0 100%
etsy_python/v3/models/Receipt.py 18 0 100%
etsy_python/v3/models/ShippingProfile.py 85 0 100%
etsy_python/v3/models/Shop.py 24 0 100%
etsy_python/v3/models/Utils.py 19 0 100%
etsy_python/v3/models/__init__.py 10 0 100%
etsy_python/v3/resources/HolidayPreferences.py 19 0 100%
etsy_python/v3/resources/ListingFile.py 22 0 100%
etsy_python/v3/resources/ListingImage.py 22 0 100%
etsy_python/v3/resources/ListingInventory.py 18 0 100%
etsy_python/v3/resources/ListingOffering.py 12 0 100%
etsy_python/v3/resources/ListingProduct.py 12 0 100%
etsy_python/v3/resources/ListingTranslation.py 19 0 100%
etsy_python/v3/resources/ListingVariationImages.py 16 0 100%
etsy_python/v3/resources/ListingVideo.py 22 0 100%
etsy_python/v3/resources/Miscellaneous.py 16 0 100%
etsy_python/v3/resources/Payment.py 23 0 100%
etsy_python/v3/resources/PaymentLedgerEntry.py 15 0 100%
etsy_python/v3/resources/Receipt.py 25 0 100%
etsy_python/v3/resources/ReceiptTransactions.py 27 0 100%
etsy_python/v3/resources/Review.py 16 0 100%
etsy_python/v3/resources/ShippingProfile.py 58 0 100%
etsy_python/v3/resources/Shop.py 23 0 100%
etsy_python/v3/resources/ShopProductionPartner.py 11 0 100%
etsy_python/v3/resources/ShopReturnPolicy.py 28 0 100%
etsy_python/v3/resources/ShopSection.py 25 0 100%
etsy_python/v3/resources/Taxonomy.py 23 0 100%
etsy_python/v3/resources/User.py 14 0 100%
etsy_python/v3/resources/UserAddress.py 19 0 100%
etsy_python/v3/resources/__init__.py 29 0 100%
etsy_python/v3/resources/enums/RateLimit.py 8 0 100%
etsy_python/v3/resources/enums/Request.py 7 0 100%

Updated by PR Tests

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Etsy v3 Python client to align with the latest OAS spec by adding the is_safe query parameter to the active listings search endpoint, and adjusts several deprecation warnings to use the repository’s preferred parenthesized multi-line string formatting.

Changes:

  • Add is_safe: Optional[bool] = None to ListingResource.find_all_listings_active() and include it in the request query params.
  • Update multi-line warnings.warn() messages to use explicit parenthesized string grouping.
  • Add tests covering is_safe=True pass-through and the default None behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/test_listing_resource.py Adds unit tests validating is_safe query param behavior.
etsy_python/v3/resources/Listing.py Adds is_safe optional parameter and forwards it into query params for /listings/active.
etsy_python/v3/resources/Payment.py Updates deprecated method warning string formatting.
etsy_python/v3/resources/ShippingProfile.py Updates deprecated method warning string formatting.
etsy_python/v3/models/Listing.py Updates deprecation warning string formatting in request models.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Revert cosmetic parenthesization of multi-line strings in warnings.warn()
  calls — implicit string concatenation inside function calls is standard
  Python and doesn't need wrapping
- Update specs/baseline.json to 2026-03-24 spec
- Update specs/last-release-check.json to track latest release

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@amitray007 amitray007 changed the title fix: Add is_safe parameter and resolve implicit string concatenation in warnings fix: sync SDK with Etsy API spec — March 2026 release Mar 30, 2026
@amitray007
amitray007 marked this pull request as ready for review March 30, 2026 12:56
Bumps [requests](https://github.com/psf/requests) from 2.32.4 to 2.33.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](psf/requests@v2.32.4...v2.33.0)

---
updated-dependencies:
- dependency-name: requests
  dependency-version: 2.33.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@amitray007
amitray007 merged commit 0fdb634 into master Mar 30, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

audit: Spec Drift [2026-03-30] — medium

3 participants