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

Fix Cython compiled check in ipython #573

Merged
merged 4 commits into from Jun 4, 2019
Merged

Conversation

@dmontagu
Copy link
Collaborator

@dmontagu dmontagu commented Jun 3, 2019

Addresses the issue raised in #548 related to running non-compiled in IPython

Addresses the issue raised in samuelcolvin#548 related to running non-compiled in IPython
@dmontagu dmontagu mentioned this pull request Jun 3, 2019
5 tasks
@dmontagu
Copy link
Collaborator Author

@dmontagu dmontagu commented Jun 3, 2019

@samuelcolvin Not sure why the build is failing. It says

2:58:53 PM: Running Sphinx v2.0.1
2:58:54 PM: Configuration error:
2:58:54 PM: There is a programmable error in your configuration file:
2:58:54 PM: Traceback (most recent call last):
2:58:54 PM:   File "/opt/buildhome/python3.6/lib/python3.6/site-packages/sphinx/config.py", line 361, in eval_config_file
2:58:54 PM:     execfile_(filename, namespace)
2:58:54 PM:   File "/opt/buildhome/python3.6/lib/python3.6/site-packages/sphinx/util/pycompat.py", line 86, in execfile_
2:58:54 PM:     exec(code, _globals)
2:58:54 PM:   File "/opt/build/repo/docs/conf.py", line 85, in <module>
2:58:54 PM:     from pydantic.version import VERSION
2:58:54 PM:   File "pydantic/__init__.py", line 2, in init pydantic.__init__
2:58:54 PM:   File "pydantic/dataclasses.py", line 8, in init pydantic.dataclasses
2:58:54 PM:   File "pydantic/main.py", line 68, in init pydantic.main
2:58:54 PM: NameError: name 'cython' is not defined

in the build logs (https://app.netlify.com/sites/pydantic-docs/deploys/5cf5977b10a4b80009431880), but I don't understand how the change I made could have introduced this error.

Also, the tests pass for me locally whether or not I have cython installed in the testing environment.

Copy link
Owner

@samuelcolvin samuelcolvin left a comment

No idea why this fails, but it does. Both on travis and netlify.

wrap this in an AttributeError try/except and add pragma: no cover wherever required.

Please add an entry to history too.

@samuelcolvin samuelcolvin changed the title Update main.py Fix Cython compiled check in ipython Jun 4, 2019
@codecov
Copy link

@codecov codecov bot commented Jun 4, 2019

Codecov Report

Merging #573 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##           master   #573   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          15     15           
  Lines        2508   2508           
  Branches      501    501           
=====================================
  Hits         2508   2508

@samuelcolvin samuelcolvin assigned samuelcolvin and unassigned dmontagu Jun 4, 2019
@samuelcolvin samuelcolvin merged commit 6d5c48e into samuelcolvin:master Jun 4, 2019
8 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
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants