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

Document unsorted behaviour of glob.glob #69801

Closed
waveform80 mannequin opened this issue Nov 13, 2015 · 7 comments
Closed

Document unsorted behaviour of glob.glob #69801

waveform80 mannequin opened this issue Nov 13, 2015 · 7 comments
Labels
docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Comments

@waveform80
Copy link
Mannequin

waveform80 mannequin commented Nov 13, 2015

BPO 25615
Nosy @rhettinger, @vadmium, @waveform80
Files
  • glob-spec-unsorted.patch: glob documentation patch adding unsorted results to behaviour description
  • 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 = <Date 2015-11-17.00:29:01.784>
    created_at = <Date 2015-11-13.10:26:21.072>
    labels = ['type-bug', 'docs']
    title = 'Document unsorted behaviour of glob.glob'
    updated_at = <Date 2015-11-17.00:29:01.783>
    user = 'https://github.com/waveform80'

    bugs.python.org fields:

    activity = <Date 2015-11-17.00:29:01.783>
    actor = 'martin.panter'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2015-11-17.00:29:01.784>
    closer = 'martin.panter'
    components = ['Documentation']
    creation = <Date 2015-11-13.10:26:21.072>
    creator = 'Dave Jones'
    dependencies = []
    files = ['41029']
    hgrepos = []
    issue_num = 25615
    keywords = ['patch']
    message_count = 7.0
    messages = ['254597', '254635', '254683', '254688', '254690', '254771', '254772']
    nosy_count = 5.0
    nosy_names = ['rhettinger', 'docs@python', 'python-dev', 'martin.panter', 'Dave Jones']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue25615'
    versions = ['Python 2.7', 'Python 3.4', 'Python 3.5', 'Python 3.6']

    @waveform80
    Copy link
    Mannequin Author

    waveform80 mannequin commented Nov 13, 2015

    As suggested in bpo-21748, this is a minor documentation change to make explicitly clear that glob.glob returns unsorted results (on the basis that the existing specification references shell behaviour which is always sorted).

    @waveform80 waveform80 mannequin assigned docspython Nov 13, 2015
    @waveform80 waveform80 mannequin added docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error labels Nov 13, 2015
    @vadmium
    Copy link
    Member

    vadmium commented Nov 13, 2015

    Looks good to me. Also worth applying to earlier versions I think.

    @waveform80
    Copy link
    Mannequin Author

    waveform80 mannequin commented Nov 15, 2015

    Sounds good; the patch seems to apply cleanly to checkouts of 2.7, 3.4, and 3.5 so I'm assuming I don't need to do anything else?

    @rhettinger
    Copy link
    Contributor

    +1 for the doc update.

    For future reference, the doc patches are much easier to review if you don't rewrap the text (we can easily do that part before applying the patch).

    @waveform80
    Copy link
    Mannequin Author

    waveform80 mannequin commented Nov 15, 2015

    Ah, sorry about that - force of habit. I did wonder if it was preferable to have a nicely wrapped patch, or to have a clean diff but obviously figured wrong! I'll know for future :)

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Nov 17, 2015

    New changeset fa4f0096b719 by Martin Panter in branch '2.7':
    Issue bpo-25615: Document unsorted behaviour of glob; patch by Dave Jones
    https://hg.python.org/cpython/rev/fa4f0096b719

    New changeset 7ca6a13db0e5 by Martin Panter in branch '3.4':
    Issue bpo-25615: Document unsorted behaviour of glob; patch by Dave Jones
    https://hg.python.org/cpython/rev/7ca6a13db0e5

    New changeset f928dcb448a9 by Martin Panter in branch '3.5':
    Issue bpo-25615: Merge glob doc from 3.4 into 3.5
    https://hg.python.org/cpython/rev/f928dcb448a9

    New changeset a6bc96c2b8be by Martin Panter in branch 'default':
    Issue bpo-25615: Merge glob doc from 3.5
    https://hg.python.org/cpython/rev/a6bc96c2b8be

    @vadmium
    Copy link
    Member

    vadmium commented Nov 17, 2015

    I committed the patch as it was. But normally I do try to keep the number of lines in the diff close to the minimum, even when committing. RST files are like source code and it doesn’t matter if the wrapping is not 100% perfect, because they get turned into HTML or whatever anyway. Plus keeping the diff to a minimum helps when looking through the repository history with annotate or whatever.

    On the other hand, for doc strings, I think it is best to rewrap them, because that is the wrapping you end up with in pydoc and help().

    @vadmium vadmium closed this as completed Nov 17, 2015
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants