[issue44258] Support PEP 515 for Fraction's initialization from string

2021-05-28 Thread Mark Dickinson
Mark Dickinson added the comment: +1 to the idea: `Decimal`, `float`, `complex` and `int` all understand the underscores; there's no good reason for `Fraction` not to. So yes please to the PR. There should be tests that check that only the underscore rules allowed by `int` and the others

[issue37439] Add random.binomialvariate()

2021-05-25 Thread Mark Dickinson
Mark Dickinson added the comment: Nope, that's the wrong paper. It looks as though this is the right one, but it's hidden behind a paywall: https://dl.acm.org/doi/abs/10.1145/42372.42381 -- ___ Python tracker <https://bugs.python.org/issue37

[issue37439] Add random.binomialvariate()

2021-05-25 Thread Mark Dickinson
Mark Dickinson added the comment: I think the NumPy implementation may be from here: https://core.ac.uk/download/pdf/11007254.pdf (though I'm struggling to find a clear citation in the NumPy source) -- ___ Python tracker <https://bugs.python.

[issue33213] crypt function not hashing properly on Mac (uses a specific salt)

2021-05-25 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker <https://bugs.python.org/issue33213> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44115] Improve conversions for fractions

2021-05-13 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue44115> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44080] Bias in random.choices(long_sequence)

2021-05-09 Thread Mark Dickinson
Mark Dickinson added the comment: This is similar to #9025 (for randrange), and in principle the random.choices case without explicit weights could be fixed similarly. But I'm not sure it's worth it, for a couple of reasons: - The problem only really affects "virtual" population

[issue44080] Bias in random.choices(long_sequence)

2021-05-09 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue44080> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44054] 2**53+1 != float(2**53+1)

2021-05-06 Thread Mark Dickinson
Mark Dickinson added the comment: Closing here, since this isn't a bug. But I'd still like to understand better what Stefan meant by "That's also what the code says." -- resolution: -> not a bug stage: -> resolved status

[issue44054] 2**53+1 != float(2**53+1)

2021-05-06 Thread Mark Dickinson
Mark Dickinson added the comment: > I have a vague memory that that's the way it *did* work once upon a time Here we go: https://bugs.python.org/issue513866 And the corresponding commit, from September 2004: https://github.com/python/cpython/commit/307fa78107c39ffda1eb4ad18201d25650354

[issue44054] 2**53+1 != float(2**53+1)

2021-05-06 Thread Mark Dickinson
Mark Dickinson added the comment: > But the way I would have expected this to work is that a comparison of an > integer to a float would first convert the integer to a float I have a vague memory that that's the way it *did* work once upon a time, many many decades ago. But an eq

[issue15443] datetime module has no support for nanoseconds

2021-04-30 Thread Mark Dickinson
Mark Dickinson added the comment: [Alexander] > Is there high enough demand for nanoseconds in datetime and time instances? One need that we've encountered in real code is simply for compatibility. We have Python code that interacts with a logging web service whose timestamps incl

[issue43966] F String bugs with numpy.float32

2021-04-28 Thread Mark Dickinson
Mark Dickinson added the comment: See https://github.com/numpy/numpy/issues/10645. I'll close here (this tracker is for core Python, and NumPy isn't part of core Python). -- nosy: +mark.dickinson resolution: -> third party stage: -> resolved status: open -&g

[issue32891] Add 'Integer' as synonym for 'Integral' in numbers module.

2021-04-26 Thread Mark Dickinson
Mark Dickinson added the comment: Sorry, Sergey: I don't have the time, energy or inclination for an extended discussion here, so I'll simply record my -1 for the proposed change and move on. If you want to push this change through, the way forward would likely be to find a core developer

[issue43940] int casting to float results to a different value in memory

2021-04-26 Thread Mark Dickinson
Mark Dickinson added the comment: > Is there any workaround? Sorry, I can't answer that without knowing what it is you're trying to do - that is, I don't know which part of the behaviour you want a workaround for. But that's getting off topic for this tracker, which is for bug report

[issue43940] int casting to float results to a different value in memory

2021-04-26 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> not a bug status: open -> pending ___ Python tracker <https://bugs.python.org/issue43940> ___ ___ Python-bugs-

[issue43940] int casting to float results to a different value in memory

2021-04-26 Thread Mark Dickinson
Mark Dickinson added the comment: There's an implicit float-to-double conversion here (`fp.contents.value` is represented as a Python float, which is backed by a C double). What you're seeing is that converting the single-precision signaling NaN to double precision loses the signaling bit

[issue43932] f-string decimal has leading space

2021-04-24 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43932] f-string decimal has leading space

2021-04-24 Thread Mark Dickinson
Mark Dickinson added the comment: This is by design, and documented under the "sign" section here: https://docs.python.org/3/library/string.html#format-specification-mini-language The space before ".2f" is an instruction to leave space for a sign, "

[issue32891] Add 'Integer' as synonym for 'Integral' in numbers module.

2021-04-23 Thread Mark Dickinson
Mark Dickinson added the comment: For the record, here's the python-ideas thread: https://mail.python.org/archives/list/python-id...@python.org/thread/AWNTQZ3HHAQ42O2ZHRA3U2US4HGKC2TF/ I'm no longer convinced that this is a good idea. It's the usual difference between "Would it have

[issue43475] Worst-case behaviour of hash collision with float NaN

2021-04-22 Thread Mark Dickinson
Mark Dickinson added the comment: Opened https://github.com/numpy/numpy/issues/18833 -- ___ Python tracker <https://bugs.python.org/issue43475> ___ ___ Pytho

[issue43475] Worst-case behaviour of hash collision with float NaN

2021-04-22 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, Raymond. I'll open something on the NumPy bug tracker, too, since they may want to consider doing something similar for numpy.float64 and friends. -- ___ Python tracker <https://bugs.python.org/issue43

[issue27763] Add complex case to test_builtin abs()

2021-04-22 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> out of date ___ Python tracker <https://bugs.python.org/issue27763> ___ ___ Python-bugs-list mailing list Un

[issue27763] Add complex case to test_builtin abs()

2021-04-22 Thread Mark Dickinson
Mark Dickinson added the comment: Yes, it looks as though we do have tests of the form that Evelyn describes in test_complex (which also seems like the right place for those tests). Closing here. Thanks Sergey for the ping! -- stage: test needed -> resolved status: open ->

[issue43903] round() produces incorrect results with certain values

2021-04-21 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue43903> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42248] Raised exception in Enum keeping user objects alive unnecessarily

2021-04-17 Thread Mark Dickinson
Mark Dickinson added the comment: Thank you for the quick fix! -- ___ Python tracker <https://bugs.python.org/issue42248> ___ ___ Python-bugs-list mailin

[issue43852] [sqlite3] Harden tuple creation

2021-04-15 Thread Mark Dickinson
Mark Dickinson added the comment: Would the code be cleaner if it used PyTuple_Pack? -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue43

[issue43836] range.index doesn't support start/stop optional arguments

2021-04-14 Thread Mark Dickinson
Mark Dickinson added the comment: Duplicate of #28197? -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue43836> ___ ___ Python-bug

[issue3451] Asymptotically faster divmod and str(long)

2021-04-13 Thread Mark Dickinson
Mark Dickinson added the comment: FWIW, I think we should close this; the same comments as in issue 26256 apply. See msg259408 onwards in that discussion. -- ___ Python tracker <https://bugs.python.org/issue3

[issue3451] Asymptotically faster divmod and str(long)

2021-04-13 Thread Mark Dickinson
Mark Dickinson added the comment: > we have implemented a faster algorithm for divmod for big numbers using > Mark's fast_div.py in PyPy Urk! I hope your implementation included a healthy dose of validation, testing and cleanup. :-) (I have no doubts that it did.) I'd consider fast_

[issue43830] (-1) ** 0.5 returns (6.123233995736766e-17+1j) instead of 1j

2021-04-13 Thread Mark Dickinson
Mark Dickinson added the comment: FWIW, if you're specifically interested in complex square roots rather than powers in general, I'd recommend using `cmath.sqrt(value)` rather than `value**0.5` - there are fewer intermediate steps involved in computing `cmath.sqrt`, and the returned value

[issue32466] Fix missing test coverage for fractions.Fraction.__new__

2021-04-11 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, Sergey! Agreed that this can be closed. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43475] Worst-case behaviour of hash collision with float NaN

2021-04-10 Thread Mark Dickinson
Mark Dickinson added the comment: > Why not have hash() return the id() like we do for instances of object? I think that's fine, and IIUC that's what Cong Ma was proposing. It seems like the least invasive potential fix. In principle I find the idea of making NaN a singleton rat

[issue43753] [C API] Add Py_Is(x, y) and Py_IsNone(x) functions

2021-04-07 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue43753> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42248] Raised exception in Enum keeping user objects alive unnecessarily

2021-04-02 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a cut-down example, at the prompt: Python 3.9.2 (default, Mar 31 2021, 05:47:22) [Clang 11.0.3 (clang-1103.0.32.62)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>&g

[issue42248] Raised exception in Enum keeping user objects alive unnecessarily

2021-04-02 Thread Mark Dickinson
Mark Dickinson added the comment: I'm running into this, too, on Python 3.9.2; in my case it's causing segmentation faults in a wxPython-based application. Those segfaults aren't the fault of the reference cycle, of course; they're a result of wxPython being finicky about object cleanup

[issue43682] Make static methods created by @staticmethod callable

2021-03-31 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +rhettinger ___ Python tracker <https://bugs.python.org/issue43682> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43682] Make function wrapped by staticmethod callable

2021-03-31 Thread Mark Dickinson
Mark Dickinson added the comment: Seems like a duplicate of #20309. -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue43682> ___ ___

[issue43603] spam

2021-03-23 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> not a bug stage: -> resolved status: open -> closed title: safgf -> spam type: performance -> ___ Python tracker <https://bugs.pyt

[issue43602] Include Decimal's in numbers.Real

2021-03-23 Thread Mark Dickinson
Mark Dickinson added the comment: > Seems so, for a static typing. But Python is a dynamically typed > language, isn't? I think we're talking at cross purposes. Static and dynamic typing have nothing to do with this. What do you think the result of `1.0 + Decimal(1)` should be, an

[issue43602] Include Decimal's in numbers.Real

2021-03-23 Thread Mark Dickinson
Mark Dickinson added the comment: > I assume, the reason is: there is no lossless conversion to float's (and vice > verse). No, I don't think that's the reason (and in fact we _do_ have lossless conversion of floats to Decimal instances). IMO, the reasons are: - it's not obviou

[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2021-03-21 Thread Mark Dickinson
Mark Dickinson added the comment: Hi Victor, I just noticed the change to dtoa.c in GH-24821. Please could you explain what the benefit of this change was? In general, we need to be very conservative with changes to dtoa.c: it's a complex, fragile, performance-critical piece of code

[issue43580] A Question about List Slice

2021-03-21 Thread Mark Dickinson
Change by Mark Dickinson : -- components: -Regular Expressions ___ Python tracker <https://bugs.python.org/issue43580> ___ ___ Python-bugs-list mailin

[issue43580] A Question about List Slice

2021-03-21 Thread Mark Dickinson
Mark Dickinson added the comment: It's behaving as designed and documented; see the docs here: https://docs.python.org/3/library/stdtypes.html#sequence-types-list-tuple-range (and particularly note 3). In your first example, the first `-1` in `x[1:-1:-1]` is interpreted relative to the end

[issue43520] Make Fraction(string) handle non-ascii slashes

2021-03-20 Thread Mark Dickinson
Mark Dickinson added the comment: Carl: can you say more about the problem that motivated this issue? -- ___ Python tracker <https://bugs.python.org/issue43

[issue42161] Remove private _PyLong_Zero and _PyLong_One variables

2021-03-18 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue42161> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter

2021-03-17 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue40521> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43531] Turtle module does not work

2021-03-17 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43531] Turtle module does not work

2021-03-17 Thread Mark Dickinson
Mark Dickinson added the comment: You have a local file named `turtle.py`, which is conflicting with the standard library `turtle` module. Rename your local file to something else, then you'll be able to import the standard library `turtle` module. -- nosy: +mark.dickinson

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2021-03-17 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue39511> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43520] Fraction only handles regular slashes ("/") and fails with other similar slashes

2021-03-16 Thread Mark Dickinson
Mark Dickinson added the comment: Related: #6632 -- ___ Python tracker <https://bugs.python.org/issue43520> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43520] Fraction only handles regular slashes ("/") and fails with other similar slashes

2021-03-16 Thread Mark Dickinson
Mark Dickinson added the comment: Seems worth noting that Unicode fractions like ⅔ produce a FRACTION SLASH character when normalized: >>> unicodedata.normalize('NFKC', '⅔') '2⁄3' >>> list(map(unicodedata.name, unicodedata.normalize('NFKC', '⅔'))) ['DIGIT TWO', 'FRACTION SL

[issue43520] Fraction only handles regular slashes ("/") and fails with other similar slashes

2021-03-16 Thread Mark Dickinson
Mark Dickinson added the comment: There's a bigger issue here about what characters should be accepted in numeric literals. The Unicode minus sign (U+2212) "−" is also not currently accepted for Fractions or any other built-in numeric type. > but there are other si

[issue43507] Variables in locals scope fails to be printed.

2021-03-16 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> exec docs should note that the no argument form in a local scope is really the two argument form ___ Python tra

[issue43507] Variables in locals scope fails to be printed.

2021-03-16 Thread Mark Dickinson
Mark Dickinson added the comment: I think this is essentially a duplicate of #24800. (Short version, the behaviour is by design, and documented, but there may be scope for clarifying or improving the documentation.) -- nosy: +mark.dickinson

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-03-13 Thread Mark Dickinson
Mark Dickinson added the comment: Re-opening; I believe this issue is still valid. Here's output on a debug build on current master (commit 7591d9455eb37525c832da3d65e1a7b3e6dbf613) on my machine: lovelace:cpython mdickinson$ ./python.exe Python 3.10.0a6+ (remotes/upstream/master:7591d9455e

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-03-13 Thread Mark Dickinson
Mark Dickinson added the comment: @Victor: How does the fix for #37193 solve this issue? I think I'm missing something. -- ___ Python tracker <https://bugs.python.org/issue37

[issue43475] Worst-case behaviour of hash collision with float NaN

2021-03-13 Thread Mark Dickinson
Mark Dickinson added the comment: @Cong Ma: Yes, I'm not worried about performance for the change you're proposing (though as you say, we should benchmark anyway). The performance thoughts were motivated by the idea of making NaN a singleton: adding a check to PyFloat_FromDouble would mean

[issue43475] Worst-case behaviour of hash collision with float NaN

2021-03-13 Thread Mark Dickinson
Mark Dickinson added the comment: > signalling NaNs are quietly silenced on my machine I just tested this assertion, and it appears that I was lying: this doesn't seem to be true. I'm almost *sure* it used to be true, and I'm not sure what changed, and when. (FWIW: Python 3.9.2 f

[issue43475] Worst-case behaviour of hash collision with float NaN

2021-03-13 Thread Mark Dickinson
Mark Dickinson added the comment: > We could make this problem go away by making NaN a singleton. That could work, though we'd annoy anyone who cared about preserving NaN payloads and signs in Python. I don't know if such people exist. Currently the sign is accessible through things l

[issue43475] Worst-case behaviour of hash collision with float NaN

2021-03-11 Thread Mark Dickinson
Mark Dickinson added the comment: > I also wonder if there's security implication for servers that process > user-submitted input Yes, the "malicious actor" scenario is another one to consider. But unlike the string hashing attack, I'm not seeing a realistic way for the nan

[issue43475] Worst-case behaviour of hash collision with float NaN

2021-03-11 Thread Mark Dickinson
Mark Dickinson added the comment: On third thoughts, of course it *would* help, because the Counter is keeping references to the realised NaN values. I think I'll go away now and come back when my brain is working. -- ___ Python tracker <ht

[issue43475] Worst-case behaviour of hash collision with float NaN

2021-03-11 Thread Mark Dickinson
Mark Dickinson added the comment: Hmm. On second thoughts, the proposed solution wouldn't actually *help* with the situation I gave: the elements (lazily) realised from the NumPy array are highly likely to all end up with the same address in RAM. :-( >>> x = np.full(10, np.nan)

[issue43475] Worst-case behaviour of hash collision with float NaN

2021-03-11 Thread Mark Dickinson
Mark Dickinson added the comment: Sigh. When I'm undisputed ruler of the multiverse, I'm going to make "NaN == NaN" return True, IEEE 754 be damned. NaN != NaN is fine(ish) at the level of numerics; the problems start when the consequences of that choice leak into the o

[issue43475] Worst-case behaviour of hash collision with float NaN

2021-03-11 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue43475> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43448] exec() ignores scope.

2021-03-10 Thread Mark Dickinson
Mark Dickinson added the comment: > At most I think this issue is a duplicate of bpo-24800 Agreed; closing here. -- nosy: +mark.dickinson resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> exec docs should note that the no argument

[issue43375] memory leak in threading ?

2021-03-09 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks; I missed that one. I'll update the state of this one to mark it as a duplicate of #37788. -- ___ Python tracker <https://bugs.python.org/issue43

[issue37788] fix for bpo-36402 (threading._shutdown() race condition) causes reference leak

2021-03-09 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue37788> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43375] memory leak in threading ?

2021-03-09 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> duplicate superseder: -> fix for bpo-36402 (threading._shutdown() race condition) causes reference leak ___ Python tracker <https://bugs.python.org/i

[issue43420] Optimize rational arithmetics

2021-03-07 Thread Mark Dickinson
Mark Dickinson added the comment: > There is one exception I've found: stdlib's statistics module uses > Fraction's in the _sum() helper, exactly in a paradigm "sum a lot > of values". That's an interesting example: it does indeed satisfy the "sum o

[issue43060] Convert _decimal C API from pointer array to struct

2021-03-07 Thread Mark Dickinson
Mark Dickinson added the comment: Just a note that #43422 would make this moot. -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue43

[issue43420] Optimize rational arithmetics

2021-03-07 Thread Mark Dickinson
Mark Dickinson added the comment: Personally, I'd prefer to keep the code simplicity, and the speed for small inputs here. Python's needs aren't the same as SymPy's needs or SAGE's needs, and not all of the fractions.Fraction use-cases involve summing lots of values with incompatible

[issue43422] Revert _decimal C API changes

2021-03-07 Thread Mark Dickinson
Mark Dickinson added the comment: +1 for reverting these before 3.10. See also @mattip's comments on #41324, and #43060. -- ___ Python tracker <https://bugs.python.org/issue43

[issue41369] Update to libmpdec-2.5.1

2021-03-07 Thread Mark Dickinson
Mark Dickinson added the comment: Sounds fine to me. If I'm understanding right, what we have in master right now is somewhere between libmpdec 2.5.0 and libmpdec 2.5.1; is that right? If so, it definitely makes sense to update to 2.5.1

[issue43420] Optimize rational arithmetics

2021-03-06 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue43420> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43375] memory leak in threading ?

2021-03-04 Thread Mark Dickinson
Mark Dickinson added the comment: > Since Timer thread is never joined, should not it be a daemon? Possibly, but I think that's a new question/issue. :-) And presumably there's no reason you can't make your Timer threads into daemon threads if you have a n

[issue43383] imprecise handling of weakref callbacks

2021-03-03 Thread Mark Dickinson
Mark Dickinson added the comment: One more thing: I'm assuming that everything in sight is single-threaded? With more than one Python thread (even if that thread is auxiliary to anything you're doing - e.g., if you're working at an IPython prompt, there will likely be at least a couple

[issue43383] imprecise handling of weakref callbacks

2021-03-03 Thread Mark Dickinson
Mark Dickinson added the comment: Have you tried doing a "gc.get_referrers" on your weakref, to verify that there aren't any references that you don't expect to be there? Another diagnostic would be to run with cyclic garbage collection disabled (via gc.disable). If you're seeing

[issue43383] imprecise handling of weakref callbacks

2021-03-03 Thread Mark Dickinson
Mark Dickinson added the comment: If I understand correctly, the reported bug is that you're seeing a weakref callback being executed after the weakref.ref instance it's attached to is deleted. Is that correct? Do you have a minimal example we can use to reproduce the effect? Without

[issue43376] Add PyComplex_FromString

2021-03-03 Thread Mark Dickinson
Mark Dickinson added the comment: I'd imagine "PyComplex_FromString" would be of limited utility in parsing complex data produced by something other than Python, because of Python's quirks with "j" rather than "i". But I guess you're talking about a case where

[issue43375] memory leak in threading ?

2021-03-02 Thread Mark Dickinson
Mark Dickinson added the comment: I'm not sure that this counts as a bug. Each non-daemon thread adds a lock to the threading._shutdown_locks set: https://github.com/python/cpython/blob/8b795ab5541d8a4e69be4137dfdc207714270b77/Lib/threading.py#L933-L935. That lock is removed when the thread

[issue43373] Tensorflow

2021-03-02 Thread Mark Dickinson
Mark Dickinson added the comment: Hmm. Somehow the trailing dot became part of the second URL. Trying again: https://github.com/tensorflow/tensorflow/issues/44485 -- ___ Python tracker <https://bugs.python.org/issue43

[issue43373] Tensorflow

2021-03-02 Thread Mark Dickinson
Mark Dickinson added the comment: Wrong tracker. Try https://github.com/tensorflow/tensorflow. (See in particular https://github.com/tensorflow/tensorflow/issues/44485.) -- nosy: +mark.dickinson resolution: -> third party stage: -> resolved status: open -&g

[issue43315] Decimal.__str__ has no way to force exact decimal representation

2021-03-02 Thread Mark Dickinson
Mark Dickinson added the comment: Closing here; the built-in formatting should be sufficient, as discussed. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue43315] Decimal.__str__ has no way to force exact decimal representation

2021-02-26 Thread Mark Dickinson
Mark Dickinson added the comment: Sure, but that has nothing to do with string representations or formatting, so I don't see how it's relevant for this issue: the rounding happens when you call `normalize`. -- ___ Python tracker <ht

[issue43060] Convert _decimal C API from pointer array to struct

2021-02-26 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker <https://bugs.python.org/issue43060> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42914] pprint numbers with underscore

2021-02-25 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue42914> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43263] threading module unable to run

2021-02-25 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker <https://bugs.python.org/issue43263> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43263] threading module unable to run

2021-02-25 Thread Mark Dickinson
Mark Dickinson added the comment: @twoone3: Shouldn't you be calling PyGILState_Ensure() before calling into Python from the C++ code? In any case, I'm removing myself from the nosy list on this issue, because I don't have access to Windows to try to reproduce

[issue43310] Method __del__ with callable

2021-02-24 Thread Mark Dickinson
Mark Dickinson added the comment: Postscript: the "MethodType" that appears in the previous comment can be imported from the types module: "from types import MethodType". -- ___ Python tracker <https://bug

[issue43310] Method __del__ with callable

2021-02-24 Thread Mark Dickinson
Mark Dickinson added the comment: The key difference between the func_del function and the instance C() is that func_del is a (non-data) descriptor in addition to being callable, while the instance C() is not. That makes func_del usable as a method. If you define C as follows, you'll see

[issue43315] Decimal.__str__ has no way to force exact decimal representation

2021-02-24 Thread Mark Dickinson
Mark Dickinson added the comment: This is by design: the choice of -6 is not arbitrary, but follows the standard that the Decimal class is based on. Quoting from http://speleotrove.com/decimal/daconvs.html#reftostr: > If the exponent is less than or equal to zero and the adjusted expon

[issue43263] threading module unable to run

2021-02-23 Thread Mark Dickinson
Mark Dickinson added the comment: [twoone3] > Have you been studying this problem? Not personally, no. Sorry, but I'm afraid this really isn't an actionable bug report as it stands: we still don't have an effective way to reproduce, and it's far from clear that this is actually a

[issue43304] THONNY 3.3.0 failing to install package MULTIPROCESSING

2021-02-23 Thread Mark Dickinson
Mark Dickinson added the comment: Closing as third-party. But for the record, I suspect the problem here is arising from confusion between standard library modules and third-party packages: the multiprocessing package is not a 3rd party package like NumPy (for example): instead, it's part

[issue43263] threading module unable to run

2021-02-19 Thread Mark Dickinson
Change by Mark Dickinson : -- resolution: -> works for me status: open -> pending ___ Python tracker <https://bugs.python.org/issue43263> ___ ___ Pyth

[issue43263] threading module unable to run

2021-02-19 Thread Mark Dickinson
Mark Dickinson added the comment: Sorry, but as Ronald says there's not nearly enough information here. Some questions: - What do you mean by "embedded Python"? - What is "the exe" that you refer to in your second mesasge? Is that python.exe? Is that an executable yo

[issue42686] include built-in Math functions in SQLite to 3.35.0 of march 2021

2021-02-18 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker <https://bugs.python.org/issue42686> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18163] Add a 'key' attribute to KeyError

2021-02-18 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker <https://bugs.python.org/issue18163> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue2142] difflib.unified_diff(...) produces invalid patches

2021-02-18 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: -mark.dickinson ___ Python tracker <https://bugs.python.org/issue2142> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13433] [doc] Improve string format documentation regarding %g

2021-02-18 Thread Mark Dickinson
Mark Dickinson added the comment: Closing; the documentation was updated recently. See #39096 for details. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42429] Behavior of general (%g, :g) formatting inconsistent for decimal.Decimal

2021-02-18 Thread Mark Dickinson
Mark Dickinson added the comment: The documentation did get updates: see #39096 for details. Closing here. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

<    1   2   3   4   5   6   7   8   9   10   >