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

version 4.6.1 issue with opener #689

Closed
yaronbenezra opened this issue Jul 14, 2022 · 9 comments · Fixed by #690
Closed

version 4.6.1 issue with opener #689

yaronbenezra opened this issue Jul 14, 2022 · 9 comments · Fixed by #690
Labels

Comments

@yaronbenezra
Copy link

Hi,

In the latest version due to "Add support for opener in open() #688" commit we fail to run a tests on python version 3.9 cause:
image

seems like _OpenModes is now object instead of int

@mrbean-bremen
Copy link
Member

Thanks for the report - interesting. _OpenModes has not changed, the difference is that the opener call is now executed here. Looks like the flags have to be converted before passing them into the call - this was not a problem with the tested code, but obvioulsy I didn't test this usage.

Do you have a simple reproducable example, that shows this behavior? This would help to find the problem faster. I have to make another patch release anyway...

@mrbean-bremen
Copy link
Member

Never mind, this was a clear mistake. Never a good idea to rush a patch out without adequate tests...

mrbean-bremen added a commit to mrbean-bremen/pyfakefs that referenced this issue Jul 14, 2022
- the wrong argument had been passed
- fixes pytest-dev#689
mrbean-bremen added a commit that referenced this issue Jul 14, 2022
- the wrong argument had been passed
- fixes #689
github-actions bot pushed a commit that referenced this issue Jul 14, 2022
@mrbean-bremen
Copy link
Member

Shall be fixed in version 4.6.2.

@yaronbenezra
Copy link
Author

i will test and update tomorrow

@yaronbenezra
Copy link
Author

Hi
I have tested it and now we fail on :
filesystem.add_real_directory
image
hope you can help, thanks in advanced

@mrbean-bremen
Copy link
Member

Ok, that's unfortunate. I will have a look tonight - it would be nice if you could add a test that can reproduce this.

@yaronbenezra
Copy link
Author

yaronbenezra commented Jul 18, 2022

I run my test and a good version that all work for me is: 4.5.6
I will try to write a test today so I can upload it for you(I can't expose company code so I need to write a new test)
I saw this :
image

"changes root path behavior under Windows?" Do I need to change something due to this?

Best Regards,
Yaron

@mrbean-bremen
Copy link
Member

"changes root path behavior under Windows?" Do I need to change something due to this?

No, you shouldn't. That just means that internally the handling has changed to better reflect the real behavior under Windows. As this was not a small change, it could have caused some regressions, so it may be related to your problem.
Probably better to open a separate issue for this one...

@mrbean-bremen
Copy link
Member

@yaronbenezra - I created the spin-off #691, please add further information to that issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants