[issue38905] venv python reports wrong sys.executable in a subprocess on Windows

2020-04-18 Thread Benedek Rácz
Benedek Rácz added the comment: Is there any update/solution for this issue? This issue is the root cause of this SO post: https://stackoverflow.com/q/61290972/2506522 -- nosy: +Benedek Rácz ___ Python tracker

[issue40312] Weakref callbacks running before finalizers in GC collection

2020-04-18 Thread Allan Feldman
Allan Feldman added the comment: Reading more carefully, I may have jumped to conclusions here :) Looking at the weakref docs, I see the following description of the callback functionality: > If callback is provided and not None, and the returned weakref object is > still alive, the

[issue40312] Weakref callbacks running before finalizers in GC collection

2020-04-18 Thread Tim Peters
Tim Peters added the comment: Ah, I missed that `cache` is global. So it will hold reachable strong refs to the weakrefs stored for the dict's values. So gc will run the callbacks associated with weakrefs' trash referents. I think you're out of luck. Nothing is defined about the order in

[issue40308] Intermittent failure of test_os.TestScandir.test_attributes on Windows

2020-04-18 Thread Dennis Sweeney
Change by Dennis Sweeney : -- resolution: -> works for me stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue40078] asyncio subprocesses allow pids to be reaped, different behavior than regular subprocesses

2020-04-18 Thread Carl Lewin
Carl Lewin added the comment: Very first time engaging in such a forum. Apologies is advance if I am doing it wrong! Observation: ps -ef shows "Defunct" process until calling script terminates Scenario: equivalent test scripts in BASH, Python 2.7 and 3.6 that: 1. Start a ping 2. SIGTERM

[issue40325] Random.seed does not affect string hash randomization leading to non-intuitive results

2020-04-18 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +18926 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19591 ___ Python tracker

[issue40312] Weakref callbacks running before finalizers in GC collection

2020-04-18 Thread Allan Feldman
Allan Feldman added the comment: Thanks for the response! > if a weakref W refers to object O, and W and O are _both_ in cyclic trash I believe that in the examples W is not in cyclic trash, but remains referenced as a global in the frame. Only O is in cyclic trash (O references itself). I

[issue40312] Weakref callbacks running before finalizers in GC collection

2020-04-18 Thread Tim Peters
Tim Peters added the comment: Offhand I'm surprised because of this: if a weakref W refers to object O, and W and O are _both_ in cyclic trash, gc does not want to invoke W's callback (if any). In fact, it works hard not to call it. So I'm surprised that the callback is invoked at all,

[issue40325] Random.seed does not affect string hash randomization leading to non-intuitive results

2020-04-18 Thread Tim Peters
Tim Peters added the comment: Yup, I agree sample(set) is a misfeature. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue40325] Random.seed does not affect string hash randomization leading to non-intuitive results

2020-04-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think the thing we can fix is the automatic set support which is intrinsically broken with respect to reproducibility and which was likely not a good idea to begin with (because it adds an implicit and possibly unexpected O(n) conversion step and

[issue40325] Random.seed does not affect string hash randomization leading to non-intuitive results

2020-04-18 Thread Tim Peters
Tim Peters added the comment: Raymond, I think that removing sample(set) support is a different issue. This report will just change its final example line to >>> print(random.sample(list(x), 1)) or >>> print(random.sample(tuple(x), 1)) and have the same complaint. -- nosy:

[issue40325] Random.seed does not affect string hash randomization leading to non-intuitive results

2020-04-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm going to deprecate the support for sets. It was a design mistake at several levels. Better to just remove it. -- assignee: docs@python -> rhettinger nosy: +rhettinger type: -> behavior versions: +Python 3.9 -Python 3.7, Python 3.8

[issue40324] python 3.8.2 idle not opening

2020-04-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: Please answer the questions in msg365164 of #40083. -- ___ Python tracker ___ ___

[issue40255] Fixing Copy on Writes from reference counting

2020-04-18 Thread Neil Schemenauer
Neil Schemenauer added the comment: I resurrected an old thread on Discourse that seems quite relevant to this PR: https://discuss.python.org/t/switching-from-refcounting-to-libgc/1641/35?u=nas -- ___ Python tracker

[issue40311] docs.python.org banner - release blocker for 2.7.18

2020-04-18 Thread Benjamin Peterson
Benjamin Peterson added the comment: 0fc82e95878234291f23155a64408fced71892b2 -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue40325] Random.seed does not affect string hash randomization leading to non-intuitive results

2020-04-18 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: String hash randomization is a security feature so it may be better to not disable it unless explicitly asked for. Maybe a note in random's documentation could be added? -- nosy: +remi.lapeyre ___ Python tracker

[issue40325] Random.seed does not affect string hash randomization leading to non-intuitive results

2020-04-18 Thread Yuval S
New submission from Yuval S : The following code gives different results on each run, even though "``random.seed()``" is used: >>> import random >>> random.seed(6) >>> x = set(str(i) for i in range(500)) >>> print(random.sample(x, 1)) presumably because of string hash randomization (see also

[issue40247] Logged out of user when running Tkinter

2020-04-18 Thread Ned Deily
Ned Deily added the comment: Thanks for the additional info but it still leaves open questions. The current versions of python.org installers for macOS (3.8.2 and 3.7.7) and various others over the past couple of years all come with a built-in version of Tk 8.6 and that normally cannot be

[issue40323] Printing of Single (') and Double (") code in one sentence using escape Code

2020-04-18 Thread SilentGhost
SilentGhost added the comment: The output in REPL is valid representation of an object that can be often be used to re-create the object, you could use print function to see how the string would look like when output on screen or written into a file. -- nosy: +SilentGhost

[issue40321] urllib.request does not support HTTP response status code 308

2020-04-18 Thread Ned Deily
Change by Ned Deily : -- nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23414] seek(count, whence) accepts bogus whence on windows, python2.7

2020-04-18 Thread Ned Deily
Change by Ned Deily : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue40324] python 3.8.2 idle not opening

2020-04-18 Thread krishan danushka
New submission from krishan danushka : i downloaded python 3.8.2 version.but idle is not opening.i trying serveral time by reinstall but it doesn't working. -- assignee: terry.reedy components: IDLE messages: 366738 nosy: krishandanushka...@gmail.com, terry.reedy priority: normal

[issue40322] struct.pack adding unexpected byte in 'B' format

2020-04-18 Thread Robert Bressan
Robert Bressan added the comment: After placing a standard size instead of a native one, solved. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue40323] Printing of Single (') and Double (") code in one sentence using escape Code

2020-04-18 Thread Vishnuvenkatesh Dhage
New submission from Vishnuvenkatesh Dhage : In Python shell v3.8.2, when user want to use both single quotation mark and double quotation mark in one sentence/paragraph then Single Quotation is displayed in the screen along with escape code i.e. \', but double quotation display ok i.e. ".

[issue23414] seek(count, whence) accepts bogus whence on windows, python2.7

2020-04-18 Thread Zackery Spytz
Zackery Spytz added the comment: Python 2 is EOL. -- nosy: +ZackerySpytz ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40322] struct.pack adding unexpected byte in 'B' format

2020-04-18 Thread Robert Bressan
New submission from Robert Bressan : struct.pack() is adding an unexpected null byte. When I've run this code: ___ import struct d = {'c':b'a', 'b':1, 'B':1, '?':False, 'h':2, 'H':2, 'i':-3, 'I':3, 'l':4, 'L':4, 'q':5, 'Q':5, 'f':100.0, 'd':2.0} for x

[issue38891] ShareableList read and write access is O(N), should be O(1)

2020-04-18 Thread Antoine Pitrou
Change by Antoine Pitrou : -- versions: +Python 3.9 -Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40269] Inconsistent complex behavior with (-1j)

2020-04-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: Since integers don't have signed zeros, the use of integers in the complex repr is a little weird: >>> (-0-1j) # The unary minus in the repr has no effect. -1j >>> (0-1j) -1j -- ___ Python tracker

[issue40321] urllib.request does not support HTTP response status code 308

2020-04-18 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +18925 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19588 ___ Python tracker

[issue35113] inspect.getsource returns incorrect source for classes when class definition is part of multiline strings

2020-04-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +18924 pull_request: https://github.com/python/cpython/pull/19587 ___ Python tracker ___

[issue27635] pickle documentation says that unpickling may not call __new__

2020-04-18 Thread miss-islington
miss-islington added the comment: New changeset 020f2aaaea95aef6f54ab31488926ed76017e41a by Miss Islington (bot) in branch '3.8': bpo-27635: Fix pickle documentation about `__new__` not being called. (GH-19269) https://github.com/python/cpython/commit/020f2aaaea95aef6f54ab31488926ed76017e41a

[issue27635] pickle documentation says that unpickling may not call __new__

2020-04-18 Thread miss-islington
miss-islington added the comment: New changeset 0abb548cc7b239fbe426ca9e00968130e53ffc98 by Miss Islington (bot) in branch '3.7': bpo-27635: Fix pickle documentation about `__new__` not being called. (GH-19269) https://github.com/python/cpython/commit/0abb548cc7b239fbe426ca9e00968130e53ffc98

[issue27635] pickle documentation says that unpickling may not call __new__

2020-04-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +18923 pull_request: https://github.com/python/cpython/pull/19586 ___ Python tracker ___

[issue27635] pickle documentation says that unpickling may not call __new__

2020-04-18 Thread miss-islington
Change by miss-islington : -- pull_requests: +18922 pull_request: https://github.com/python/cpython/pull/19585 ___ Python tracker ___

[issue27635] pickle documentation says that unpickling may not call __new__

2020-04-18 Thread miss-islington
miss-islington added the comment: New changeset 482259d0dcf27714a84cf56b93977320bea7e093 by Furkan Önder in branch 'master': bpo-27635: Fix pickle documentation about `__new__` not being called. (GH-19269) https://github.com/python/cpython/commit/482259d0dcf27714a84cf56b93977320bea7e093

[issue40321] urllib.request does not support HTTP response status code 308

2020-04-18 Thread Jochem Schulenklopper
New submission from Jochem Schulenklopper : urllib.request does not yet support HTTP response status code 308, as defined in IETF RFC 7538, https://tools.ietf.org/html/rfc7538. 308 (permanent redirect) is the 307-variant (temporary redirect) of 301 (moved permanently). --

[issue40317] inspect.getsource() examines incorrect target

2020-04-18 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Fixed in master now with https://github.com/python/cpython/commit/696136b993e11b37c4f34d729a0375e5ad544ade . This includes the change of show decorators for classes too to make it consistent with functions so it's not backported. --

[issue15856] inspect.getsource(SomeClass) doesn't show @decorators

2020-04-18 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: New changeset 696136b993e11b37c4f34d729a0375e5ad544ade by Karthikeyan Singaravelan in branch 'master': bpo-35113: Fix inspect.getsource to return correct source for inner classes (#10307)

[issue35113] inspect.getsource returns incorrect source for classes when class definition is part of multiline strings

2020-04-18 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: New changeset 696136b993e11b37c4f34d729a0375e5ad544ade by Karthikeyan Singaravelan in branch 'master': bpo-35113: Fix inspect.getsource to return correct source for inner classes (#10307)

[issue40178] Convert the remaining os funtions to Argument Clinic

2020-04-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 2b5603140c09766a7d4e8243a70d7144f684f6f9 by Serhiy Storchaka in branch 'master': bpo-40178: Convert the remaining os functions to Argument Clinic. (GH-19360) https://github.com/python/cpython/commit/2b5603140c09766a7d4e8243a70d7144f684f6f9

[issue40179] Argument Clinic incorretly translates #elif

2020-04-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue40179] Argument Clinic incorretly translates #elif

2020-04-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset bfda4db0d2c05eef4e4ae90d899d0b67cb2e33e5 by Serhiy Storchaka in branch '3.8': [3.8] bpo-40179: Fix translation of #elif in Argument Clinic (GH-19364) (GH-19583)

[issue40179] Argument Clinic incorretly translates #elif

2020-04-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 67ae454da749a7ca67115b43205d9fe98bea3213 by Serhiy Storchaka in branch '3.7': [3.7] bpo-40179: Fix translation of #elif in Argument Clinic (GH-19364) (GH-19584)

[issue40320] Add ability to specify instance of contextvars context to Task() & asyncio.create_task()

2020-04-18 Thread Jeff Laughlin
New submission from Jeff Laughlin : As a test engineer I want to be able to run async test fixtures and test cases in different async tasks with the same Context. Not a copy; the same specific instance of contextvars.Context(). I do NOT want the task to run in a COPY of the context because I

[issue40179] Argument Clinic incorretly translates #elif

2020-04-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +18921 pull_request: https://github.com/python/cpython/pull/19584 ___ Python tracker ___

[issue40179] Argument Clinic incorretly translates #elif

2020-04-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +18920 pull_request: https://github.com/python/cpython/pull/19583 ___ Python tracker ___

[issue40179] Argument Clinic incorretly translates #elif

2020-04-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 12446e6a605f066d837d3a595d0a73e4f3b43b65 by Serhiy Storchaka in branch 'master': bpo-40179: Fix translation of #elif in Argument Clinic (GH-19364) https://github.com/python/cpython/commit/12446e6a605f066d837d3a595d0a73e4f3b43b65 --

[issue40317] inspect.getsource() examines incorrect target

2020-04-18 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This will be resolved hopefully resolved using https://github.com/python/cpython/pull/10307 . Using my patch on the reproducer in the report. ./python bpo40317.py 123 class Number: payload = 123 321 class Number: payload =

[issue40301] zipfile module: new feature (two lines of code), useful for test, security and forensics

2020-04-18 Thread Massimo Sala
Massimo Sala added the comment: I choosed to use the internal variable *concat* because - if I recollect correctly, it is calculated before successive routines; - I didn't see your solution (!), there is a very nice computed variable in front of my eyes. Mmh 1) Reliability Cannot be sure this

[issue35967] Better platform.processor support

2020-04-18 Thread miss-islington
miss-islington added the comment: New changeset fb940408cea1fb34fed1418832f240f886dadf57 by Chih-Hsuan Yen in branch 'master': bpo-35967: Skip test with `uname -p` on Android (GH-19577) https://github.com/python/cpython/commit/fb940408cea1fb34fed1418832f240f886dadf57 -- nosy:

[issue40301] zipfile module: new feature (two lines of code), useful for test, security and forensics

2020-04-18 Thread Massimo Sala
Massimo Sala added the comment: Sorry I forgot to mention one specific case. We have valid archives with a starting "blob": digitally signed zip files, their filename extension is ".zip.p7m". I agree your tip can be useful to other readers. Best regards, Sala On Sat, 18 Apr 2020 at 15:45,

[issue40257] Improve the use of __doc__ in pydoc

2020-04-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Some work is still needed for HTML output. But this code is so different from the code for plain text output and so complicated that I was afraid to break something. I'll rewrite it in separate issue. -- resolution: -> fixed stage: patch review

[issue40257] Improve the use of __doc__ in pydoc

2020-04-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 7e64414f57b70dc5bc0ab19a3162a0735f9bfabf by Serhiy Storchaka in branch 'master': bpo-40257: Improve help for the typing module (GH-19546) https://github.com/python/cpython/commit/7e64414f57b70dc5bc0ab19a3162a0735f9bfabf --

[issue40301] zipfile module: new feature (two lines of code), useful for test, security and forensics

2020-04-18 Thread Daniel Hillier
Daniel Hillier added the comment: Hi Massimo, Unless I'm missing something about your requirements, the advantage is that it already works in python 2.7 so there is no need to patch Python. Just bundle the above function with your analysis tool and you're good to go. Cheers, Dan On Sat, Apr

[issue40301] zipfile module: new feature (two lines of code), useful for test, security and forensics

2020-04-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Just check the first 4 bytes of the file. In "normal" ZIP archive they are b'PK\3\4' (or b'PK\5\6' if it is empty). It is so reliable as checking the offset, and more efficient. It is even more reliable, because a malware can have zero ZIP archive offset,

[issue40301] zipfile module: new feature (two lines of code), useful for test, security and forensics

2020-04-18 Thread Massimo Sala
Massimo Sala added the comment: Hi Daniel Could you please elaborate the advantages of your loop versus my two lines of code? I don't grasp... Thanks, Massimo On Sat, 18 Apr 2020 at 03:26, Daniel Hillier wrote: > > Daniel Hillier added the comment: > > Could something similar be achieved

[issue40301] zipfile module: new feature (two lines of code), useful for test, security and forensics

2020-04-18 Thread Massimo Sala
Massimo Sala added the comment: Hi Serhiy Thanks for the suggestion but I don't need to analyse different self-extraction payloads (and I think it is always unreliable, there are too many self-extractors in the wild). I spend two words about my work. I analyze ZIP archives because they are

[issue40319] dict.update() return the updated dict instead of None

2020-04-18 Thread SilentGhost
SilentGhost added the comment: This looks like a proposed "enhancement" rather than a bug report. Unfortunately, this is not possible for a myriad of reasons, from backward compatibility to overall use of mutating methods in Python. -- nosy: +SilentGhost resolution: -> rejected

[issue40301] zipfile module: new feature (two lines of code), useful for test, security and forensics

2020-04-18 Thread Massimo Sala
Massimo Sala added the comment: On Sat, 18 Apr 2020 at 04:37, Steven D'Aprano wrote: If we made an exception for you, then people using Python 2.7 still couldn't use this feature: `myzipfile.offset` would fail on code using Python 2.7, 2.7.1, 2.7.2, 2.7.3, ... 2.7.17 and only work

[issue40247] Logged out of user when running Tkinter

2020-04-18 Thread J
J added the comment: Thanks for reaching out. I solved the issue following @tcarroll2's solution from: https://github.com/pyenv/pyenv/issues/1375 The issue doesn't occur when using pyenv. It seems that the issue may have been caused by python sticking to the mac provided tkinter (version

[issue40315] Incorrect stacksize in code object

2020-04-18 Thread Skip Montanaro
Skip Montanaro added the comment: Thanks, Serhiy. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue40319] dict.update() return the updated dict instead of None

2020-04-18 Thread Dong-hee Na
Dong-hee Na added the comment: Python 3.8.2+ (heads/3.8:c496e29c2b, Apr 18 2020, 21:42:41) [Clang 11.0.3 (clang-1103.0.32.29)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> a = {"test": 1} >>> b = {"type": 2} >>> c = a.update(b) >>> print(c) None

[issue40319] dict.update() return the updated dict instead of None

2020-04-18 Thread Dong-hee Na
Dong-hee Na added the comment: Python 3.9.0a5+ (heads/master:c606624af8, Apr 18 2020, 18:42:51) [Clang 11.0.3 (clang-1103.0.32.29)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> a = {"test": 1} >>> b = {"type": 2} >>> c = a.update(b) >>> print(c) None on

[issue40319] dict.update() return the updated dict instead of None

2020-04-18 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Can you please print the output of python -v? Using python 3.8.0 on Linux returns None for update method. -- ___ Python tracker

[issue40318] Migrate to SQLite3 trace v2 API

2020-04-18 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- pull_requests: +18919 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19581 ___ Python tracker ___

[issue40319] dict.update() return the updated dict instead of None

2020-04-18 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40318] Migrate to SQLite3 trace v2 API

2020-04-18 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- nosy: +ghaering ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40319] dict.update() return the updated dict instead of None

2020-04-18 Thread AL3X_69
New submission from AL3X_69 : When a dict is updated with update(), instead of return None, it will return the updated dict. example: >>> a = {"test": 1} >>> b = {"type": 2} >>> c = a.update(b) >>> print(c) {"test": 1, "type": 1} -- messages: 366703 nosy: AL3X_69 priority: normal

[issue40318] Migrate to SQLite3 trace v2 API

2020-04-18 Thread Erlend Egeberg Aasland
Change by Erlend Egeberg Aasland : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40318] Migrate to SQLite3 trace v2 API

2020-04-18 Thread Erlend Egeberg Aasland
New submission from Erlend Egeberg Aasland : Currently, we're using the sqlite3_trace() for tracing statements. This API was been superseded by sqlite3_trace_v2() in SQLite3 v3.14 back in August 2016. Proposing to migrate to the new API, which allows more fine grained control over what to

[issue40317] inspect.getsource() examines incorrect target

2020-04-18 Thread Grzegorz Krasoń
New submission from Grzegorz Krasoń : Based on the attached example: Expected output: ``` 123 class Number: payload = 123 321 class Number: payload = 321 ``` Actual output: ``` 123 class Number: payload = 123 321 class Number: payload = 123 ```

[issue40316] Add zero function to time, datetime, which acts as the use case of replace to limit resolution

2020-04-18 Thread Or Toledano
Or Toledano added the comment: The use-case for this method is to "limit" the resolution of a time object. I encountered the need for it when I needed to reduce the resolution of some timestamps, to compare them with timestamps of lesser resolution. I found the following SOF post:

[issue40316] Add zero function to time, datetime, which acts as the use case of replace to limit resolution

2020-04-18 Thread SilentGhost
SilentGhost added the comment: What is the use-case for this new method? -- nosy: +SilentGhost ___ Python tracker ___ ___

[issue40028] Math module method to find prime factors for non-negative int n

2020-04-18 Thread Ross Rhodes
Ross Rhodes added the comment: Unable to dedicate time to this issue under the change of circumstances. Happy for someone else to re-open this if they take an interest in picking up this work. -- resolution: -> postponed stage: needs patch -> resolved status: open -> closed

[issue40316] Add zero function to time, datetime, which acts as the use case of replace to limit resolution

2020-04-18 Thread Or Toledano
Or Toledano added the comment: https://github.com/python/cpython/pull/19580 -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue40316] Add zero function to time, datetime, which acts as the use case of replace to limit resolution

2020-04-18 Thread Or Toledano
New submission from Or Toledano : I propose the zero(time_unit) function, which replaces all time units with greater equal resolution than time_unit by 0. E.g. >>> datetime.datetime(2020, 4, 18, 12, 27, 30, 500).zero("second") datetime.datetime(2020, 4, 18, 12, 27) I purpose it for the

[issue40316] Add zero function to time, datetime, which acts as the use case of replace to limit resolution

2020-04-18 Thread Or Toledano
Change by Or Toledano : -- keywords: +patch pull_requests: +18918 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19580 ___ Python tracker ___

[issue40301] zipfile module: new feature (two lines of code), useful for test, security and forensics

2020-04-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am not sure it would help you. There are legitimate files which contain a payload followed by the ZIP archive (self-extracting archives, programs with embedded ZIP archives). And the malware can make the offset of the ZIP archive be zero. If you want

[issue40315] Incorrect stacksize in code object

2020-04-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The stack size is correct. The unreachable code is left because some code (in particularly the lineno setter of the frame object) depends on instructions which may be in the unreachable code to determines the boundaries of programming blocks. It is safer

[issue1490384] PC new-logo-based icon set

2020-04-18 Thread SilentGhost
Change by SilentGhost : -- pull_requests: -16955 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: