Skip to content

refactor: use pycountry for country list - #12009

Merged
jennifer-richards merged 3 commits into
ietf-tools:mainfrom
jennifer-richards:countries
Dec 3, 2026
Merged

jennifer-richards merged 3 commits into
ietf-tools:mainfrom
jennifer-richards:countries

Conversation

@jennifer-richards

Copy link
Copy Markdown
Member

This is aimed at moving toward Django 5.2. Eliminates one use of pytz, using pycountry as a data source. That package is a repackaging of the iso country database and, while not exactly equivalent to pytz's data, contains all the countries needed by existing meetings or likely to be needed in the future.

This adds a migration to update the field's choices list. Once we're on Django 5.2, we can refactor to avoid having to migrate every time the country data change.

This is intentionally a narrow patch. We may want to do a more ambitious rework of how country data are handled, including the CountryAlias table (eg), but that should not hold up this work.

Eliminates one use of pytz
@jennifer-richards
jennifer-richards marked this pull request as draft November 6, 2026 20:52
@jennifer-richards

Copy link
Copy Markdown
Member Author

Moving this to draft because it does not need to come in until after IETF-127

@codecov

codecov Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.28%. Comparing base (70a3417) to head (345d92a).
⚠️ Report is 34 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12009      +/-   ##
==========================================
+ Coverage   89.27%   89.28%   +0.01%     
==========================================
  Files         343      343              
  Lines       46813    46808       -5     
==========================================
+ Hits        41790    41791       +1     
+ Misses       5023     5017       -6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jennifer-richards
jennifer-richards marked this pull request as ready for review December 3, 2026 18:11
@jennifer-richards
jennifer-richards merged commit fb0dd93 into ietf-tools:main Dec 3, 2026
2 checks passed
@jennifer-richards
jennifer-richards deleted the countries branch December 3, 2026 21:30
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