[issue33080] regen-importlib is causing build races against other regen-all targets in Makefile.pre.in

2021-12-07 Thread Alexander Kanavin
Alexander Kanavin added the comment: We have long ago updated to a much newer python and removed the workaround, so the whatever the issue was, it is completely obsolete. Thanks! -- resolution: -> works for me stage: -> resolved status: open -&g

[issue33080] regen-importlib is causing build races against other regen-all targets in Makefile.pre.in

2021-12-07 Thread Alexander Kanavin
Alexander Kanavin added the comment: (removed both the workaround, and regen-all itself) -- ___ Python tracker <https://bugs.python.org/issue33080> ___ ___ Pytho

[issue38529] Python 3.8 improperly warns about closing properly closed streams

2019-11-13 Thread Alexander Mohr
Change by Alexander Mohr : -- nosy: +thehesiod ___ Python tracker <https://bugs.python.org/issue38529> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30155] Add ability to get/set tzinfo on datetime instances in C API

2019-12-09 Thread Alexander Belopolsky
Change by Alexander Belopolsky : -- dependencies: +Add timezone support to datetime C API ___ Python tracker <https://bugs.python.org/issue30155> ___ ___ Pytho

[issue39134] can't construct dataclass as ABC (or runtime check as data protocol)

2019-12-25 Thread Alexander Hirner
New submission from Alexander Hirner : At runtime, we want to check whether objects adhere to a data protocol. This is not possible due to problematic interactions between ABC and @dataclass. The attached file tests all relevant yet impossible cases. Those are: 1) A(object): Can't chec

[issue39134] can't construct dataclass as ABC (or runtime check as data protocol)

2019-12-26 Thread Alexander Hirner
Alexander Hirner added the comment: Here, nothing but less boiler plate. Wouldn't it pay off to not rewrite dataclass features like frozen, replace, runtime refelection and the ability to use dataclass aware serialization libraries (e.g. pydantic)? I think @dataclass+@abstractpro

[issue39134] can't construct dataclass as ABC (or runtime check as data protocol)

2019-12-27 Thread Alexander Hirner
Alexander Hirner added the comment: Pardon my sloppiness. 1. That should have been PEP 544. The last point referred to the notion of data protocols [0]. 2. I think solving this issue for dataclasses would ensure better composition with modern libraries and other idioms like Protocol and

[issue39134] can't construct dataclass as ABC (or runtime check as data protocol)

2019-12-28 Thread Alexander Hirner
Alexander Hirner added the comment: We construct a computational graph and need to validate (or search for possible new) edges at runtime. The data is specific to computer vision. One example is clipping geometry within 2D boundaries. A minimal implementation of this data would be

[issue39134] can't construct dataclass as ABC (or runtime check as data protocol)

2020-01-01 Thread Alexander Hirner
Alexander Hirner added the comment: Dropping ABCMeta stops at instantiation. This should be in the dataclass code that's been generated. File "", line 2, in __init__ AttributeError: can't set attribute Repro: ``` class QuasiABC: @property @abstractmethod

[issue39134] can't construct dataclass as ABC (or runtime check as data protocol)

2020-01-02 Thread Alexander Hirner
Alexander Hirner added the comment: This results in E(x=None). I'd need to look into that to understand why. -- Added file: https://bugs.python.org/file48817/dc2_repro.py ___ Python tracker <https://bugs.python.org/is

[issue39134] can't construct dataclass as ABC (or runtime check as data protocol)

2020-01-18 Thread Alexander Hirner
Alexander Hirner added the comment: In that case, what should the getter return? It doesn't know about the implementation of x. Maybe I'm not getting the idea behind adding getters/setters. -- ___ Python tracker <https://bu

[issue39540] Logging docs don't address the creation of multiple loggers when a hierarchy is provided

2020-02-03 Thread Alexander McFarlane
New submission from Alexander McFarlane : If `logger_name` is a hierarchy format (e.g. `logger_name = 'parent.child'`) and the logger name `'parent'` has not been created, the function call `logging.getLogger(logger_name)` will create all loggers in the hierarchy (i

[issue39549] The reprlib.Repr type should permit the “fillvalue” to be set by the user

2020-02-03 Thread Alexander Böhn
New submission from Alexander Böhn : Currently, the `reprlib.recursive_repr(…)` decorator allows a “fillvalue” parameter to be specified by the user. This is a string value that is used as a placeholder when calculating an objects’ repr – in the case of `recursive_repr(…)` the “fillvalue

[issue39549] The reprlib.Repr type should permit the “fillvalue” to be set by the user

2020-02-03 Thread Alexander Böhn
Change by Alexander Böhn : -- keywords: +patch pull_requests: +17716 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18343 ___ Python tracker <https://bugs.python.org/issu

[issue39549] The reprlib.Repr type should permit the “fillvalue” to be set by the user

2020-02-04 Thread Alexander Böhn
Change by Alexander Böhn : -- components: +Tests ___ Python tracker <https://bugs.python.org/issue39549> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39680] datetime.astimezone() method does not handle invalid local times as required by PEP 495

2020-02-18 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : Let g be a an invalid time in New York spring-forward gap: >>> g = datetime(2020, 3, 8, 2, 30) According to PEP 495, conversion of such instance to UTC should return a value that corresponds to a valid local time greater than g, but

[issue26460] datetime.strptime without a year fails on Feb 29

2020-03-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > On Mar 2, 2020, at 6:33 PM, Gregory P. Smith wrote: > > Change that default to any old year with a leap year (1904?) In the 21st century, the year 2000 default makes much more sense than 1900. Luckily 2000 is also a

[issue31652] make install fails: no module _ctypes

2020-03-05 Thread Alexander Stohr
Alexander Stohr added the comment: Ubuntu 16.04 in a very bare naked setup. Similar/same problem profile by message and other lines in the log. Installed libffi6 and libffi-dev => worked. Not sure if both were needed (or interdependent, 2nd to 1st). -- nosy: +Alexander St

[issue39970] Combined behavior of datetime.datetime.timestamp() and datetime.datetime.utcnow() on non-UTC timezoned machines

2020-03-15 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am sure this has been reported before – I will try to find the relevant issue. This behavior is correct and documented. The only improvement that we can consider is to make it more explicit that utcnow is deprecated and the correct way to obtain

[issue39970] Combined behavior of datetime.datetime.timestamp() and datetime.datetime.utcnow() on non-UTC timezoned machines

2020-03-15 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This is a duplicate of issue 33293. -- superseder: -> Using datetime.datetime.utcnow().timestamp() in Python3.6.0 can't get correct UTC timestamp. ___ Python tracker <https://bugs.python.org

[issue39970] Combined behavior of datetime.datetime.timestamp() and datetime.datetime.utcnow() on non-UTC timezoned machines

2020-03-15 Thread Alexander Belopolsky
Change by Alexander Belopolsky : -- resolution: wont fix -> duplicate ___ Python tracker <https://bugs.python.org/issue39970> ___ ___ Python-bugs-list mai

[issue25878] CPython on Windows builds with /W3, not /W4

2020-03-19 Thread Alexander Riccio
Alexander Riccio added the comment: Ok, so I finally have some proper time to work on this. How would people (who are higher up in python than me, obviously) feel about suppressing most of the warnings via a user macro in Visual Studio? I've found that it's quite easy to add a ma

[issue40020] growable_comment_array_add leaks, causes crash

2020-03-19 Thread Alexander Riccio
New submission from Alexander Riccio : growable_comment_array_add in parsetok.c incorrectly uses realloc, which leaks the array when allocation fails, and then causes a null pointer deref crash later when the array is freed in growable_comment_array_deallocate (the array pointer is

[issue40020] growable_comment_array_add leaks, causes crash

2020-03-19 Thread Alexander Riccio
Alexander Riccio added the comment: Sidenote: visual studio was misleading and made this look like a use-after-free for a little while, which was interesting. -- nosy: +pablogsal ___ Python tracker <https://bugs.python.org/issue40

[issue40020] growable_comment_array_add leaks, causes crash

2020-03-19 Thread Alexander Riccio
Change by Alexander Riccio : -- keywords: +patch pull_requests: +18442 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19083 ___ Python tracker <https://bugs.python.org/issu

[issue19462] Add remove_argument() method to argparse.ArgumentParser

2020-03-23 Thread Alexander Hirner
Alexander Hirner added the comment: @paul j3 FWIW, popping optionals from a cache that is maintained in addition to self._actions, makes special conflict handling unnecessary. i.e.: for option_string in a.option_strings: parser._option_string_actions.pop(option_string

[issue40076] isoformat function drops microseconds part if its value is 000000

2020-03-26 Thread Alexander Bolshakov
New submission from Alexander Bolshakov : isoformat function does not conform to the ISO 8601 and drops microseconds part if its value is 00. The issue can be reproduced using the following code snippet: for i in range(1,1000): timestamp=datetime.datetime.utcnow().isoformat

[issue40076] isoformat function drops microseconds part if its value is 000000

2020-03-26 Thread Alexander Bolshakov
Change by Alexander Bolshakov : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue40079] NULL pointer deref on error path in _ssl debughelpers.c

2020-03-26 Thread Alexander Riccio
New submission from Alexander Riccio : At line 138 in debughelpers.c, ssl_obj, which was set to NULL on line 122, is dereferenced. I think the original intent was to actually bubble the error up through the ssl object. Full function: static void _PySSL_keylog_callback(const SSL *ssl

[issue40082] Assertion failure in trip_signal

2020-03-26 Thread Alexander Riccio
New submission from Alexander Riccio : While trying to make sense of some static analysis warnings for the Windows console IO module, I Ctrl+C'd in the middle of an intentionally absurd __repr__ output, and on proceeding in the debugger (which treated it as an exception), I immediatel

[issue40082] Assertion failure in trip_signal

2020-03-26 Thread Alexander Riccio
Alexander Riccio added the comment: Lmao the name mangling comes up as a mailto. That's interesting. -- ___ Python tracker <https://bugs.python.org/is

[issue40082] Assertion failure in trip_signal

2020-03-26 Thread Alexander Riccio
Alexander Riccio added the comment: Hmmm, happens every time I interrupt while attached. Is there some obvious gotcha in the docs that I'm missing? -- ___ Python tracker <https://bugs.python.org/is

[issue40020] growable_comment_array_add leaks, causes crash

2020-03-31 Thread Alexander Riccio
Alexander Riccio added the comment: Sure, should I open a new issue? -- nosy: -vstinner resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue25878] CPython on Windows builds with /W3, not /W4

2020-03-31 Thread Alexander Riccio
Alexander Riccio added the comment: Ok, so a draft of this produces 34 warnings, but makes way more changes to the .vcxproj and .filters files than I think it should: https://github.com/ariccio/cpython/commit/60152aa065a3ad861f0359a8ada7f2fbc83a3933 Before I submit a PR, I think I should

[issue40143] shutil.rmtree will frequently fail on Windows under heavy load due to racy deletion

2020-04-01 Thread Alexander Riccio
New submission from Alexander Riccio : The "obvious" way to delete a directory tree on Windows is wrong. It's inherently racy, since deleting a file on Windows *doesn't actually delete it*, instead it marks the file for deletion. The system will eventually get around

[issue40145] Pyshellext room for binary size improvement

2020-04-01 Thread Alexander Riccio
New submission from Alexander Riccio : I've tweaked the pcbuild options for pyshellext to reduce the size of the binary. Since this is a very simple component, there really isn't much benefit of optimizing for speed, likely the slowest part of this component's lifetime is si

[issue40145] Pyshellext room for binary size improvement

2020-04-01 Thread Alexander Riccio
Change by Alexander Riccio : -- keywords: +patch pull_requests: +18642 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19284 ___ Python tracker <https://bugs.python.org/issu

[issue40145] Pyshellext room for binary size improvement

2020-04-01 Thread Alexander Riccio
Alexander Riccio added the comment: If this patch is merged, and all 7 million (estimated) Python developers update their installation, I calculate that I just saved the PSF 119GB worth of bandwidth costs :) I'll take my 10 cents in the mail plea

[issue40150] (minor) mismatched argument in overlapped_RegisterWaitWithQueue call to RegisterWaitForSingleObject

2020-04-01 Thread Alexander Riccio
New submission from Alexander Riccio : This popped out at me while looking for something else. It's probably not much of an actual problem, since the wrong datatype is larger than the correct one, but it's worth fixing. The problem is in overlapped_RegisterWaitWithQueue, at overla

[issue40151] _overlapped room for improvement

2020-04-01 Thread Alexander Riccio
New submission from Alexander Riccio : Similarly to bpo-40145, I've tweaked build options to reduce the size of the binary. This patch turns on (for release builds) Whole Program Optimization, MinSpace optimization, /Ob2 AnySuitable function inlining, /Zo (so that people can still deb

[issue40151] _overlapped room for improvement

2020-04-01 Thread Alexander Riccio
Change by Alexander Riccio : -- keywords: +patch pull_requests: +18658 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19298 ___ Python tracker <https://bugs.python.org/issu

[issue40145] Pyshellext room for binary size improvement

2020-04-01 Thread Alexander Riccio
Change by Alexander Riccio : -- pull_requests: +18659 pull_request: https://github.com/python/cpython/pull/19298 ___ Python tracker <https://bugs.python.org/issue40

[issue40161] Name collisions in pythoncore, preventing unity/jumbo build

2020-04-02 Thread Alexander Riccio
New submission from Alexander Riccio : This isn't a priority issue I'd say. However, fixing it could yield nice benefits. I ran into this while experimenting with JUMBO/Unity builds as part of a bit of fun I've been having tweaking build options across the CPython ecosystem.

[issue40145] Pyshellext room for binary size improvement

2020-04-03 Thread Alexander Riccio
Alexander Riccio added the comment: Ahh, ok. Even though I question the usefulness of manually maintaining MSBuild files instead of something like CMake, I can work with that. Is there a preferred way to do it? It looks like I can do a Condition="'$(Configuration)|$(Platform)'

[issue40145] Pyshellext room for binary size improvement

2020-04-03 Thread Alexander Riccio
Alexander Riccio added the comment: Oh, uh, also, do you prefer I add a commit or a new branch & PR? -- ___ Python tracker <https://bugs.python.org/iss

[issue40550] Popen.terminate fails with ProcessLookupError under certain conditions

2020-05-07 Thread Alexander Overvoorde
New submission from Alexander Overvoorde : The following program frequently raises a ProcessLookupError exception when calling proc.terminate(): ``` import threading import subprocess import multiprocessing proc = subprocess.Popen(["sh", "-c", "exit 0"]) q

[issue40550] Popen.terminate fails with ProcessLookupError under certain conditions

2020-05-08 Thread Alexander Overvoorde
Alexander Overvoorde added the comment: I'm not sure that it is expected since Popen.send_signal does contain the following check: ``` def send_signal(self, sig): """Send a signal to the process.""" # Skip signalling a process that we know has alre

[issue40550] Popen.terminate fails with ProcessLookupError under certain conditions

2020-05-08 Thread Alexander Overvoorde
Alexander Overvoorde added the comment: I understand that it's not a perfect solution, but at least it's a little bit closer. Thanks for your patch :) -- ___ Python tracker <https://bugs.python.o

[issue25538] Traceback from __exit__ method is misleading

2020-11-27 Thread Alexander Kurakin
Change by Alexander Kurakin : -- nosy: +kuraga ___ Python tracker <https://bugs.python.org/issue25538> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42538] AsyncIO strange behaviour

2020-12-02 Thread Alexander Greckov
New submission from Alexander Greckov : Hi! I've met strange behaviour related to the coroutine execution. Probably it's somehow related to the asyncio.Queue get() method. I have the following lines of code: class WeightSource: def __init__(self): self._queue = asy

[issue42538] AsyncIO strange behaviour

2020-12-02 Thread Alexander Greckov
Alexander Greckov added the comment: Thanks! That's resolved my problem, but this thing wasn't really obvious as for me. Probably it would be better to write about this explicitly in docs for the create_task. All in all this issue can

[issue42958] filecmp.cmp(shallow=True) isn't actually shallow when only mtime differs

2021-01-18 Thread Alexander Vandenbulcke
New submission from Alexander Vandenbulcke : Consider the case where 2 files are shallow compared where only the mtime differs (i.e. the mode and size is identical). With filecmp.cmp(f1, f2, shallow=True) a deep compare would be performed behind the scenes since the guard clauses fell

[issue42958] filecmp.cmp(shallow=True) isn't actually shallow when only mtime differs

2021-01-18 Thread Alexander Vandenbulcke
Change by Alexander Vandenbulcke : -- keywords: +patch pull_requests: +23067 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24246 ___ Python tracker <https://bugs.python.org/issu

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

2021-01-29 Thread Alexander Stepanov
Alexander Stepanov added the comment: Another victim of this change in `venv` behavior is Ray, which hangs forever because the workers fail to register as parent does not recognize their PIDs. https://github.com/ray-project/ray/issues/13794 -- nosy: +nirvana-msu

[issue42938] [security][CVE-2021-3177] ctypes double representation BoF

2021-02-22 Thread Alexander Riccio
Alexander Riccio added the comment: Petition to remove all uses of the unchecked string handling functions from CPython? Sidenote: if C4996 was on, this would be a warning. -- nosy: +Alexander Riccio ___ Python tracker <https://bugs.python.

[issue42938] [security][CVE-2021-3177] ctypes double representation BoF

2021-02-22 Thread Alexander Riccio
Alexander Riccio added the comment: Yes, I definitely should. I work on https://bugs.python.org/issue25878 sometimes, which encompasses this. -- ___ Python tracker <https://bugs.python.org/issue42

[issue35935] threading.Event().wait() not interruptable with Ctrl-C on Windows

2021-03-03 Thread Alexander Grigoriev
Alexander Grigoriev added the comment: @ericsun: Windows calls the console event handler in a separate thread. The console event handler receives CTRL_C_EVENT, CTRL_BREAK_EVENT, console close, logoff, system shutdown events. Originally, Windows devised an APC mechanism to simulate

[issue36098] asyncio: ssl client-server with "slow" read

2020-06-24 Thread Alexander Mohr
Change by Alexander Mohr : -- nosy: +thehesiod ___ Python tracker <https://bugs.python.org/issue36098> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36098] asyncio: ssl client-server with "slow" read

2020-06-24 Thread Alexander Mohr
Alexander Mohr added the comment: as an FYI I've reproduced this with the httpx library as well: https://repl.it/repls/PristineBonyBugs#main.py. It reproduces on this site but I've been unable to reproduce it locally. It does always reproduce on our production systems. what

[issue36098] asyncio: ssl client-server with "slow" read

2020-06-24 Thread Alexander Mohr
Alexander Mohr added the comment: I've updated https://repl.it/@thehesiod/PristineBonyBugs#main.py to contain both httpx + aiohttp testcases, and now httpx reproduces almost immediately and aiohttp is still ok -- ___ Python tracker &

[issue36098] asyncio: ssl client-server with "slow" read

2020-06-24 Thread Alexander Mohr
Alexander Mohr added the comment: so I did some investigation into the difference between aiohttp + httpx and it appears that for some reason httpx does an extra read after the connection is closed. -- ___ Python tracker <https://bugs.python.

[issue41322] unittest: Generator test methods will always be marked as passed

2020-07-17 Thread Alexander Hungenberg
New submission from Alexander Hungenberg : The following testcase will always be marked as passed: from unittest import TestCase class BuggyTestCase(TestCase): def test_generator(self): self.assertTrue(False) yield None It happened to us that someone accidentally made

[issue41322] unittest: Generator test methods will always be marked as passed

2020-07-17 Thread Alexander Hungenberg
Alexander Hungenberg added the comment: I would also strongly vote for raising an error if the test method is a generator - not even silently turn it into a list. It would be straight forward to implement various checks (like the ones you mentioned for generators, coroutines, ...) - and

[issue41450] OSError is not documented in ssl library, but still can be thrown

2020-07-31 Thread Alexander Sibiryakov
New submission from Alexander Sibiryakov : See stack trace [07/15/2020 08:51:14.799: ERROR/kafka.producer.sender] Uncaught error in kafka producer I/O thread Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/kafka/producer/sender.py", line

[issue41560] pathlib.Path.glob fails on empty string

2020-08-15 Thread Alexander Heger
New submission from Alexander Heger : Passing an empty string to pathlib.Path.glob fails. Example ``` from pathlib import Path path = Path('./myfile.txt') path.glob('') ``` The result is: ``` ~/Python/lib/python3.8/pathlib.py in glob(self, pattern) 1129 "

[issue41560] pathlib.Path.glob fails on empty string

2020-08-17 Thread Alexander Heger
Alexander Heger added the comment: In my code, having been translated form use of `os.path` to `pathlib.Path` the change in behaviour caused errors and required significant refactoring. Why not just return the empty list if there is no match, as is done in other cases when there is no

[issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs

2020-08-19 Thread Alexander Boeckmann
Alexander Boeckmann added the comment: Hey! I have the exact same thing as described happening! Python freezes when I try to save new files which sucks. I'm on Catalina: 10.15.6 IDLE: 3.8.5 Brand new MacBook Air As said earlier the only way out is to force quit. Would taking a video

[issue40553] Python 3.8.2 Mac freezing/not responding when saving new programs

2020-08-27 Thread Alexander Boeckmann
Alexander Boeckmann added the comment: So over the past week the issue resolved its self. I unfortunately did not get a video or a screenshot but thought you might want to know this So maybe Apple did something or you guys fixed it. Anyways, have a good day

[issue41965] distutils.spawn.find_executable() fails to find .py files on Windows

2020-10-07 Thread Alexander Todorov
New submission from Alexander Todorov : As part of installing python-bugzilla via pip it searches for `rst2man` or `rst2man.py`, see: https://github.com/python-bugzilla/python-bugzilla/blob/master/setup.py#L81 on Windows venvs there is venv\Scripts\rst2man.py (no .exe or without suffix) and

[issue41965] distutils.spawn.find_executable() fails to find .py files on Windows

2020-10-07 Thread Alexander Todorov
Alexander Todorov added the comment: @Eryk Sun, you are of course correct but still don't we need to handle this in Python? - find_executable() will search for rst2man.py.exe which doesn't exist so no good for the user - there is also no rst2man.exe which is probably an issu

[issue41904] datetime.datetime.today makes no sense and should be removed

2020-10-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I agree that having some of datetime.now([tz]) functionality replicated in datetime.today() makes little sense. However, the presence of this method in datetime class is a consequence of datetime being a subclass of the date class. The latter was a

[issue41904] datetime.datetime.today makes no sense and should be removed

2020-10-14 Thread Alexander Belopolsky
Change by Alexander Belopolsky : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42372] A crash in do_richcompare

2020-11-16 Thread Alexander Kurakin
New submission from Alexander Kurakin : Sometimes test.py causes a crash in 3.7.9 (and lower to 2018 year or more) on Linux. See also: https://github.com/pandas-dev/pandas/issues/21968 -- components: Interpreter Core files: issue.zip messages: 381113 nosy: kuraga priority: normal

[issue42372] A crash in do_richcompare

2020-11-16 Thread Alexander Kurakin
Alexander Kurakin added the comment: Thanks for reply! Is it call of NULL? If so, shoudn't do_richcompare check it? -- ___ Python tracker <https://bugs.python.org/is

[issue42372] A crash in do_richcompare

2020-11-18 Thread Alexander Kurakin
Alexander Kurakin added the comment: Ok, close. -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue42372> ___ __

[issue13882] Add format argument for time.time(), time.clock(), ... to get a timestamp as a Decimal object

2012-01-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Can we pick an API for this functionality that does not follow the worst of design anti-patterns? Constant arguments, varying return type, hidden import, and the list can go on. What is wrong with simply creating a new module, say "hirestime&

[issue13882] Add format argument for time.time(), time.clock(), ... to get a timestamp as a Decimal object

2012-01-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Fri, Jan 27, 2012 at 5:17 PM, Antoine Pitrou wrote: > Well, creating a separate module is an anti-pattern in itself. calendar vs. > time vs. datetime, anyone? Are you serious? Since the invention of structural programming, creating a separate

[issue13882] Add format argument for time.time(), time.clock(), ... to get a timestamp as a Decimal object

2012-01-27 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +mark.dickinson ___ Python tracker <http://bugs.python.org/issue13882> ___ ___ Python-bugs-list mailing list Unsub

[issue13906] mimetypes.py under windows - bad exception catch

2012-01-29 Thread Alexander Maksimenko
New submission from Alexander Maksimenko : mimetypes.py(249) expectts Unicode*En*codeError, but Unicode*De*codeError happens when registry has non latin symbols (Vista Home 64). I just change cathc jn next line to UnicodeDecodeError and all now works fine. But may be error not here, but on

[issue13882] Add format argument for time.time(), time.clock(), ... to get a timestamp as a Decimal object

2012-01-30 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Sun, Jan 29, 2012 at 6:42 PM, STINNER Victor wrote: .. > What do you call a constant argument? "float" and "decimal"? > You would prefer a constant like time.FLOAT_FORMAT? > Or maybe a boolean (decimal=True)? Yes. This wa

[issue13882] Add format argument for time.time(), time.clock(), ... to get a timestamp as a Decimal object

2012-01-30 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Jan 30, 2012 at 6:15 PM, STINNER Victor wrote: > Another possibility is what I proposed before in the issue #11457: take a > callback argument. > http://bugs.python.org/issue11457#msg143738 I think you are over-engineering a co

[issue13936] datetime.time(0, 0, 0) evaluates to False despite being a valid time

2012-02-03 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This is by design. I don't have a reference, but I do remember this being discussed. Suggestions for improving the documentation are welcome. -- ___ Python tracker <http://bugs.python.org/is

[issue10049] Add a "no-op" (null) context manager to contextlib

2012-02-08 Thread Alexander Jones
Alexander Jones added the comment: Not having this as a standard idiom makes it very tempting to just do copy-paste coding as in hniksic's example. Who likes to invent their own library for generic language-supporting idioms? What about an alternative of giving NoneType empty enter and

[issue10049] Add a "no-op" (null) context manager to contextlib

2012-02-10 Thread Alexander Jones
Alexander Jones added the comment: That's very reassuring. Thanks, Nick! -- ___ Python tracker <http://bugs.python.org/issue10049> ___ ___ Python-bugs-list m

[issue14083] Use local timezone offset by default in datetime.timezone

2012-02-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The problem with this idea is that while evaluating datetime.datetime.now(datetime.timezone()), python will have to query the real time clock twice (first in timezone() and then in now()). At a particularly unfortunate time this may result in an error

[issue14157] time.strptime without a year fails on Feb 29

2012-02-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This strikes me as an implementation artifact. There is no reason for time.strptime() to validate date triplets. Applications that require valid dates can use datetime.strptime(). I suggest changing time.strptime() specification to match POSIX

[issue14262] Allow using decimals as arguments to `timedelta`

2012-03-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I am -0 on the feature and -1 on the implementation. Conversion from Decimal to float is explicit by design. Decimal gives the user fine control over rounding issues allowing for either exact arithmetics (trapping inexact operation) or one of several

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Before you invest in a C version, let's discuss whether this feature is desirable. The proposed function implements a very simple and not very common calculation. Note that even dateutil does not provide direct support for this: you are instruct

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Apr 9, 2012 at 6:20 PM, Marc-Andre Lemburg wrote: > Which is wrong, since the start of the first ISO week of a year > can in fact start in the preceeding year... Hmm, the dateutil documentation seems to imply that relativedelta takes c

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Apr 9, 2012 at 6:56 PM, Antoine Pitrou wrote: > This is all a bit moot since we don't have a "relativedelta" in the > stdlib. It is still worthwhile to see how it is done elsewhere. So far, we have dateutil that does not h

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-09 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Mon, Apr 9, 2012 at 7:28 PM, Marc-Andre Lemburg wrote: > You don't really expect anyone to remember such rules, do you ? :-) No, but it is still a one-line function that those who need it can easily implement. I am on the fence here be

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-10 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: On Tue, Apr 10, 2012 at 6:44 AM, Antoine Pitrou wrote: > It's so easy that the patch isn't a one-liner and it seems to still have > bugs wrt. intended behaviour. Unless I miss something, the inverse to isocalendar() is simply from

[issue26952] argparse help formatter crashes

2019-07-07 Thread Alexander Kapshuna
Alexander Kapshuna added the comment: I have a feeling that nesting groups has nothing to do with it. Got same traceback when I forgot to fill my mutually exclusive groups with arguments. import argparse parser = argparse.ArgumentParser() group = parser.add_mutually_exclusive_group

[issue37790] subprocess.Popen() is extremely slow

2019-08-07 Thread Alexander Pyhalov
New submission from Alexander Pyhalov : We've moved illumos-gate wsdiff python tool from Python 2 to Python 3. The tool does the following - for each file from old and new proto area compares file attributes to find differences in binary otput (spawning elfdump, dump and other util

[issue37790] subprocess.Popen() is extremely slow

2019-08-07 Thread Alexander Pyhalov
Alexander Pyhalov added the comment: I've tried to rewrite subporcess.getstatusoutput() usage with subprocess.Popen() and switch to shell=False, it didn't help, so I doubti it getstatusoutput() overhead, it's Popen() issue. -- ___

[issue29097] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6

2017-06-16 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > I just ran the following script to check if there are any folds from > timestamps [0, 86399] in any timezone. Ammar, I am not sure pytz timezones support PEP 495 conventions. Can you repeat your experiment using the latest dateutil

[issue30698] asyncio sslproto do not shutdown ssl layer cleanly

2017-06-19 Thread Alexander Mohr
Changes by Alexander Mohr : -- nosy: +thehesiod ___ Python tracker <http://bugs.python.org/issue30698> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30302] Improve .__repr__ implementation for datetime.timedelta

2017-07-02 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Sorry for being late to the discussion, but please allow me to add a -1 vote. The time.struct_time precedent is indeed comically verbose. Whenever I need to inspect a struct_time, I cast it to a plain tuple Compare >>> time.gmtime(1

[issue30302] Improve .__repr__ implementation for datetime.timedelta

2017-07-02 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +tim.peters ___ Python tracker <http://bugs.python.org/issue30302> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30822] Python implementation of datetime module is not being tested correctly.

2017-07-05 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > Why is it so slow? The tests enabled by "-utzdata" check UTC to local and back conversions at several points around *every* time transition in *every* timezone. On systems with a complete installation of IANA tzdata, this is a lot o

<    13   14   15   16   17   18   19   20   21   22   >