[issue35702] clock_gettime: Add new identifier CLOCK_UPTIME_RAW for Darwin

2019-01-10 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35703] Underscores in numeric literals cannot be before or after decimal (.)

2019-01-10 Thread Yoong Hor Meng


New submission from Yoong Hor Meng :

s = 1_234.567_8
print(float(s))  # It works

s = 1_234._567
print(float(s))  # It does not work

s = 1_234_.567
print(float(s))  # It does not work too

--
components: Interpreter Core
messages: 68
nosy: yoonghm
priority: normal
severity: normal
status: open
title: Underscores in numeric literals cannot be before or after decimal (.)
type: crash
versions: Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35703] Underscores in numeric literals cannot be before or after decimal (.)

2019-01-10 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

This is intentional, see 
.

In floating point literals the underscores must always be between two digits.

--
nosy: +ronaldoussoren
resolution:  -> not a bug
status: open -> pending
type: crash -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35702] clock_gettime: Add new identifier CLOCK_UPTIME_RAW for Darwin

2019-01-10 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35704] On AIX, test_unpack_archive_xztar fails with default MAXDATA settings

2019-01-10 Thread Michael Felt


New submission from Michael Felt :

By default AIX builds 32-bit applications - and the combined .data, .bss and 
.stack areas share one memory segment of 256 Mbyte.

This can be modified by either specifying a larger value for maxdata during 
linking (e.g., with LDFLAGS=-bmaxdata:0x4000) or using the program ldedit 
(e.g., ldedit -b maxdata:0x4000).

The subtest test_shutil.test_unpack_archive_xztar fails with the default. The 
patch here looks at the MAXDATA value of the executable XCOFF headers and skips 
the test when AIX is 32-bit and MAXDATA < 0x2000.

This helps the result of AIX bots to be more accurate - as this so-called 
failure is not an issue with python itself.

--
components: Tests
messages: 70
nosy: Michael.Felt
priority: normal
severity: normal
status: open
title: On AIX, test_unpack_archive_xztar fails with default MAXDATA settings
type: enhancement
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35704] On AIX, test_unpack_archive_xztar fails with default MAXDATA settings

2019-01-10 Thread Michael Felt


Change by Michael Felt :


--
keywords: +patch
pull_requests: +11029
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35705] libffi support is not there for windows on ARM64

2019-01-10 Thread ossdev


Change by ossdev :


--
components: ctypes
nosy: ossdev07
priority: normal
severity: normal
status: open
title: libffi support is not there for windows on ARM64
type: enhancement
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2019-01-10 Thread Ricardo F


Ricardo F  added the comment:

I still have this issue on MacOS Mojave 10.14

Python 3.7.2 (default, Dec 27 2018, 07:35:06)
[Clang 10.0.0 (clang-1000.11.45.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getdefaultlocale()
Traceback (most recent call last):
  File "", line 1, in 
  File 
"/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/locale.py",
 line 568, in getdefaultlocale
return _parse_localename(localename)
  File 
"/usr/local/Cellar/python/3.7.2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/locale.py",
 line 495, in _parse_localename
raise ValueError('unknown locale: %s' % localename)
ValueError: unknown locale: UTF-8
>>>

$ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=

--
nosy: +rfrail3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-01-10 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +11030, 11031

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-01-10 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +11030

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-01-10 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

I made https://github.com/python/cpython/pull/11501 to fix this problem. After 
my patch:

❯ ./python.exe -m test test_doctest test_doctest
Run tests sequentially
0:00:00 load avg: 1.82 [1/2] test_doctest
0:00:02 load avg: 1.82 [2/2] test_doctest

== Tests result: SUCCESS ==

All 2 tests OK.

Total duration: 5 sec 286 ms
Tests result: SUCCESS

--
nosy: +pablogsal
pull_requests: +11032

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-01-10 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +11030, 11031, 11032

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35705] libffi support is not there for windows on ARM64

2019-01-10 Thread Karthikeyan Singaravelan


New submission from Karthikeyan Singaravelan :

https://bugs.python.org/issue33125#msg314311 seems to be a related ticket that 
tracks this.

--
nosy: +steve.dower, xtreak, zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3705] py3k fails under Windows if "-c" or "-m" is given a non-ascii value

2019-01-10 Thread ossdev


Change by ossdev :


--
pull_requests: +11033

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3705] py3k fails under Windows if "-c" or "-m" is given a non-ascii value

2019-01-10 Thread ossdev


Change by ossdev :


--
pull_requests: +11033, 11034, 11035

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3705] py3k fails under Windows if "-c" or "-m" is given a non-ascii value

2019-01-10 Thread ossdev


Change by ossdev :


--
pull_requests: +11033, 11034

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35698] Division by 2 in statistics.median

2019-01-10 Thread Jonathan Fine


Jonathan Fine  added the comment:

I read PEP 450 as saying that statistics.py can be used by "any secondary 
school student". This is not true for most Python libraries.

In this context, the difference between a float and an int is important. 
Consider
   statistics.median([2] * n)

As a secondary school student, knowing the definition of median, I might expect 
the value to be 2, for any n > 0. What else could it be. However, the present 
code gives 2 for n odd, and 2.0 for n even.

I think that this issue is best approached by taking the point of view of a 
secondary school student. Or perhaps even a primary school student who knows 
fractions. (A teacher might use statistics.py to create learning materials.)

By the way, 2 and 2.0 are not interchangeable. For example
>>> [1] * 2.0
TypeError: can't multiply sequence by non-int of type 'float'

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35674] Expose os.posix_spawnp()

2019-01-10 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:

Now that there is consesus, I am working on a PR for this.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35702] clock_gettime: Add new identifier CLOCK_UPTIME_RAW for Darwin

2019-01-10 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:

I am working on this.

--
nosy: +nanjekyejoannah

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35703] Underscores in numeric literals cannot be before or after decimal (.)

2019-01-10 Thread Yoong Hor Meng


Change by Yoong Hor Meng :


--
stage:  -> resolved
status: pending -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35705] libffi support is not there for windows on ARM64

2019-01-10 Thread ossdev


Change by ossdev :


--
keywords: +patch
pull_requests: +11036
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27682] wsgiref BaseHandler / SimpleHandler can raise additional errors when handling an error

2019-01-10 Thread Lorcán Mc Donagh

Change by Lorcán Mc Donagh :


--
nosy: +lorcan

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35661] Store the venv prompt in pyvenv.cfg

2019-01-10 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Currently, the prompt is enclosed in parentheses, both in the venv and when 
storing:

PS N:\projects\cpython> python -m venv testvenv --prompt="  prompt with spaces  
 "
Running Release|Win32 interpreter...
PS N:\projects\cpython> .\testvenv\Scripts\activate
(  prompt with spaces   ) PS N:\projects\cpython>

Contents of pyvenv.cfg:
home = N:\projects\cpython\PCbuild\win32
include-system-site-packages = false
version = 3.8.0
prompt = (  prompt with spaces   ) 

I also tested using quotes in the prompt, which lead to opening issue 35667.  

Here's a prompt that itself has parentheses:
PS N:\projects\cpython> python -m venv testvenv --prompt="(my prompt)"
Running Release|Win32 interpreter...
PS N:\projects\cpython> .\testvenv\Scripts\activate
((my prompt)) PS N:\projects\cpython>

It seemed to me that the parenthesis would allow the retrieval of both the 
original prompt definition and how it looked in display.  Maybe my tests didn't 
demonstrate this clearly?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35688] "pip install --user numpy" fails on Python from the Windows Store

2019-01-10 Thread Stephan Troyer


Change by Stephan Troyer :


--
nosy: +stephtr

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35702] clock_gettime: Add new identifier CLOCK_UPTIME_RAW for Darwin

2019-01-10 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
keywords: +patch, patch
pull_requests: +11037, 11038
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35702] clock_gettime: Add new identifier CLOCK_UPTIME_RAW for Darwin

2019-01-10 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
keywords: +patch
pull_requests: +11037
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35702] clock_gettime: Add new identifier CLOCK_UPTIME_RAW for Darwin

2019-01-10 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
keywords: +patch, patch, patch
pull_requests: +11037, 11038, 11039
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35706] Making an embedded Python interpreter use a venv is difficult

2019-01-10 Thread Dieter Weber


New submission from Dieter Weber :

Python virtual environments are awesome! Using venvs with an embedded Python 
interpreter has proven difficult, unfortunately. With conda environments it 
works. See appended a sample file to reproduce the behavior.

The core of the problem seems to be that a venv doesn't contain a full Python 
installation, and Py_Initialize() apparently doesn't support setting up the 
combination of venv directories and base installation correctly, i.e. setting 
sys.prefix and sys.base_prefix and potentially other values.

Observed behavior when trying to use a venv:

"""
Initializing... Fatal Python error: Py_Initialize: unable to load the file 
system codec
ModuleNotFoundError: No module named 'encodings'

Current thread 0x1e90 (most recent call first):
"""

Expected behavior:
Setting Py_SetPythonHome() to a venv works and sets up all paths and prefixes 
correctly to use the venv, just like it does for a conda environment.

--
files: Source.cpp
messages: 78
nosy: Dieter Weber
priority: normal
severity: normal
status: open
title: Making an embedded Python interpreter use a venv is difficult
type: enhancement
versions: Python 3.6
Added file: https://bugs.python.org/file48039/Source.cpp

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35706] Making an embedded Python interpreter use a venv is difficult

2019-01-10 Thread Dieter Weber


Change by Dieter Weber :


Added file: https://bugs.python.org/file48040/Source.cpp

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2019-01-10 Thread Paul Ganssle


Paul Ganssle  added the comment:

I agree with Victor on this. In the future, I'd really like to see us do our 
best to add cross-platform uniformity to Python's strftime and strptime 
support. If there really is a platform out there that doesn't support a 
trailing `%`, I like the idea of stripping it off before passing it to the 
system strftime/wcstrftime.

That said, I don't think this should be a blocker on Michael's PR. I think that 
his contribution by itself improves on the current state of things and there's 
no pressing *need* to solve them both at the same time. Unless I'm 
misunderstanding, I think the existing PR is a prerequisite for solving the 
problem on all platforms anyway.

Michael - do you think you can / would you like to add the functionality that 
Victor mentioned to your existing PR? If not, I recommend we merge the current 
PR and open a new issue for "Lone trailing % not supported on all platforms".

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35706] Making an embedded Python interpreter use a venv is difficult

2019-01-10 Thread Dieter Weber


Change by Dieter Weber :


Removed file: https://bugs.python.org/file48039/Source.cpp

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35706] Make it easier to use a venv with an embedded Python interpreter

2019-01-10 Thread Dieter Weber


Change by Dieter Weber :


--
title: Making an embedded Python interpreter use a venv is difficult -> Make it 
easier to use a venv with an embedded Python interpreter

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24928] mock.patch.dict spoils order of items in collections.OrderedDict

2019-01-10 Thread Emmanuel Arias


Emmanuel Arias  added the comment:

Ping :-)

Thanks Karthikeyan for the PR review. 

Would someone else like review it, please?

Thanks!
Regards

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35702] clock_gettime: Add new identifier CLOCK_UPTIME_RAW for Darwin

2019-01-10 Thread STINNER Victor


STINNER Victor  added the comment:

> As the behaviour is equivalent, maybe it can be assigned to the existing 
> time.CLOCK_UPTIME funtion.

Nah, in Python we map directly to OS constant and don't try to be smart. It's 
up to the user of these constants to make their own choice.

Use Python functions for portable behavior: time.monotonic(), 
time.perf_counter(), etc.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-01-10 Thread Senthil Kumaran


Senthil Kumaran  added the comment:


New changeset c5dc60ea858b8ccf78e8d26db81c307a8f9b2314 by Senthil Kumaran 
(Pablo Galindo) in branch 'master':
bpo-24746: Fix doctest failures when running the testsuite with -R (#11501)
https://github.com/python/cpython/commit/c5dc60ea858b8ccf78e8d26db81c307a8f9b2314


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31710] setup.py: _ctypes won't get built when system ffi is only in $PREFIX

2019-01-10 Thread Ivan Levchenko


Ivan Levchenko  added the comment:

Was having the same issue compiling python 3.7.1 against locally compilied 
libffi 3.2.1. 
Setting CPPFLAGS and LDFLAGS was not enough and was still getting the same 
error: INFO: Could not locate ffi libs and/or headers
Everything worked as soon as i added PKG_CONFIG_PATH to point to the location 
of the directory that had libffi.pc
For me that was /foo/bar/distrib/libffi-3.2.1/x86_64-unknown-linux-gnu 
Can test if it works with this:
pkg-config libffi --cflags-only-I

--
nosy: +Ivan Levchenko

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2019-01-10 Thread Michael Saah


Michael Saah  added the comment:

> Michael - do you think you can / would you like to add the functionality that 
> Victor mentioned to your existing PR? If not, I recommend we merge the 
> current PR and open a new issue for "Lone trailing % not supported on all 
> platforms".

I'd be happy to do so, but can't commit to a timeline at the moment.
As long as there's no worry that the branch goes stale in the
meantime, I'd say you can leave it open. Maybe it would be best though
to merge and open a new issue, given the independence of the two
fixes.

I'll leave that as a judgement call to you.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33498] pathlib.Path wants an rmtree method

2019-01-10 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
pull_requests: +11040
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33498] pathlib.Path wants an rmtree method

2019-01-10 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch, patch, patch, patch
pull_requests: +11040, 11041, 11042, 11043
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33498] pathlib.Path wants an rmtree method

2019-01-10 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch, patch
pull_requests: +11040, 11041
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33498] pathlib.Path wants an rmtree method

2019-01-10 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch, patch, patch
pull_requests: +11040, 11041, 11042
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35698] Division by 2 in statistics.median

2019-01-10 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

> As a secondary school student, knowing the definition of median, I might 
> expect the value to be 2, for any n > 0.

The secondary school student would be wrong, wouldn't he?

The median of a set is not expected to be a part of the set. Especially for 
ints since division by 1 or 2 is not closed for integers.

Would the same student expect median([2, 4, 6, 8]) to be part of the set of 
even integers?

I think one taking the median of a set should always ready to deal with 
floating point arithmetic the result is not guaranteed to be an integer. Going 
from hoops to make it so when it is equivalent to an integer is rather 
misleading.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35698] Division by 2 in statistics.median

2019-01-10 Thread STINNER Victor


STINNER Victor  added the comment:

I suggest to close the issue as "not a bug". IMHO statistics.median() respects 
the defintion of the mathematical median function.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-01-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11044

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-01-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11044, 11045, 11046

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-01-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11044, 11045

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33498] pathlib.Path wants an rmtree method

2019-01-10 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I am against this. shutil provides higher level API than pathlib, and pathlib 
should not depend on shutil. pathlib.Path represents a path, and its methods 
usually does involve filesystem operations, or involve just a single filesystem 
operation. shutil.rmtree() is a complex operation that needs to perform several 
simple operations, and it should be together with other complex operations in 
the shutil module.

--
nosy: +giampaolo.rodola, pitrou, tarek

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-01-10 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

Hi All,

It was my mistake to merge this in into 3.6, I didn't realize 3.6 was in bugfix 
mode now. Also I went by the versions (previously) set in this bpo issue.

For the regression caused in refleaks, I think, Pablo's patch will fix it, and 
I am verifying it here - https://buildbot.python.org/all/#/builders/1/builds/468

This will be backported to 3.7 ( I notice viktor triggered already: 
https://github.com/python/cpython/pull/11505) and I will cherrpick this to 2.7.

Finally, since the the port to 3.6 was a mistake, I will revert that.

This will make sure that bug is fixed all the supported versions, target 
branches tests are successful and 3.6 remains unaffected.

--
assignee: CuriousLearner -> orsenthil

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33498] pathlib.Path wants an rmtree method

2019-01-10 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Indeed there is no reason to put all useful path informations under the Path 
class.  Writing method calls instead of function calls is not an ideal.

--
resolution:  -> rejected
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-01-10 Thread STINNER Victor


STINNER Victor  added the comment:

> Finally, since the the port to 3.6 was a mistake, I will revert that.

I wrote PR 11499 but I closed it because PR #11501 has been merged, but yeah, 
maybe a revert is the best option for 3.6.

No problem, the status change of the 3.6 branch is very new, and not everybody 
got the memo ;-)
https://devguide.python.org/#status-of-python-branches

See this discussion:
https://discuss.python.org/t/remove-needs-backport-to-3-6-label/563

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-01-10 Thread Jeroen Demeyer


New submission from Jeroen Demeyer :

This used to work correctly in Python 2:

class Half(object):
def __float__(self):
return 0.5
import time
time.sleep(Half())

With Python 3.6, one gets instead

Traceback (most recent call last):
  File "test.py", line 6, in 
time.sleep(Half())
TypeError: an integer is required (got type Half)

--
messages: 91
nosy: jdemeyer
priority: normal
severity: normal
status: open
title: time.sleep() should support objects with __float__
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-01-10 Thread miss-islington


miss-islington  added the comment:


New changeset 1cbd17c6987afc48c16caa7ccc7d19b01fbd39f2 by Miss Islington (bot) 
in branch '3.7':
bpo-24746: Fix doctest failures when running the testsuite with -R (GH-11501)
https://github.com/python/cpython/commit/1cbd17c6987afc48c16caa7ccc7d19b01fbd39f2


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-01-10 Thread Nj Hsiong


New submission from Nj Hsiong :

python3's lib2to3 would fail in silence if python3 and its packages are 
installed as compiled .pyc files.

Root cause is in Lib/lib2to3/refactor.py, the function get_all_fix_names only 
searches '.py' fix names.

=below is workaround=
--- a/Lib/lib2to3/refactor.py
+++ b/Lib/lib2to3/refactor.py
@@ -37,6 +37,12 @@
 if remove_prefix:
 name = name[4:]
 fix_names.append(name[:-3])
+if name.startswith("fix_") and name.endswith(".pyc"):
+if remove_prefix:
+name = name[4:]
+name = name[:-4]
+if name not in fix_names:
+fix_names.append(name)
 return fix_names

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 93
nosy: njhsio
priority: normal
severity: normal
status: open
title: lib2to3 failed to convert as refactor's fixes not search.pyc files
type: behavior
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35470] A deadly decref in _PyImport_FindExtensionObjectEx()

2019-01-10 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 89c4f90df97f6039325e354167e8f507bf199fd9 by Serhiy Storchaka 
(Zackery Spytz) in branch 'master':
bpo-35470: Fix a reference counting bug in _PyImport_FindExtensionObjectEx(). 
(GH-11128)
https://github.com/python/cpython/commit/89c4f90df97f6039325e354167e8f507bf199fd9


--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35470] A deadly decref in _PyImport_FindExtensionObjectEx()

2019-01-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11047

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35470] A deadly decref in _PyImport_FindExtensionObjectEx()

2019-01-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11047, 11048

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2019-01-10 Thread AVINASH MISHRA


AVINASH MISHRA  added the comment:

hey i am a total newbie to open source contribution.
can you help me understand this issue and can i help solve this issue?

--
nosy: +AVINASH MISHRA

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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__ and __index__.

--
nosy: +remi.lapeyre

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 p%q == 0:
... return p // q
... else:
... return p / q
... 
>>> wibble(4, 2)
2
>>> wibble(3, 2)
1.5

This will also work for average.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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)
https://github.com/python/cpython/commit/3e3d57d8490b729a80c8cd9e90475dec122dfe9e


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 that values are rounded correctly. See also my 
PEP 564 "Add new time functions with nanosecond resolution".

The correct code works for float and int (and maybe decimal.Decimal, I don't 
recall!), but it seems like it doesn't support types with __float__(). You have 
to explicitly cast such objects using float(value).

PyNumber_Float() can be used to convert arbitrary object to a float, but I'm 
not sure in which order the conversion should be tried to avoid/reduce 
precision loss during the conversion.

Example:

>>> x=2**53+1; x - int(float(x))
1

If we convert 'x' (int) to float, we introduce an error of 1.

--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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)]
== Linux-4.19.13-300.fc29.x86_64-x86_64-with-glibc2.28 little-endian
== cwd: /home/vstinner/prog/python/master/build/test_python_26069
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
Run tests sequentially
0:00:00 load avg: 2.33 [1/1] test_ssl
test_ssl: testing with 'OpenSSL 1.1.1 FIPS  11 Sep 2018' (1, 1, 1, 0, 15)
  under 'Linux-4.19.13-300.fc29.x86_64-x86_64-with-glibc2.28'
  HAS_SNI = True
  OP_ALL = 0x8054
  OP_NO_TLSv1_1 = 0x1000
test_min_max_version (test.test_ssl.ContextTests) ... FAIL
test_min_max_version (test.test_ssl.ThreadedTests) ...  server:  new connection 
from ('127.0.0.1', 35268)
 server: connection cipher is now ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1.2', 
256)
 server: selected protocol is now None
 server:  new connection from ('127.0.0.1', 40390)
 server: connection cipher is now ('ECDHE-RSA-AES256-SHA', 'TLSv1.0', 256)
 server: selected protocol is now None
 server:  new connection from ('127.0.0.1', 36674)

 server:  bad connection attempt from ('127.0.0.1', 36674):
Traceback (most recent call last):
   File "/home/vstinner/prog/python/master/Lib/test/test_ssl.py", line 2150, in 
wrap_conn
self.sslconn = self.server.context.wrap_socket(
   File "/home/vstinner/prog/python/master/Lib/ssl.py", line 405, in wrap_socket
return self.sslsocket_class._create(
   File "/home/vstinner/prog/python/master/Lib/ssl.py", line 853, in _create
self.do_handshake()
   File "/home/vstinner/prog/python/master/Lib/ssl.py", line 1117, in 
do_handshake
self._sslobj.do_handshake()
 ssl.SSLError: [SSL: UNSUPPORTED_PROTOCOL] unsupported protocol (_ssl.c:1055)
ok

==
FAIL: test_min_max_version (test.test_ssl.ContextTests)
--
Traceback (most recent call last):
  File "/home/vstinner/prog/python/master/Lib/test/test_ssl.py", line 1069, in 
test_min_max_version
self.assertEqual(
AssertionError:  != 

--

Ran 2 tests in 0.026s

FAILED (failures=1)
test test_ssl failed
test_ssl failed

== Tests result: FAILURE ==

1 test failed:
test_ssl

Total duration: 269 ms
Tests result: FAILURE

vstinner@apu$ ./python -m test.pythoninfo|grep ^ssl
ssl.HAS_SNI: True
ssl.OPENSSL_VERSION: OpenSSL 1.1.1 FIPS  11 Sep 2018
ssl.OPENSSL_VERSION_INFO: (1, 1, 1, 0, 15)
ssl.OP_ALL: 0x8054
ssl.OP_NO_TLSv1_1: 0x1000

--
components: Tests
messages: 333402
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_ssl fails on Fedora 29: test_min_max_version()
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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)
https://github.com/python/cpython/commit/572168a016ece1b7346695eb7289190c46f1ae55


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 is released, you can easily hardcode the constant in 
your application. Such constant rarely change.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, this behavior is not currently possible with 
dataclasses.

I propose to change:

field(*, default=MISSING, default_factory=MISSING, repr=True, hash=None, 
init=True, compare=True, metadata=None)

to: 

field(*, default=MISSING, default_factory=MISSING, repr=True, hash=None, 
init=True, compare=True, metadata=None, target=None)

with target being used as the init parameter name for this field and in the 
repr.

If this is accepted, I can post the patch to make this change.

--
messages: 333409
nosy: remi.lapeyre
priority: normal
severity: normal
status: open
title: Make dataclasses.field() accept another name for __init__ field's name
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 not 
saying the module is broken, only that it can be improved.

For median([1, 1]), I believe that 1 is a better answer, particularly for 
school students. In other words, that making this change would improve Python.

As a pure mathematician, to me 1.0 means a number that is close to 1. Whereas 1 
means a number that is exactly 1..

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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


--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >