python / python/cpython

NamedTemporaryFile does not generate a ResourceWarning for unclosed files (unlike TemporaryFile)

Đang mở
#73,053 12 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

3.7 (EOL) stdlib type-bug
Ngôn ngữ chính
Python
Star
77.2k
Fork
36k
Merge trung bình
1 ngày 9 giờ
Pull request đã merge (30 ngày)
558

Mô tả

BPO 28867
Nosy @vstinner, @bitdancer, @jdufresne
PRs
  • python/cpython#1936
  • Files
  • namedtemporaryfile-resourcewarning.patch: Patch to add ResourceWarning to NamedTemporaryFile
  • namedtemporaryfile-resourcewarning-2.patch: Updated patch
  • namedtemporaryfile-resourcewarning-3.patch: Patch take 3
  • namedtemporaryfile-resourcewarning-4.patch: Patch take 4
  • 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 2016-12-04.17:47:27.371>
    labels = ['3.7', 'type-bug', 'library']
    title = 'NamedTemporaryFile does not generate a ResourceWarning for unclosed files (unlike TemporaryFile)'
    updated_at = <Date 2017-06-04.03:13:36.750>
    user = 'https://github.com/jdufresne'
    

    bugs.python.org fields:

    activity = <Date 2017-06-04.03:13:36.750>
    actor = 'jdufresne'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2016-12-04.17:47:27.371>
    creator = 'jdufresne'
    dependencies = []
    files = ['45783', '45789', '45851', '45852']
    hgrepos = []
    issue_num = 28867
    keywords = ['patch']
    message_count = 11.0
    messages = ['282352', '282355', '282360', '282366', '282372', '282599', '282629', '282630', '282631', '282933', '282955']
    nosy_count = 4.0
    nosy_names = ['vstinner', 'r.david.murray', 'SilentGhost', 'jdufresne']
    pr_nums = ['1936']
    priority = 'normal'
    resolution = None
    stage = 'needs patch'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue28867'
    versions = ['Python 3.6', 'Python 3.7']
    

    Hướng dẫn đóng góp

    Mở hướng dẫn đóng góp

    Bắt đầu từ đâu

    1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
    2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
    3. Fork repository và làm thay đổi trên một nhánh.
    4. Mở pull request có tham chiếu số hiệu của issue.

    Hướng nghiên cứu

    Bắt đầu bằng cách xem xét các tệp namedtemporaryfile-resourcewarning.patch được liên kết trong issue và các entry point NamedTemporaryFile và TemporaryFile mà chúng đề cập đến. Xác minh hành vi ResourceWarning đối với một NamedTemporaryFile chưa được đóng so với TemporaryFile, trong đó patch đã cập nhật và các bài kiểm thử của nó thể hiện kết quả mong muốn.

    Do mô hình lập chỉ mục viết ra từ nội dung của issue.

    Đánh giá

    Công nghệ
    python
    Lĩnh vực
    backend
    Loại issue
    Lỗi
    Độ khó
    3/5
    Thời gian dự kiến
    1-2 ngày
    Mức độ hoạt động
    Đình trệ
    Độ rõ ràng
    Khá rõ ràng
    Mức phù hợp với người mới
    25/100

    Nhận issue mới trong hộp thư của bạn

    Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.