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

_pdbpp_path_hack/pdb.py: fix ResourceWarning #97

Merged
merged 1 commit into from
Nov 4, 2018
Merged

_pdbpp_path_hack/pdb.py: fix ResourceWarning #97

merged 1 commit into from
Nov 4, 2018

Conversation

blueyed
Copy link
Collaborator

@blueyed blueyed commented Jun 21, 2018

Fixes:

…/.tox/venvs/py36-django21/lib/python3.6/site-packages/_pdbpp_path_hack/pdb.py:4:
ResourceWarning: unclosed file <_io.TextIOWrapper
name='…/.tox/venvs/py36-django21/lib/python3.6/site-packages/pdb.py'
mode='r' encoding='UTF-8'>
os.path.dirname(os.path.dirname(file)), 'pdb.py')).read(),
os.path.join(

@blueyed blueyed requested a review from antocuni November 3, 2018 14:52
@blueyed
Copy link
Collaborator Author

blueyed commented Nov 3, 2018

@antocuni
Do we want a test for this also?

Fixes:

> …/.tox/venvs/py36-django21/lib/python3.6/site-packages/_pdbpp_path_hack/pdb.py:4:
> ResourceWarning: unclosed file <_io.TextIOWrapper
> name='…/.tox/venvs/py36-django21/lib/python3.6/site-packages/pdb.py'
> mode='r' encoding='UTF-8'>
  os.path.dirname(os.path.dirname(__file__)), 'pdb.py')).read(),
  os.path.join(
@blueyed blueyed added the bug label Nov 3, 2018
@antocuni
Copy link
Collaborator

antocuni commented Nov 4, 2018

I wrote some coding guidelines to make it easier to know when it is needed to write a test and when it's not:
https://github.com/antocuni/pdb#coding-guidelines

according to that, I think it is fine not to have a test here

@blueyed blueyed merged commit 6ad13d9 into pdbpp:master Nov 4, 2018
@blueyed blueyed deleted the resourcewarning branch November 4, 2018 17:16
blueyed added a commit that referenced this pull request May 28, 2019
Fixes:

> …/.tox/venvs/py36-django21/lib/python3.6/site-packages/_pdbpp_path_hack/pdb.py:4:
> ResourceWarning: unclosed file <_io.TextIOWrapper
> name='…/.tox/venvs/py36-django21/lib/python3.6/site-packages/pdb.py'
> mode='r' encoding='UTF-8'>
  os.path.dirname(os.path.dirname(__file__)), 'pdb.py')).read(),
  os.path.join(
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 this pull request may close these issues.

None yet

2 participants