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

tempfile.SpooledTemporaryFile still has softspace property #83900

Closed
hauntsaninja opened this issue Feb 21, 2020 · 2 comments
Closed

tempfile.SpooledTemporaryFile still has softspace property #83900

hauntsaninja opened this issue Feb 21, 2020 · 2 comments
Labels
3.9 only security fixes

Comments

@hauntsaninja
Copy link
Contributor

BPO 39719
Nosy @serhiy-storchaka, @hauntsaninja
PRs
  • bpo-39719: remove softspace from tempfile.SpooledTemporaryFile #18599
  • 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 2020-03-17.21:51:02.641>
    created_at = <Date 2020-02-21.22:32:08.368>
    labels = ['3.9']
    title = 'tempfile.SpooledTemporaryFile still has softspace property'
    updated_at = <Date 2020-03-17.21:51:02.640>
    user = 'https://github.com/hauntsaninja'

    bugs.python.org fields:

    activity = <Date 2020-03-17.21:51:02.640>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-03-17.21:51:02.641>
    closer = 'serhiy.storchaka'
    components = []
    creation = <Date 2020-02-21.22:32:08.368>
    creator = 'hauntsaninja'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 39719
    keywords = ['patch']
    message_count = 2.0
    messages = ['362437', '364482']
    nosy_count = 2.0
    nosy_names = ['serhiy.storchaka', 'hauntsaninja']
    pr_nums = ['18599']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue39719'
    versions = ['Python 3.9']

    @hauntsaninja
    Copy link
    Contributor Author

    The softspace attribute of files was removed in Python 3 (mentioned in https://raw.githubusercontent.com/python/cpython/master/Misc/HISTORY)

    However, tempfile.SpooledTemporaryFile still has a softspace property that attempts to return read the softspace attribute.

    In [23]: t = tempfile.SpooledTemporaryFile()                                    
    
    In [24]: t.softspace                                                            
    ---------------------------------------------------------------------------
    AttributeError                            Traceback (most recent call last)
    <ipython-input-24-72e5af9f6ded> in <module>
    ----> 1 t.softspace
    
    /usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tempfile.py in softspace(self)
        749     @property
        750     def softspace(self):
    --> 751         return self._file.softspace
        752 
        753     def tell(self):
    
    AttributeError: '_io.BytesIO' object has no attribute 'softspace'
    

    @serhiy-storchaka
    Copy link
    Member

    New changeset d469d66 by Shantanu in branch 'master':
    bpo-39719: Remove softspace from tempfile.SpooledTemporaryFile (GH-18599)
    d469d66

    @serhiy-storchaka serhiy-storchaka added the 3.9 only security fixes label Mar 17, 2020
    @serhiy-storchaka serhiy-storchaka added the 3.9 only security fixes label Mar 17, 2020
    @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
    3.9 only security fixes
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants