Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Py32 cleanup#44

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
rgommers wants to merge5 commits intonumpy:masterfromrgommers:py32-cleanup
Closed

Py32 cleanup#44

rgommers wants to merge5 commits intonumpy:masterfromrgommers:py32-cleanup

Conversation

rgommers
Copy link
Member

Some cleaning of messages from the new and shiny Python 3.2.

There is one ResourceWarning left (see below), I can't see how to fix it.
test_mmap (test_io.TestSaveLoad) ... /Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/lib/format.py:575: ResourceWarning: unclosed file <_io.BufferedReader name='/var/folders/Uu/UuXfo1NLFae4yyYpsCz-XE+++TI/-Tmp-/tmp37lh1w'>
mode=mode, offset=offset)

@charris
Copy link
Member

This looks good to me once the stdout bit in numpy/lib/tests/test_regression is removed.

@rgommers
Copy link
MemberAuthor

I guess this is the reason:

In [11]: tmp = np.who({'foo' : np.array(1)})Name            Shape            Bytes            Type===========================================================foo                              4                int32Upper bound on total bytes  =       4

Keep it after all? It hasn't given any problems so far.

@charris
Copy link
Member

I think it should be modified to something like:

oldstdout = sys.stdouttry:... except:...finally:    sys.stdout = oldstdout

and perhaps a note added to explain. I'll do that and commit tomorrow if you don't.

I wonder how persistent changes to modules imported locally in functions are?

@rgommers
Copy link
MemberAuthor

I'll try now. Should just be nested try-finally and try-except, otherwise it's not valid Python 2.4 code.

@rgommers
Copy link
MemberAuthor

OK, commited. Thanks Charles.

mattip referenced this pull request in mattip/numpyMar 20, 2019
BUG: Protect gamma generation from 0 input
fangerer pushed a commit to hpyproject/numpy-hpy that referenced this pull requestJul 7, 2022
Merge in ~STEPAN.SINDELAR_ORACLE.COM/numpy-hpy from tim/graalpython-run to labs-hpy-port* commit 'cc28777a2d2416a0cffafe4ba203f1e04058b8be':  remove legacy slots & make types non-legacy if NO_LEGACY is defined  skip tp_weaklistoffset for graalpython  remove leftover printf  port tiny forgotten bit in initumath to hpy  port remainder of set_typeinfo to hpy  use convenience enum value for .legacy on dtype types  fix premature close of h_PyGenericArrType_Type
luyahan pushed a commit to plctlab/numpy that referenced this pull requestApr 25, 2024
This pull request wasclosed.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@rgommers@charris

[8]ページ先頭

©2009-2025 Movatter.jp