[issue35711] Print information about an unexpectedly pending error before crashing

2019-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Calling PyErr_Occurred() on every function call adds some overhead. It should be called only in the debug build. In addition to the traceback, it would be nice to output also some information about the callable. Note also that PyErr_Print() calls

[issue35714] Document that the null character '\0' terminates a struct format spec

2019-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think the null character is illegal character in the format string, and struct functions should raise a struct.error for it. -- nosy: +serhiy.storchaka ___ Python tracker

[issue35712] Make NotImplemented unusable in boolean context

2019-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a common mistake. Even the default implementation of object.__ne__ had a bug, fixed only 4 years ago in issue21408. There were several errors in stdlib. I am sure there is a lot of occurrences of this errors in a third party code. So I like this

Re: the python name

2019-01-10 Thread DL Neil
Chris, On 11/01/19 10:06 AM, Chris Angelico wrote: On Fri, Jan 11, 2019 at 8:01 AM DL Neil wrote: PS the smart reply: who do you think coded the Alt-Tab window-switching mechanism? or, whose shoulders' do you young, whipper-snappers think you're standing on? (and, "please get down, and go and

[issue35693] test_httpservers fails

2019-01-10 Thread Steve Dower
Steve Dower added the comment: > It is true that I worry about failing tests during PGO training because they > stop me from compiling Python -with- PGO. They shouldn't prevent you from compiling with PGO... even if they cause Python to crash, you should be able to compile still. How is it

[issue35157] Missing pyconfig.h when building from source and pgo flag is enabled

2019-01-10 Thread Jorge Ramos
Change by Jorge Ramos : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35156] Consider revising documentation on Python Builds from source

2019-01-10 Thread Jorge Ramos
Change by Jorge Ramos : -- stage: needs patch -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue35693] test_httpservers fails

2019-01-10 Thread Zachary Ware
Zachary Ware added the comment: Test failures during the PGO training (*not* those after the final PGO compilation) should be ignored; if they're not, that's an issue that should be fixed. -- ___ Python tracker

[issue35399] Sysconfig bug

2019-01-10 Thread Jorge Ramos
Change by Jorge Ramos : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35400] PGOMGR : warning PG0188:

2019-01-10 Thread Jorge Ramos
Change by Jorge Ramos : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35693] test_httpservers fails

2019-01-10 Thread Jorge Ramos
Change by Jorge Ramos : -- stage: test needed -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list

[issue35693] test_httpservers fails

2019-01-10 Thread Jorge Ramos
Jorge Ramos added the comment: It is true that I worry about failing tests during PGO training because they stop me from compiling Python -with- PGO. I also got here to report my experience and problems back to you guys but, if the problems are known, well, there's nothing much I can do

[issue35693] test_httpservers fails

2019-01-10 Thread Steve Dower
Steve Dower added the comment: Defining new training sets for PGO would be a new job (that you could volunteer to do if you like). The test suite is convenient because when you clone our GitHub repository, it's already there. Another training suite would have to be installed somehow as part

[issue35661] Store the venv prompt in pyvenv.cfg

2019-01-10 Thread Steve Dower
Steve Dower added the comment: Your tests actually went the other way. This one puts a trailing space after the prompt and expected it to be there in the file, but also ensured that exactly one space was added at the start. self.assertEqual(context.prompt, '(My prompt) ')

Re: How can I find the indices of an array with float values in python?

2019-01-10 Thread Madhavan Bomidi
Thank you all for various ways of finding the indices. -- https://mail.python.org/mailman/listinfo/python-list

[issue34628] urllib.request.urlopen fails when userinfo is present in URL

2019-01-10 Thread Windson Yang
Windson Yang added the comment: I found that Requests library use urllib3 library which looks like ignore the user info part (in request_context https://github.com/urllib3/urllib3/blob/master/src/urllib3/poolmanager.py#L208). Did I miss something or we should also ignore it? --

[issue35712] Make NotImplemented unusable in boolean context

2019-01-10 Thread Steven D'Aprano
Steven D'Aprano added the comment: > the canonical __ne__ delegation to __eq__ for any class should be implemented > as something like I disagree that your code snippet is the canonical way to write __ne__. I'd write it like this: def __ne__(self, other): return not (self ==

[issue32146] multiprocessing freeze_support needed outside win32

2019-01-10 Thread bbayles
bbayles added the comment: Thanks for the note. I've merged in master and fixed a conflict in the test file. In an earlier rev I tried to do the argument parsing without ast.literal_eval, but found it awkward to support all the ways [1] can manifest. You might have a better idea? [1]

[issue24746] doctest 'fancy diff' formats incorrectly strip trailing whitespace

2019-01-10 Thread Senthil Kumaran
Senthil Kumaran added the comment: All changes related to this issue are done. Thanks for your contribution and engagement everyone! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue35714] Document that the null character '\0' terminates a struct format spec

2019-01-10 Thread Steven D'Aprano
Steven D'Aprano added the comment: I'm not sure whether having NULLs terminate a struct format string is a feature or a bug. Given that nearly every other string in Python treat NULLs as ordinary characters, I'm inclined to say this is a bug. Or at least an unnecessary restriction that

[issue35713] Fatal Python error: _PySys_BeginInit: can't initialize sys module

2019-01-10 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Please attach the full build log too along with the command executed. -- nosy: +xtreak ___ Python tracker ___

[issue35713] Fatal Python error: _PySys_BeginInit: can't initialize sys module

2019-01-10 Thread STINNER Victor
STINNER Victor added the comment: Because it's late, I will say it shortly: if you don't elaborate how you get this error, I will simply close the issue. You have to describe what you are trying to do, your OS, etc. (It works for me!) -- ___

[issue35713] Fatal Python error: _PySys_BeginInit: can't initialize sys module

2019-01-10 Thread Tasy
Tasy added the comment: Sorry for the confusion. The three dots were for many lines of successful compilation output from make. The rest is the final few lines where the compilation fails. -- ___ Python tracker

[issue35712] Make NotImplemented unusable in boolean context

2019-01-10 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Seems related issue22978 -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list

[issue35713] Fatal Python error: _PySys_BeginInit: can't initialize sys module

2019-01-10 Thread STINNER Victor
STINNER Victor added the comment: > . > . > . Hello. Can you elaborate this part? -- nosy: +vstinner ___ Python tracker ___ ___

RE: How can I find the indices of an array with float values in python?

2019-01-10 Thread Avi Gross
Madhavan, Others have given you reasonable answers out of the ever so many many many ways you can do what you asked. I offer a question to consider in case your needs are different or you have not considered other more pythonic ways. What do you want to do with your data and is this the best way

[issue35714] Document that the null character '\0' terminates a struct format spec

2019-01-10 Thread Dan Snider
New submission from Dan Snider : ie.: >>> from struct import calcsize >>> calcsize('\144\u0064\000xf\U0031000\60d\121\U0051') 16 I'm sure some people think it's obvious or even expect the null character to signal EOF but it probably isn't obvious at all to those without

[issue35713] Fatal Python error: _PySys_BeginInit: can't initialize sys module

2019-01-10 Thread Tasy
New submission from Tasy : . . . ./python -E -S -m sysconfig --generate-posix-vars ;\ if test $? -ne 0 ; then \ echo "generate-posix-vars failed" ; \ rm -f ./pybuilddir.txt ; \ exit 1 ; \ fi Fatal Python error: _PySys_BeginInit:

[issue26239] distutils link-objects is not normalized

2019-01-10 Thread Cheryl Sabella
Cheryl Sabella added the comment: This was fixed in issue 1703178. -- nosy: +cheryl.sabella resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> link_objects in setup.cfg crashes build ___ Python tracker

[issue35712] Make NotImplemented unusable in boolean context

2019-01-10 Thread Josh Rosenberg
New submission from Josh Rosenberg : I don't really expect this to go anywhere until Python 4 (*maybe* 3.9 after a deprecation period), but it seems like it would have been a good idea to make NotImplementedType's __bool__ explicitly raise a TypeError (rather than leaving it unset, so

[issue35656] More matchers in unittest.mock

2019-01-10 Thread Lisa Roach
Lisa Roach added the comment: APPROXIMATE feels like it might lead to code smell to me, if I know roughly what the float should be why would I not want to test it for exactness? It could end up hiding inconsistencies the tests should be catching. -- nosy: +lisroach

[issue2517] Error when printing an exception containing a Unicode string

2019-01-10 Thread Piotr Dobrogost
Piotr Dobrogost added the comment: Benjamin Peterson in comment https://bugs.python.org/issue2517#msg64771 wrote: "That is because Python encodes it's error messages as ASCII by default…" Could somebody please point where in the source code of Python 2 this happens? --

Re: the python name

2019-01-10 Thread Chris Angelico
On Fri, Jan 11, 2019 at 8:01 AM DL Neil wrote: > PS the smart reply: who do you think coded the Alt-Tab window-switching > mechanism? > or, whose shoulders' do you young, whipper-snappers think you're > standing on? (and, "please get down, and go and wash your feet") Hold on hold on.

[issue35711] Print information about an unexpectedly pending error before crashing

2019-01-10 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch, patch pull_requests: +11071, 11072 stage: -> patch review ___ Python tracker ___

Re: the python name

2019-01-10 Thread DL Neil
On 11/01/19 8:57 AM, Chris Angelico wrote: On Fri, Jan 11, 2019 at 6:48 AM DL Neil wrote: Working with a bunch of younger folk (who may technically be of the age of 'grand-children' - pardon me, I almost fell over my (long, grey) beard), I am frequently the butt of their gentle, if ageist,

[issue35711] Print information about an unexpectedly pending error before crashing

2019-01-10 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch, patch, patch pull_requests: +11071, 11072, 11073 stage: -> patch review ___ Python tracker ___

[issue35711] Print information about an unexpectedly pending error before crashing

2019-01-10 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +11071 stage: -> patch review ___ Python tracker ___ ___

Re: the python name

2019-01-10 Thread DL Neil
On 8/01/19 12:04 PM, Dennis Lee Bieber wrote: On Tue, 8 Jan 2019 10:10:13 +1300, DL Neil declaimed the following: Why is that obscure? It makes perfect sense - to those of us who have used tape/serial storage! Perhaps less-so to [bobble-heads], sorry I mean people who grew-up with 'bubble

[issue35711] Print information about an unexpectedly pending error before crashing

2019-01-10 Thread Samuel Freilich
New submission from Samuel Freilich : _PyObject_FastCallDict and _PyObject_FastCallKeywords assert that there is no pending exception before calling functions that might otherwise clobber the exception state. However, that doesn't produce very clear output for debugging, since the assert

[issue24746] doctest 'fancy diff' formats incorrectly strip trailing whitespace

2019-01-10 Thread Senthil Kumaran
Senthil Kumaran added the comment: New changeset 0167c08163f44f4a033497102244bbb6150f606b by Senthil Kumaran in branch '2.7': bpo-24746: Fix doctest failures when running the testsuite with -R (#11501) (#11512)

[issue35710] Make dataclasses.field() accept another name for __init__ field's name

2019-01-10 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith nosy: +eric.smith type: -> enhancement ___ Python tracker ___ ___

[issue35707] time.sleep() should support objects with __float__

2019-01-10 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > I'm not sure in which order the conversion should be tried to avoid/reduce > precision loss during the conversion. I would suggest the order 1. __index__ to ensure exact conversion of exact integers 2. __float__ to ensure correct conversion of

Re: the python name

2019-01-10 Thread Chris Angelico
On Fri, Jan 11, 2019 at 6:48 AM DL Neil wrote: > Working with a bunch of younger folk (who may technically be of the age > of 'grand-children' - pardon me, I almost fell over my (long, grey) > beard), I am frequently the butt of their gentle, if ageist, jokes. > However, my sardonic amusement is

Re: the python name

2019-01-10 Thread DL Neil
On 8/01/19 4:59 PM, rbowman wrote:> On 01/07/2019 02:10 PM, DL Neil wrote: >> Why is that obscure? It makes perfect sense - to those of us who have >> used tape/serial storage! Perhaps less-so to [bobble-heads], sorry I >> mean people who grew-up with 'bubble memory' (Memory sticks, 'flash >>

[issue24746] doctest 'fancy diff' formats incorrectly strip trailing whitespace

2019-01-10 Thread Ned Deily
Ned Deily added the comment: New changeset d09e8cecf214b1de457feae01860f5592f912a8e by Ned Deily (Senthil Kumaran) in branch '3.6': Revert "bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff (GH-10639) (GH-11477)" (GH-11509)

Re: How can I find the indices of an array with float values in python?

2019-01-10 Thread MRAB
On 2019-01-10 17:05, Madhavan Bomidi wrote: Sorry for re-posting with a correction. I have an array (numpy.ndarray) with shape (1500L,) as below: x = array([ 3.e+01, 6.e+01, 9.e+01, ..., 4.4940e+04, 4.4970e+04, 4.5000e+04]) Now, I

[issue32146] multiprocessing freeze_support needed outside win32

2019-01-10 Thread miss-islington
miss-islington added the comment: New changeset b9cd38f928f7eb4e18ad4b63e5c49c05c626c33e by Miss Islington (bot) in branch '3.7': bpo-32146: Add documentation about frozen executables on Unix (GH-5850) https://github.com/python/cpython/commit/b9cd38f928f7eb4e18ad4b63e5c49c05c626c33e

[issue24746] doctest 'fancy diff' formats incorrectly strip trailing whitespace

2019-01-10 Thread Senthil Kumaran
Change by Senthil Kumaran : -- versions: +Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: How can I find the indices of an array with float values in python?

2019-01-10 Thread Rob Gaddi
On 1/10/19 9:25 AM, Peter Otten wrote: Madhavan Bomidi wrote: I have an array (numpy.ndarray) with shape (1500L,) as below: x = array([ 3.e+01, 6.e+01, 9.e+01, ..., 4.4940e+04, 4.4970e+04, 4.5000e+04]) Now, I wanted to determine the

[issue24746] doctest 'fancy diff' formats incorrectly strip trailing whitespace

2019-01-10 Thread Senthil Kumaran
Change by Senthil Kumaran : -- pull_requests: +11067, 11068, 11070 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue24746] doctest 'fancy diff' formats incorrectly strip trailing whitespace

2019-01-10 Thread Senthil Kumaran
Change by Senthil Kumaran : -- pull_requests: +11067, 11068 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24746] doctest 'fancy diff' formats incorrectly strip trailing whitespace

2019-01-10 Thread Senthil Kumaran
Change by Senthil Kumaran : -- pull_requests: +11067, 11068, 11069, 11070 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue24746] doctest 'fancy diff' formats incorrectly strip trailing whitespace

2019-01-10 Thread Senthil Kumaran
Change by Senthil Kumaran : -- pull_requests: +11067 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35702] clock_gettime: Add new identifier CLOCK_UPTIME_RAW for Darwin

2019-01-10 Thread Ricardo Fraile
Ricardo Fraile added the comment: Impressive response time, thanks team! -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue35698] Division by 2 in statistics.median

2019-01-10 Thread Brett Cannon
Change by Brett Cannon : -- nosy: +steven.daprano ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35698] [statistics] Division by 2 in statistics.median

2019-01-10 Thread Brett Cannon
Change by Brett Cannon : -- title: Division by 2 in statistics.median -> [statistics] Division by 2 in statistics.median ___ Python tracker ___

[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-10 Thread Brett Cannon
Change by Brett Cannon : -- title: 3.8 needlessly breaks weak references for UUIDs -> [uuid] 3.8 breaks weak references for UUIDs ___ Python tracker ___

[issue32146] multiprocessing freeze_support needed outside win32

2019-01-10 Thread miss-islington
Change by miss-islington : -- pull_requests: +11064, 11065, 11066 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue32146] multiprocessing freeze_support needed outside win32

2019-01-10 Thread miss-islington
Change by miss-islington : -- pull_requests: +11064, 11065 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32146] multiprocessing freeze_support needed outside win32

2019-01-10 Thread miss-islington
Change by miss-islington : -- pull_requests: +11064 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32146] multiprocessing freeze_support needed outside win32

2019-01-10 Thread STINNER Victor
STINNER Victor added the comment: New changeset bab4bbb4c9cd5d25ede21a1b8c99d56e3b8dae9d by Victor Stinner (Bo Bayles) in branch 'master': bpo-32146: Add documentation about frozen executables on Unix (GH-5850) https://github.com/python/cpython/commit/bab4bbb4c9cd5d25ede21a1b8c99d56e3b8dae9d

[issue32146] multiprocessing freeze_support needed outside win32

2019-01-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm sorry about not seeing your PR before. Would you like to update it against current git master? (note I'm not thrilled by the use of the "ast" module; I hope we can change the command-line args so that this isn't needed) --

[issue35045] test_min_max_version (test.test_ssl.ContextTests) fails on Fedora 29+ and openssl 1.1.1

2019-01-10 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +11061, 11062 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35045] test_min_max_version (test.test_ssl.ContextTests) fails on Fedora 29+ and openssl 1.1.1

2019-01-10 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +11061 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35045] test_min_max_version (test.test_ssl.ContextTests) fails on Fedora 29+ and openssl 1.1.1

2019-01-10 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +11061, 11062, 11063 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue24746] doctest 'fancy diff' formats incorrectly strip trailing whitespace

2019-01-10 Thread Senthil Kumaran
Change by Senthil Kumaran : -- pull_requests: +11058, 11059, 11060 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue24746] doctest 'fancy diff' formats incorrectly strip trailing whitespace

2019-01-10 Thread Senthil Kumaran
Change by Senthil Kumaran : -- pull_requests: +11058, 11059 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24746] doctest 'fancy diff' formats incorrectly strip trailing whitespace

2019-01-10 Thread Senthil Kumaran
Change by Senthil Kumaran : -- pull_requests: +11058 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: How can I find the indices of an array with float values in python?

2019-01-10 Thread Peter Otten
Madhavan Bomidi wrote: > I have an array (numpy.ndarray) with shape (1500L,) as below: > > x = array([ 3.e+01, 6.e+01, 9.e+01, ..., > 4.4940e+04, 4.4970e+04, 4.5000e+04]) > > Now, I wanted to determine the indices of the x values between 0.0

RE: How can I find the indices of an array with float values in python?

2019-01-10 Thread David Raymond
Maybe something along the lines of... indices = [i for i, val in enumerate(x) where 0 <= val <= 15000] -Original Message- From: Python-list [mailto:python-list-bounces+david.raymond=tomtom@python.org] On Behalf Of Madhavan Bomidi Sent: Thursday, January 10, 2019 12:05 PM To:

[issue35698] Division by 2 in statistics.median

2019-01-10 Thread Jonathan Fine
Jonathan Fine added the comment: It might be better in my sample code to write isinstance(p, int) instead of type(p) == int This would fix Rémi's example. (I wanted to avoid thinking about (False // True).) For median([1, 1]), I am not claiming that 1.0 is wrong and 1 is right. I'm

Re: How can I find the indices of an array with float values in python?

2019-01-10 Thread Madhavan Bomidi
Sorry for re-posting with a correction. I have an array (numpy.ndarray) with shape (1500L,) as below: x = array([ 3.e+01, 6.e+01, 9.e+01, ..., 4.4940e+04, 4.4970e+04, 4.5000e+04]) Now, I wanted to determine the indices of the x values

[issue35045] test_min_max_version (test.test_ssl.ContextTests) fails on Fedora 29+ and openssl 1.1.1

2019-01-10 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch, patch, patch pull_requests: +11055, 11056, 11057 stage: -> patch review ___ Python tracker ___

[issue35045] test_min_max_version (test.test_ssl.ContextTests) fails on Fedora 29+ and openssl 1.1.1

2019-01-10 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch, patch pull_requests: +11055, 11056 stage: -> patch review ___ Python tracker ___

[issue35710] Make dataclasses.field() accept another name for __init__ field's name

2019-01-10 Thread Rémi Lapeyre
New submission from Rémi Lapeyre : When creating a class, I sometimes wish to get this behavior: def MyClass: def __init__(self, param): self._param = param def __repr__(self): return f"MyClass(param={self._param})" Unless I'm making a mistaking,

How can I find the indices of an array with float values in python?

2019-01-10 Thread Madhavan Bomidi
I have an array (numpy.ndarray) with shape (1500L,) as below: x = array([ 3.e+01, 6.e+01, 9.e+01, ..., 4.4940e+04, 4.4970e+04, 4.5000e+04]) Now, I wanted to determine the indices of the x values between 0.0 and 15.0. While this is simple in

[issue35045] test_min_max_version (test.test_ssl.ContextTests) fails on Fedora 29+ and openssl 1.1.1

2019-01-10 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +11055 stage: -> patch review ___ Python tracker ___ ___

[issue35045] test_min_max_version (test.test_ssl.ContextTests) fails on Fedora 29+ and openssl 1.1.1

2019-01-10 Thread STINNER Victor
Change by STINNER Victor : -- versions: -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35709] test_ssl fails on Fedora 29: test_min_max_version()

2019-01-10 Thread STINNER Victor
STINNER Victor added the comment: Oh right, it's a duplicate of bpo-35045. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test_min_max_version (test.test_ssl.ContextTests) fails on Fedora 29+ and openssl 1.1.1

[issue35709] test_ssl fails on Fedora 29: test_min_max_version()

2019-01-10 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Seems related https://bugs.python.org/issue35045 -- nosy: +xtreak ___ Python tracker ___

[issue35702] clock_gettime: Add new identifier CLOCK_UPTIME_RAW for Darwin

2019-01-10 Thread STINNER Victor
STINNER Victor added the comment: Joannah Nanjekye added time.CLOCK_UPTIME_RAW to the master branch (future Python 3.8). We don't add feature to stable versions (like 3.7), so I close the issue. Thanks Ricardo Fraile for the report, I wasn't aware of this clock ;-) Note: Until Python 3.8

[issue35702] clock_gettime: Add new identifier CLOCK_UPTIME_RAW for Darwin

2019-01-10 Thread STINNER Victor
STINNER Victor added the comment: New changeset 572168a016ece1b7346695eb7289190c46f1ae55 by Victor Stinner (Joannah Nanjekye) in branch 'master': bpo-35702: Add new identifier time.CLOCK_UPTIME_RAW for macOS 10.12 (GH-11503)

[issue35707] time.sleep() should support objects with __float__

2019-01-10 Thread STINNER Victor
STINNER Victor added the comment: PR 11507 is not directly related to this issue, see bpo-26669. But I wrote this PR when trying to fix this issue :-) -- ___ Python tracker

[issue26669] time.localtime(float("NaN")) does not raise a ValueError on all platforms

2019-01-10 Thread STINNER Victor
STINNER Victor added the comment: I wrote PR 11507 to raise ValueError rather than OverflowError for -inf and +inf. -- ___ Python tracker ___

[issue26669] time.localtime(float("NaN")) does not raise a ValueError on all platforms

2019-01-10 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +11049, 11050, 11051 stage: backport needed -> patch review ___ Python tracker ___ ___

[issue26669] time.localtime(float("NaN")) does not raise a ValueError on all platforms

2019-01-10 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +11049, 11050, 11051, 11052 stage: backport needed -> patch review ___ Python tracker ___

[issue35707] time.sleep() should support objects with __float__

2019-01-10 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch, patch pull_requests: +11053, 11054 stage: -> patch review ___ Python tracker ___

[issue35707] time.sleep() should support objects with __float__

2019-01-10 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +11053 stage: -> patch review ___ Python tracker ___ ___

[issue26669] time.localtime(float("NaN")) does not raise a ValueError on all platforms

2019-01-10 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +11049, 11050 stage: backport needed -> patch review ___ Python tracker ___ ___

[issue26669] time.localtime(float("NaN")) does not raise a ValueError on all platforms

2019-01-10 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +11049 stage: backport needed -> patch review ___ Python tracker ___ ___

[issue35709] test_ssl fails on Fedora 29: test_min_max_version()

2019-01-10 Thread STINNER Victor
New submission from STINNER Victor : test_ssl fails on Fedora 29: vstinner@apu$ ./python -m test test_ssl -m test_min_max_version -v == CPython 3.8.0a0 (heads/pytime_inf:aaea5b25d1, Jan 10 2019, 17:40:16) [GCC 8.2.1 20181215 (Red Hat 8.2.1-6)] ==

[issue35707] time.sleep() should support objects with __float__

2019-01-10 Thread STINNER Victor
STINNER Victor added the comment: The problem comes from the private C function _PyTime_FromObject() of Python/pytime.c. This function must use the proper conversion to minimize the precision loss. Lib/test/test_time.py contains a lot of tests on conversions from different types and ensure

[issue35470] A deadly decref in _PyImport_FindExtensionObjectEx()

2019-01-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.6 ___ Python tracker ___

[issue35698] Division by 2 in statistics.median

2019-01-10 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: This does not do what you want: >>> class MyInt(int): pass >>> wibble(MyInt(4), MyInt(2)) 2.0 and a patch is only needed if something is broken. I'm with vstinner of the opinion that nothing is broken and vote to close this issue. --

[issue35708] lib2to3 failed to convert as refactor's fixes not search.pyc files

2019-01-10 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35470] A deadly decref in _PyImport_FindExtensionObjectEx()

2019-01-10 Thread miss-islington
miss-islington added the comment: New changeset 3e3d57d8490b729a80c8cd9e90475dec122dfe9e by Miss Islington (bot) in branch '3.7': bpo-35470: Fix a reference counting bug in _PyImport_FindExtensionObjectEx(). (GH-11128)

[issue35698] Division by 2 in statistics.median

2019-01-10 Thread Jonathan Fine
Jonathan Fine added the comment: Here's the essence of a patch. Suppose the input is Python integers, and the output is a mathematical integer. In this case we can make the output a Python integer by using the helper function >>> def wibble(p, q): ... if type(p) == type(q) == int and

[issue35707] time.sleep() should support objects with __float__

2019-01-10 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: See #33039 for the proposed change to __int__. -- ___ Python tracker ___ ___ Python-bugs-list

[issue35707] time.sleep() should support objects with __float__

2019-01-10 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35707] time.sleep() should support objects with __float__

2019-01-10 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: time.sleep() is probably not the only function to have such a bug. Maybe __int__() should default to: def __int__(self): return int(self.__float__()) when __float__ is defined and not __int__. Nick Coghlan suggested something similar for __int__

  1   2   >