Skip to content

Convert ANyUrl and HttpUrl to str#62

Merged
jamie-sgro merged 1 commit into
mainfrom
hotfix/fix-AnyUrl-incompatibility-for-pydantic-v2
Jan 9, 2026
Merged

Convert ANyUrl and HttpUrl to str#62
jamie-sgro merged 1 commit into
mainfrom
hotfix/fix-AnyUrl-incompatibility-for-pydantic-v2

Conversation

@EChebelyon

@EChebelyon EChebelyon commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

Description

Closes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Install from main and use the below JSON to get granules:
{
        "product_name": "MOD13A2",
        "product_version": "061",
        "iso3_code": "LBR",
        "start_date": "2025-07-01",
        "end_date": "2025-12-31",
        "data_dir": ".",
}
  • You will get an error AttributeError: 'AnyUrl' object has no attribute 'decode'
  • Now install from this branch and get the same granules, should work this time round.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Next Steps

  • Assign a reviewer based on the code owner document.

  • Once your review is approved, merge and delete the feature branch

On behalf of the Modis Tools Dev Team, thank you for your hard work! ✨

@jamie-sgro jamie-sgro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, this change makes sense. It was a mistake for us to use Path on a url to begin with. I've spoken about this previously here

@jamie-sgro jamie-sgro merged commit a6bd6a9 into main Jan 9, 2026
3 checks passed
@jamie-sgro jamie-sgro deleted the hotfix/fix-AnyUrl-incompatibility-for-pydantic-v2 branch January 9, 2026 09:49
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.

2 participants