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

ImportError: The ``fake-factory`` package is now called ``Faker``. #334

Closed
drodger opened this Issue Dec 16, 2016 · 14 comments

Comments

Projects
None yet
@drodger

drodger commented Dec 16, 2016

Trying to import factory, but it looks like since yesterday, one of the required packages has changed it's name:

    import factory
  File "/venv/lib64/python3.5/site-packages/factory/__init__.py", line 46, in <module>
    from .faker import Faker
  File "/venv/lib64/python3.5/site-packages/factory/faker.py", line 41, in <module>
    import faker
  File "/venv/lib64/python3.5/site-packages/faker/__init__.py", line 7, in <module>
    raise ImportError(error)
ImportError: The ``fake-factory`` package is now called ``Faker``.

Edit: I now see there's already a commit to fix this. Any chance of a release to pypi?

@jdufresne

This comment has been minimized.

Show comment
Hide comment
@jdufresne

jdufresne Dec 16, 2016

Looks like this was fixed in dba31e3?

jdufresne commented Dec 16, 2016

Looks like this was fixed in dba31e3?

@bochecha

This comment has been minimized.

Show comment
Hide comment
@bochecha

bochecha Dec 16, 2016

@jdufresne seems so, yes...

It broke our tests in Travis: https://travis-ci.org/ideascube/ideascube/builds/184587115

However, the same tests run just fine here in my pre-existing venv.

That's because in my existing venv I have fake-factory==0.7.2 which satisfies the requirement on fake-factory>=0.5.0 from factory_boy (2.7.0).

But then when creating a new venv and installing factory_boy, then pip will download the latest version of fake-factory==9999.9.9, which only contains:

VERSION = '9999.9.9'

error = """The ``fake-factory`` package is now called ``Faker``.

Please update your requirements.
"""
raise ImportError(error

Nice.

Can we have a new release of factory_boy using Faker, please? 😃

bochecha commented Dec 16, 2016

@jdufresne seems so, yes...

It broke our tests in Travis: https://travis-ci.org/ideascube/ideascube/builds/184587115

However, the same tests run just fine here in my pre-existing venv.

That's because in my existing venv I have fake-factory==0.7.2 which satisfies the requirement on fake-factory>=0.5.0 from factory_boy (2.7.0).

But then when creating a new venv and installing factory_boy, then pip will download the latest version of fake-factory==9999.9.9, which only contains:

VERSION = '9999.9.9'

error = """The ``fake-factory`` package is now called ``Faker``.

Please update your requirements.
"""
raise ImportError(error

Nice.

Can we have a new release of factory_boy using Faker, please? 😃

nickstenning added a commit to hypothesis/h that referenced this issue Dec 16, 2016

Pin fake-factory
fake-factory has been deprecated and replaced with the Faker library.
factory_boy has been updated to account for this, but the fix hasn't yet
been released:

  FactoryBoy/factory_boy#334

In the mean time, pin fake-factory to fix our tests.
@seocam

This comment has been minimized.

Show comment
Hide comment
@seocam

seocam Dec 16, 2016

Also affecting us.

seocam commented Dec 16, 2016

Also affecting us.

@muriloviana

This comment has been minimized.

Show comment
Hide comment
@muriloviana

muriloviana Dec 16, 2016

It broke our tests too.

muriloviana commented Dec 16, 2016

It broke our tests too.

@leportella

This comment has been minimized.

Show comment
Hide comment
@leportella

leportella Dec 16, 2016

I'm also having problems

leportella commented Dec 16, 2016

I'm also having problems

@rougeth

This comment has been minimized.

Show comment
Hide comment
@rougeth

rougeth Dec 16, 2016

Same here...

rougeth commented Dec 16, 2016

Same here...

@n1207n

This comment has been minimized.

Show comment
Hide comment
@n1207n

n1207n Dec 16, 2016

Looks like everyone is having a same problem here ;)

Faker library released the latest version 0.7.5 which deprecates fake-factory package name.

screen shot 2016-12-16 at 11 01 21 am

If factory-boy uses Faker 0.7.4, the issue could be resolved.

n1207n commented Dec 16, 2016

Looks like everyone is having a same problem here ;)

Faker library released the latest version 0.7.5 which deprecates fake-factory package name.

screen shot 2016-12-16 at 11 01 21 am

If factory-boy uses Faker 0.7.4, the issue could be resolved.

@markkohdev

This comment has been minimized.

