[issue34938] Fix mimetype.init() to account for from import

2021-08-12 Thread Andrei Kulakov
Andrei Kulakov added the comment: How about returning the updated dicts from init() and showing an example in the docs of such usage? -- nosy: +andrei.avk ___ Python tracker

[issue34938] Fix mimetype.init() to account for from import

2020-07-06 Thread Terry J. Reedy
Change by Terry J. Reedy : -- versions: +Python 3.10 -Python 2.7, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker ___ ___

[issue34938] Fix mimetype.init() to account for from import

2020-05-23 Thread Cheryl Sabella
Cheryl Sabella added the comment: @steve.dower, Mariatta had a question for you on the PR. -- nosy: +cheryl.sabella ___ Python tracker ___

[issue34938] Fix mimetype.init() to account for from import

2019-12-30 Thread Ashley Whetter
Ashley Whetter added the comment: Yes I'm happy to make those changes as part of this. So clarify what needs to change in PR 16567: 1) Include a note in the docs for `inited` that outlines that if it is imported into the local scope, it will not be updated by calls to `init()`. Only

[issue34938] Fix mimetype.init() to account for from import

2019-12-20 Thread YoSTEALTH
YoSTEALTH added the comment: I didn't receive any notification of replay on this topic. `_default_mime_types()` should never have been a function. This function should be safe to remove as its an internal function. This would avoid unneeded function call and globals used. Stuff like

[issue34938] Fix mimetype.init() to account for from import

2019-10-28 Thread Ashley Whetter
Ashley Whetter added the comment: Maybe updating the dictionaries isn't right at all. I think if you were experienced enough you would have the intuition that mutable attributes like this are not going to change in your local scope if you import them into it. But relying on this knowledge

[issue34938] Fix mimetype.init() to account for from import

2019-10-04 Thread Brandt Bucher
Change by Brandt Bucher : -- nosy: +brandtbucher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34938] Fix mimetype.init() to account for from import

2019-10-04 Thread Steve Dower
Steve Dower added the comment: Adding email team here, since you were pinged on the PR. PR 16567 doesn't fix the `inited` member, which is considerably more difficult to do, unfortunately, but it does mean that it's out of sync with the values you hold. Arguably this is a better state to be

[issue34938] Fix mimetype.init() to account for from import

2019-10-03 Thread AWhetter
Change by AWhetter : -- keywords: +patch pull_requests: +16158 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16567 ___ Python tracker ___

[issue34938] Fix mimetype.init() to account for from import

2018-10-09 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34938] Fix mimetype.init() to account for from import

2018-10-08 Thread YoSTEALTH
New submission from YoSTEALTH : When a user uses from import, there is a flaw in how mimetype.init() updates its global references. # Option-1 (flawed) # - from mimetypes import init, types_map print(types_map.get('.gz')) # None init() # <- initialize