Skip to content

feat(pt_BR): Improve internet provider data and logic#2304

Merged
fcurella merged 1 commit intojoke2k:masterfrom
MorganaSilva:feat/master/update-pt-br-internet
Feb 6, 2026
Merged

feat(pt_BR): Improve internet provider data and logic#2304
fcurella merged 1 commit intojoke2k:masterfrom
MorganaSilva:feat/master/update-pt-br-internet

Conversation

@MorganaSilva
Copy link
Contributor

Details

  • Faker version: master
  • OS: Any

Reason

The current pt_BR (Portuguese - Brazil) internet provider data is outdated. It lacks common modern email providers, has some inconsistencies in TLD formatting, and the username generation logic could better handle specific Portuguese accented characters for more realistic slugs.

Changes

  • Provider Implementation (faker/providers/internet/pt_BR/__init__.py):

    • Updated email domains: Added popular domains like outlook.com.br, outlook.com, icloud.com, and yahoo.com.br to reflect current usage in Brazil.
    • Fixed TLDs: Ensured TLDs like com.br do not have leading dots to avoid double-dot issues in generated URLs.
    • Improved transliteration: Enhanced the logic to correctly convert Portuguese accented characters (e.g., ã, õ, ç, á) into ASCII for usernames and slugs (e.g., João -> joao).
  • Testing (tests/providers/test_internet.py):

    • Updated TestPtBr: Replaced the basic test class with a comprehensive one.
    • New assertions: Added tests to verify the presence of new domains, correct TLD formatting, and proper character replacement in generated emails.

- Add modern free email domains (outlook, icloud, etc)
- Fix TLD formats (remove leading dots)
- Improve username generation handling accented characters (ã, õ, á, etc)
- Update and expand tests for pt_BR internet provider
Copy link
Collaborator

@fcurella fcurella left a comment

Choose a reason for hiding this comment

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

Thank you!

@fcurella fcurella merged commit d67c257 into joke2k:master Feb 6, 2026
27 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.

2 participants