Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undocumented backwards incompatible change to words provider in v26.0.0 #2070

Open
gsnider2195 opened this issue Jul 8, 2024 · 1 comment · May be fixed by #2072
Open

Undocumented backwards incompatible change to words provider in v26.0.0 #2070

gsnider2195 opened this issue Jul 8, 2024 · 1 comment · May be fixed by #2072

Comments

@gsnider2195
Copy link

gsnider2195 commented Jul 8, 2024

  • Faker version: v26.0.0
  • OS: Linux fedora 6.9.7-100.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jun 27 18:06:32 UTC 2024 x86_64 GNU/Linux

#2067 changed the signature of the words provider and removed the part_of_speech kwarg. I know this is a major version change but this wasn't documented in the change log.

Steps to reproduce

  1. Install faker v26.0.0
  2. faker.Faker().words(nb=2, part_of_speech="adjective")

Expected behavior

Works correctly like in v25.9.2:

>>> import faker
>>> faker.Faker().words(nb=2, part_of_speech="adjective")
['active', 'least']

Actual behavior

>>> import faker
>>> faker.Faker().words(nb=2, part_of_speech="adjective")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: Provider.words() got an unexpected keyword argument 'part_of_speech'
@fcurella
Copy link
Collaborator

I think this is a bug and we can re-introduce part_of_speech back.

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 a pull request may close this issue.

2 participants