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

Add test for imghdr cli #83504

Closed
tirkarthi opened this issue Jan 13, 2020 · 3 comments
Closed

Add test for imghdr cli #83504

tirkarthi opened this issue Jan 13, 2020 · 3 comments
Labels
3.7 (EOL) end of life 3.8 (EOL) end of life 3.9 only security fixes tests Tests in the Lib/test dir type-feature A feature request or enhancement

Comments

@tirkarthi
Copy link
Member

BPO 39323
Nosy @tirkarthi
PRs
  • bpo-39323: Fix directory separator of imghdr cli output #17993
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2020-01-13.16:42:19.027>
    labels = ['3.7', '3.8', 'type-feature', 'tests', '3.9']
    title = 'Add test for imghdr cli'
    updated_at = <Date 2020-01-13.18:33:14.368>
    user = 'https://github.com/tirkarthi'

    bugs.python.org fields:

    activity = <Date 2020-01-13.18:33:14.368>
    actor = 'xtreak'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Tests']
    creation = <Date 2020-01-13.16:42:19.027>
    creator = 'xtreak'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 39323
    keywords = ['patch']
    message_count = 1.0
    messages = ['359919']
    nosy_count = 1.0
    nosy_names = ['xtreak']
    pr_nums = ['17993']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue39323'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']

    @tirkarthi
    Copy link
    Member Author

    imghdr module has a cli that can display the image type for a given filename and also recurse through directories. I would like to propose following changes :

    • Add tests for the imghdr cli.
    • The cli uses hardcoded '/' separator in the end for directories this is a minor issue with windows where the separators are \ and the last separator is displayed with / like c:\Foo\Bar\Spam/ . Using os.sep can be a better option here.

    I have a PR that I will add shortly for review.

    @tirkarthi tirkarthi added 3.7 (EOL) end of life 3.8 (EOL) end of life 3.9 only security fixes tests Tests in the Lib/test dir type-feature A feature request or enhancement labels Jan 13, 2020
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @hugovk
    Copy link
    Member

    hugovk commented Apr 11, 2022

    Note the imghdr modules is deprecated in 3.11 and set for removal in 3.13.

    See PEP 594 – Removing dead batteries from the standard library and #91217.

    @hugovk
    Copy link
    Member

    hugovk commented Apr 11, 2022

    The PR has been closed (#17993 (comment)), let's close the issue too. Thanks!

    @hugovk hugovk closed this as completed Apr 11, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life 3.8 (EOL) end of life 3.9 only security fixes tests Tests in the Lib/test dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants