Fix Cython compiled check in ipython#573
Merged
samuelcolvin merged 4 commits intopydantic:masterfrom Jun 4, 2019
Merged
Conversation
Addresses the issue raised in pydantic#548 related to running non-compiled in IPython
Contributor
Author
|
@samuelcolvin Not sure why the build is failing. It says 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. |
samuelcolvin
reviewed
Jun 4, 2019
Member
samuelcolvin
left a comment
There was a problem hiding this 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.
Codecov Report
@@ Coverage Diff @@
## master #573 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 15 15
Lines 2508 2508
Branches 501 501
=====================================
Hits 2508 2508 |
anthrotype
added a commit
to fonttools/fonttools
that referenced
this pull request
Mar 2, 2023
…nstalled It's possible sometimes that 'import cython' does not fail but then 'cython.compiled' raises AttributeError. It actually happened in our internal production environment... So to check if cython library was actually installed we try to do `from cython import compiled`, which will raise ImportError if `compiled` variable is not present (it must be there for the 'real' cython, but sometimes a 'pretend' one sneaks in if sys.path has been messed with). Similar issue to pydantic/pydantic#573 and ipython/ipython#13294
anthrotype
added a commit
to fonttools/fonttools
that referenced
this pull request
Mar 2, 2023
…nstalled It's possible sometimes that 'import cython' does not fail but then 'cython.compiled' raises AttributeError. It actually happened in our internal production environment... Similar issue to pydantic/pydantic#573 and ipython/ipython#13294
alexdrydew
pushed a commit
to alexdrydew/pydantic
that referenced
this pull request
Dec 23, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses the issue raised in #548 related to running non-compiled in IPython