Show comment
Hide comment
@markkohdev

markkohdev Dec 16, 2016

We're having the same issues.
Until the next PyPi release we're using the master branch in our pip requirements.txt

git+git://github.com/FactoryBoy/factory_boy.git

markkohdev commented Dec 16, 2016

We're having the same issues.
Until the next PyPi release we're using the master branch in our pip requirements.txt

git+git://github.com/FactoryBoy/factory_boy.git
@jeffwidman

This comment has been minimized.

Show comment
Hide comment
@jeffwidman

jeffwidman Dec 16, 2016

Member

Oops. We already swapped over to the new name back in this commit: dba31e3

However, looks like we forgot to cut a new release. @rbarrois is likely asleep right now, but hopefully he can get to it when he wakes up as I don't have Pypi rights for this project.

Member

jeffwidman commented Dec 16, 2016

Oops. We already swapped over to the new name back in this commit: dba31e3

However, looks like we forgot to cut a new release. @rbarrois is likely asleep right now, but hopefully he can get to it when he wakes up as I don't have Pypi rights for this project.

@reagent

This comment has been minimized.

Show comment
Hide comment
@reagent

reagent Dec 16, 2016

I ran into this as well -- the solution that worked for me was to reference fake-factory in my requirements.txt file (before factory-boy):

fake-factory==0.7.4
factory-boy==2.7.0

reagent commented Dec 16, 2016

I ran into this as well -- the solution that worked for me was to reference fake-factory in my requirements.txt file (before factory-boy):

fake-factory==0.7.4
factory-boy==2.7.0
@glassresistor

This comment has been minimized.

Show comment
Hide comment
@glassresistor

glassresistor Dec 16, 2016

I've having the same issue please fix import and bump version

glassresistor commented Dec 16, 2016

I've having the same issue please fix import and bump version

andrew-gardener added a commit to ubc/compair that referenced this issue Dec 16, 2016

Fix unit tests
When we can update to a new version of factory_boy we can remove the ‘fake-factory’ requirement (see: FactoryBoy/factory_boy#334)
@baka101

This comment has been minimized.

Show comment
Hide comment
@baka101

baka101 Dec 16, 2016

Explicitly requiring Faker resolved the error for now:

Faker>=0.7.0
factory_boy==2.7.0

UPDATE: nevermind... spoke to early. Did not quite fix the issue.

baka101 commented Dec 16, 2016

Explicitly requiring Faker resolved the error for now:

Faker>=0.7.0
factory_boy==2.7.0

UPDATE: nevermind... spoke to early. Did not quite fix the issue.

@jeffwidman

This comment has been minimized.

Show comment
Hide comment
@jeffwidman

jeffwidman Dec 17, 2016

Member

I've having the same issue please fix import and bump version

We are already aware of this. Please use the thumbs up button rather than spamming everyone with a "me too". Thanks.

PS: For now, a simple workaround is to temporarily install off of master branch where this is already fixed as described in #334 (comment)

Member

jeffwidman commented Dec 17, 2016

I've having the same issue please fix import and bump version

We are already aware of this. Please use the thumbs up button rather than spamming everyone with a "me too". Thanks.

PS: For now, a simple workaround is to temporarily install off of master branch where this is already fixed as described in #334 (comment)

@rbarrois

This comment has been minimized.

Show comment
Hide comment
@rbarrois

rbarrois Dec 17, 2016

Member

Just fixed with 2.8.1 — I had to upload a couple of versions to fix an issue with recent setuptools versions.

Sorry for the release lag :/

Member

rbarrois commented Dec 17, 2016

Just fixed with 2.8.1 — I had to upload a couple of versions to fix an issue with recent setuptools versions.

Sorry for the release lag :/

@rbarrois rbarrois closed this Dec 17, 2016

bochecha added a commit to ideascube/ideascube that referenced this issue Dec 17, 2016

Upgrade our deps
Upgrading factory-boy fixes the build:

    FactoryBoy/factory_boy#334

But while we're at it, we might as well upgrade everything.

bochecha added a commit to ideascube/ideascube that referenced this issue Dec 17, 2016

Upgrade our deps
Upgrading factory-boy fixes the build:

FactoryBoy/factory_boy#334

But while we're at it, we might as well upgrade everything.

aaxelb added a commit to aaxelb/SHARE that referenced this issue Dec 22, 2016

Fix FactoryBoy dependency problem
Workaround until upgrading to FactoryBoy 2.8.1
FactoryBoy/factory_boy#334

aaxelb added a commit to aaxelb/SHARE that referenced this issue Dec 22, 2016

Work around FactoryBoy dependency issue
Should update to FactoryBoy 2.8.1 when it doesn't break our tests
FactoryBoy/factory_boy#334

avelis added a commit to jazzband/django-silk that referenced this issue Dec 28, 2016

Upgrade test library to address import error
Referenced in the issue here:
FactoryBoy/factory_boy#334

Version 2.8.1 of the factory-boy library contains an update to
reference the new Faker library name.

avelis added a commit to jazzband/django-silk that referenced this issue Dec 28, 2016

Upgrades testing library requirement
Referenced in the issue here:
FactoryBoy/factory_boy#334

Version 2.8.1 of the factory-boy library references the new Faker
library name.

rikva added a commit to rikva/voko that referenced this issue Dec 30, 2016

bochecha added a commit to ideascube/ideascube that referenced this issue Jan 5, 2017

Upgrade our deps
Upgrading factory-boy fixes the build:

FactoryBoy/factory_boy#334

But while we're at it, we might as well upgrade everything.

bochecha added a commit to ideascube/ideascube that referenced this issue Jan 5, 2017

Upgrade our deps
Upgrading factory-boy fixes the build:

FactoryBoy/factory_boy#334

But while we're at it, we might as well upgrade everything.

loum added a commit to loum/slagiatt that referenced this issue Jan 18, 2017

Makefile
* Python 3.6 deprecates pyvenv.  Python versions greater than 3.3
  with use "python -m venv" instead

setup.py
* factory-boy 2.7.0 deps broken as per
  FactoryBoy/factory_boy#334.  Bumped up to
  2.8.1 to resolve

Justin-W added a commit to Justin-W/drfunland that referenced this issue Feb 21, 2017

fix: build, dependencies, requirements: updated the 'factory-boy' ver…
…sion requirement to 2.8.1, to work around the backward-compatibility-breaking deprecation of the 'fake-factory' module.

Details:
See: FactoryBoy/factory_boy#334
... Just fixed with 2.8.1  ...
See: https://pypi.python.org/pypi/fake-factory
... The `fake-factory` package was deprecated on December 15th, 2016. Use the `Faker` package instead. ...

Justin-W added a commit to Justin-W/drfunland that referenced this issue Feb 21, 2017

fix: build, dependencies, requirements: updated the 'factory-boy' ver…
…sion requirement to 2.8.1, to work around the backward-compatibility-breaking deprecation of the 'fake-factory' module.

Details:
See: FactoryBoy/factory_boy#334
... Just fixed with 2.8.1  ...
See: https://pypi.python.org/pypi/fake-factory
... The `fake-factory` package was deprecated on December 15th, 2016. Use the `Faker` package instead. ...

amarandon pushed a commit to makinacorpus/robotframework-djangolibrary that referenced this issue Feb 23, 2017

Alex Marandon
Upgrade factory boy
    Currently, running `py.test mysite` raises this error:

    E   ImportError: The ``fake-factory`` package is now called ``Faker``.
    E
    E   Please update your requirements.

    This is an issue which has been resolved in FactoryBoy:
    FactoryBoy/factory_boy#334
    Faker changed the way it should be imported and because the version of
    Faker was loosely specified in FactoryBoy requirements, a build that
    used to work doesn't work anymore.

    Fix #26

amarandon added a commit to makinacorpus/robotframework-djangolibrary that referenced this issue Feb 28, 2017

Upgrade factory boy
    Currently, running `py.test mysite` raises this error:

    E   ImportError: The ``fake-factory`` package is now called ``Faker``.
    E
    E   Please update your requirements.

    This is an issue which has been resolved in FactoryBoy:
    FactoryBoy/factory_boy#334
    Faker changed the way it should be imported and because the version of
    Faker was loosely specified in FactoryBoy requirements, a build that
    used to work doesn't work anymore.

    Fix #26

@gustavi gustavi referenced this issue Apr 15, 2017

Merged

Fix #4276 : Update factory-boy: 2.7.0 → 2.8.1 #4297

2 of 2 tasks complete

meshy added a commit to meshy/incuna-test-utils that referenced this issue Jul 16, 2017

Upgrade factory-boy
This ought to fix the tests. See FactoryBoy/factory_boy#334
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment