Comments (9)
@adiroiban Thanks for reporting this. I found a workaround: pyinvoke/invoke#833 (comment)
I'll be shipping a new release with the fix very soon.
from pynose.
This is the way I am patching it for nose
inspect.getargspec = lambda func: inspect.getfullargspec(func)[:4]
from pynose.
@adiroiban If you use:
if not hasattr(inspect, 'getargspec'):
inspect.getargspec = inspect.getfullargspec
does that work for you? That seems to be the solution that many people liked.
from pynose.
As far as I remember, no. It doesn't work.
See the docs https://docs.python.org/3/library/inspect.html#inspect.getfullargspec
getfullargspec
returns FullArgSpec(args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations)
nose
usage is args, varargs, varkw, defaults = inspect.getargspec(func)
but nose is only using the args
from the return value.
Wouldn't it be better to have everything in the pynose
namespace ?
That is, instead of patching the vanilla nose, why not continue the development as a separate project?
from pynose.
@adiroiban I'll start with the quick patches, and then make more changes as needed.
I'll use the following after importing inspect
:
inspect.getargspec = lambda func: inspect.getfullargspec(func)[:4]
If you say that solves your current issue, I can make the necessary changes quickly and push a release within an hour.
from pynose.
I don't think that we need to rush.
I already have this working on my fork ... and for practical and security reasons I will always use a fork from a private PyPI server :)
I think is best to update the automated tests to reveal this issue and then push a fix.
Let me give this a try. I will push a PR and I will give you access to the branch.
from pynose.
@adiroiban If the only change is:
if not hasattr(inspect, "getargspec"):
inspect.getargspec = lambda func: inspect.getfullargspec(func)[:4]
I can push that change quickly.
from pynose.
I am not sure that is the only change.
But most probably it is.
It would have been nice to have the full nose test available and run those tests, rather than reinventing tests for pynose
Let's check the changes in the PR.
I first would like to see the CI failing and then fix the issue :)
And also add a NEWS.md or some release notes file to keep track of latest changes in the repo :p
from pynose.
Resolved in 1.4.5
- https://github.com/mdmintz/pynose/releases/tag/v1.4.5
from pynose.
Related Issues (10)
- Replace deprecated imp module with importlib HOT 3
- Compatibility option? HOT 1
- Capture output if "NOSE_CAPTURE" is set to "1" (or if "--capture-output") HOT 1
- Wrong license HOT 67
- Time to drop support for Python 3.6 HOT 1
- Officially support Python 3.13 HOT 1
- Logging Optimizations HOT 1
- Question: Will you provide unit tests? HOT 4
- "DeprecationWarning: pkg_resources is deprecated as an API."
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pynose.