[issue38819] The redirect

2019-11-15 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

If you do the same in the standard python REPL, you get the same result.  So 
this behavior is not specific to IDLE, although one has to be slightly more 
careful restoring sys.stdout in IDLE.  (Restoring stdout from saved stdout 
should work the same without or with IDLE.  Restoring stdout from __stdout__ 
does not work in IDLE because IDLE redirects stdout from the original value.)

This tracker is for patching real bugs.  Questions about how to use python 
should be directed elsewhere, such as python-list.

--
assignee: terry.reedy -> 
resolution:  -> not a bug
stage:  -> 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



[issue38819] The redirect

2019-11-15 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

If your goal is to temporarily redirect stdout, there are a couple ways to do 
it:

with open('dest1.txt', 'w') as target_file:
print('hello world', file=target_file)

or:

with open('dest1.txt', 'w') as target_file:
with contextlib.redirect_stdout(target_file)
 print('hello world')

Both of these techniques temporarily alter where printing is directed.

In contrast, the code posted above permanently alters the target unless 
explictly reset.

--
nosy: +rhettinger

___
Python tracker 

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



[issue38814] Python3.7.5 crashes on OSX with my django project

2019-11-15 Thread Ned Deily


Ned Deily  added the comment:

Sorry but with a non-debug build of Python, it's not very likely someone would  
be able to glean much from the macOS crash stack trace here.  You also seem to 
have a very large number of C extension modules, some apparently from Homebrew 
and others from other sources ("/Users/USER/*/" ?). Also, I don't understand 
what you mean by:

"I use homebrew with the latest packages and python3.7.5 is now compiled from 
source, to avoid dependency problems."

And it seems you were reporting lots of problems on IRC beyond what is reported 
here.

The best I can suggest is to try to ensure that all binaries you are using are 
all from one source, for example, Homebrew or conda, and make sure any packages 
with C extension modules are built using the same python instance.  If the 
problem persists, you may need to consider installing a debug version of Python 
or building one from source (./configure --with-pydebug ... ) but for 3.7.x at 
least that means you will also need to rebuild all packages that have C 
extension modules as debug mode has a different ABI.

Please feel free to reopen this issue with a reproducible test case if further 
investigation suggests a problem with Python itself.  Good luck!

--
resolution:  -> third party
stage:  -> 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



[issue38819] The redirect

2019-11-15 Thread Alex


New submission from Alex <2423067...@qq.com>:

Hi.
This bug I've found is about the redirect, you know, to redirect the standard 
input/output stream. It's not really a bug, you can think of it as a feature.
The code is like this:

import sys
sys.stdout = open('redirect.txt','w')

print('hello world!') #Something you want to print
after you run it in the IDLE:

 RESTART: XXX.py===
>>> print(1 + 1)
>>>

You will find you can't output as normal.
The version I choose for this issue is Python 3.8.0b4. However, I find this 
problem is also exist in Python 3.7.5.
How to repair it?

--
assignee: terry.reedy
components: IDLE
messages: 356742
nosy: Alex-Python-Programmer, terry.reedy
priority: normal
severity: normal
status: open
title: The redirect
type: behavior
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



[issue34979] Python throws “SyntaxError: Non-UTF-8 code start with \xe8...” when parse source file

2019-11-15 Thread susaki

susaki  added the comment:

I think this issue is duplicated with #14811, I will close it.

The key point of this issue is that the size of `tok->buf` is fixed and equals 
to `BUFSIZ`(defined in stdio.h, have different value depends on OS).
one line of code will be truncated If it’s size exceeds `BUFSIZ`, then the 
function `valid_utf8` will failed.

You can increase the size of `s` to reproduce this issue.

✦ ➜ cat demo.py
s = 
'测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试'

✦ ➜ ./python -V
Python 3.7.4

✦ ➜ ./python demo.py
 File "demo.py", line 1
SyntaxError: Non-UTF-8 code starting with '\xe6' in file demo.py on line 1, but 
no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

--

___
Python tracker 

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



[issue30463] Add __slots__ to ABC convenience class

2019-11-15 Thread Chris Withers


Chris Withers  added the comment:

I will note that this means with:

class BaseClass(ABC):
pass


class MyDerivedClass(BaseClass):

def __init__(self, thing):
self.thing = thing

thing = MyDerivedClass()

thing now has both __slots__ and, evidently, a dict. That's a bit weird and 
confusing.

--
nosy: +cjw296

___
Python tracker 

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



[issue26011] Document necesities for cmp argument of sorted

2019-11-15 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> not a bug
stage:  -> 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



[issue38453] ntpath.realpath() does not fully resolve relative paths

2019-11-15 Thread miss-islington


miss-islington  added the comment:


New changeset 6f602fbd3568ed7bebadfa3c7d3de40a271216f9 by Miss Islington (bot) 
in branch '3.8':
bpo-38453: Ensure correct short path is obtained for test (GH-17184)
https://github.com/python/cpython/commit/6f602fbd3568ed7bebadfa3c7d3de40a271216f9


--

___
Python tracker 

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



[issue38818] Modify PyInterpreterState.eval_frame to pass tstate (PyThreadState)

2019-11-15 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +16694
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/17187

___
Python tracker 

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



[issue38765] `ast.AST._attributes` is used by `ast.dump()` but not documented

2019-11-15 Thread Pekka Klärck

Pekka Klärck  added the comment:

I know attributes starting with an underscore are typically considered private, 
but the already mentioned `_fields` clearly isn't and, for example, 
`namedtuple` has several methods like `_asdict()` and `_replace()` that are 
documented to be part of the public API. `_attributes` clearly is part of the 
API as well but it isn't at all documented.

--

___
Python tracker 

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



[issue33740] PyByteArray_AsString C-API description lacks the assurance, that the trailing null-byte is appended.

2019-11-15 Thread Batuhan


Batuhan  added the comment:

IMHO there is no need/way for adding that clarification after this date (1.5 
months left).

--
nosy: +BTaskaya, benjamin.peterson

___
Python tracker 

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



[issue38818] Modify PyInterpreterState.eval_frame to pass tstate (PyThreadState)

2019-11-15 Thread STINNER Victor


New submission from STINNER Victor :

Follow-up of bpo-36710 and bpo-38644: I would like to pass explicitly tstate 
(PyThreadState) to internal C functions.

The problem is that PyInterpreterState.eval_frame function has no tstate 
parameter. I propose attached PR to add a tstate parameter. It's a backward 
incompatible change. The "eval_frame" field comes from the PEP 523.

See also bpo-38500 "Provide a way to get/set PyInterpreterState.frame_eval 
without needing to access interpreter internals".

--
components: Interpreter Core
messages: 356736
nosy: brett.cannon, vstinner
priority: normal
severity: normal
status: open
title: Modify PyInterpreterState.eval_frame to pass tstate (PyThreadState)
versions: Python 3.9

___
Python tracker 

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



[issue37083] Document TYPE_COMMENT in documentation reference for compound statements

2019-11-15 Thread Batuhan


Batuhan  added the comment:

@pablogsal, PR 13202 is merged

--
nosy: +BTaskaya

___
Python tracker 

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



[issue38453] ntpath.realpath() does not fully resolve relative paths

2019-11-15 Thread Steve Dower


Steve Dower  added the comment:


New changeset 7c6130c8c36c941255365e5414c956fc919b8629 by Steve Dower in branch 
'master':
bpo-38453: Ensure correct short path is obtained for test (GH-17184)
https://github.com/python/cpython/commit/7c6130c8c36c941255365e5414c956fc919b8629


--

___
Python tracker 

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



[issue38453] ntpath.realpath() does not fully resolve relative paths

2019-11-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16693
pull_request: https://github.com/python/cpython/pull/17186

___
Python tracker 

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



[issue38644] Pass explicitly tstate to function calls

2019-11-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 51edf8aaa2e17626f9690ed29d25945fc03016b9 by Victor Stinner in 
branch 'master':
bpo-38644: Cleanup ceval.h (GH-17185)
https://github.com/python/cpython/commit/51edf8aaa2e17626f9690ed29d25945fc03016b9


--

___
Python tracker 

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



[issue38644] Pass explicitly tstate to function calls

2019-11-15 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b5e170f127b57d5b0a4fb58f316acd6191509dce by Victor Stinner in 
branch 'master':
bpo-38644: Add _PyEval_EvalCode() (GH-17183)
https://github.com/python/cpython/commit/b5e170f127b57d5b0a4fb58f316acd6191509dce


--

___
Python tracker 

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



[issue26011] Document necesities for cmp argument of sorted

2019-11-15 Thread Batuhan


Batuhan  added the comment:

I agree with @josh.r, also for the key (and reverse), they are documented in 
py3.8. IMHO this issue can be resolved as not a bug.

--
nosy: +BTaskaya

___
Python tracker 

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



[issue38446] Ambiguous signature for builtins.__build_class__

2019-11-15 Thread Batuhan


Batuhan  added the comment:

This issue is fixed with PR 16735, @pablogsal can we close it?

--
nosy: +BTaskaya, pablogsal

___
Python tracker 

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



[issue38644] Pass explicitly tstate to function calls

2019-11-15 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16692
pull_request: https://github.com/python/cpython/pull/17185

___
Python tracker 

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



[issue38817] Immutable types inplace operations work incorrect in async

2019-11-15 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> Inplace operation is expected to occur only at the time when 
> the second operand is evaluated.

That expectation does not match the implementation and it likely isn't possible 
to get that to work.   In-place operations on immutable objects necessarily 
create a new object, so the operation isn't as atomic as one might expect (the 
lookup and the assignment are two separate steps).

--
nosy: +rhettinger

___
Python tracker 

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



[issue35453] pathlib.Path: glob and rglob should accept PathLike patterns

2019-11-15 Thread Batuhan


Batuhan  added the comment:

> From what I see, there is no consensus yet.

@serhiy.storchaka said this isn't an issue. I can add tests about this behavior 
(as you mentioned) or this issue can be directly resolved as not a bug. What 
are you thinking @nanjekyejoannah and @serhiy.storchaka?

--

___
Python tracker 

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



[issue38453] ntpath.realpath() does not fully resolve relative paths

2019-11-15 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +16691
pull_request: https://github.com/python/cpython/pull/17184

___
Python tracker 

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



[issue38644] Pass explicitly tstate to function calls

2019-11-15 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +16690
pull_request: https://github.com/python/cpython/pull/17183

___
Python tracker 

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



[issue38453] ntpath.realpath() does not fully resolve relative paths

2019-11-15 Thread Steve Dower


Steve Dower  added the comment:

Thanks, Victor! That looks different from the one I was originally fixing (even 
though the long/short path mismatch is there), so I'll take a look.

--

___
Python tracker 

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



[issue38453] ntpath.realpath() does not fully resolve relative paths

2019-11-15 Thread Steve Dower


Steve Dower  added the comment:


New changeset 66c0f01f98fd6db0a4b1e789b9db9c7247a24ba9 by Steve Dower in branch 
'3.8':
bpo-38453: Ensure ntpath.realpath correctly resolves relative paths (GH-16967)
https://github.com/python/cpython/commit/66c0f01f98fd6db0a4b1e789b9db9c7247a24ba9


--

___
Python tracker 

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



[issue38813] math.modf() change integer returned part as integer instead of float

2019-11-15 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> Raymond, I think you've tricked yourself ;-)

Yup.

--

___
Python tracker 

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



[issue33125] Windows 10 ARM64 platform support

2019-11-15 Thread Dan


Dan  added the comment:

Steve, the 2.7 build I've posted includes native tk, do you need the necessary 
patches?

--

___
Python tracker 

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



[issue38453] ntpath.realpath() does not fully resolve relative paths

2019-11-15 Thread STINNER Victor


STINNER Victor  added the comment:

Grumpy AMD64 Windows10 3.x:
https://buildbot.python.org/all/#/builders/3/builds/3788

==
FAIL: test_realpath_cwd (test.test_ntpath.TestNtpath)
--
Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_ntpath.py", line 
424, in test_realpath_cwd
self.assertPathEqual(test_file_long, ntpath.realpath(test_file_short))
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_ntpath.py", line 
62, in assertPathEqual
self.assertEqual(path1, path2)
AssertionError: 'D:\\[76 
chars]worker_6956\\@test_6956_tmp\\MyVeryLongDirectoryName\\file.txt' != 
'D:\\[76 chars]worker_6956\\@test_6956_tmp\\MYVERY~1\\file.txt'
- 
D:\buildarea\3.x.bolen-windows10\build\build\test_python_6236\test_python_worker_6956\@test_6956_tmp\MyVeryLongDirectoryName\file.txt
?   
^ 
+ 
D:\buildarea\3.x.bolen-windows10\build\build\test_python_6236\test_python_worker_6956\@test_6956_tmp\MYVERY~1\file.txt
?   
^ ^

pythoninfo:

windows.RtlAreLongPathsEnabled: False

--

___
Python tracker 

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



[issue38453] ntpath.realpath() does not fully resolve relative paths

2019-11-15 Thread STINNER Victor


STINNER Victor  added the comment:

AMD64 Windows8.1 Non-Debug 3.x is grumpy:
https://buildbot.python.org/all/#/builders/12/builds/3459

==
FAIL: test_realpath_cwd (test.test_ntpath.TestNtpath)
--
Traceback (most recent call last):
  File 
"D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_ntpath.py", 
line 424, in test_realpath_cwd
self.assertPathEqual(test_file_long, ntpath.realpath(test_file_short))
  File 
"D:\buildarea\3.x.ware-win81-release.nondebug\build\lib\test\test_ntpath.py", 
line 62, in assertPathEqual
self.assertEqual(path1, path2)
AssertionError: 'D:\\[88 
chars]worker_4476\\@test_4476_tmp\\MyVeryLongDirectoryName\\file.txt' != 
'D:\\[88 chars]worker_4476\\@test_4476_tmp\\MYVERY~1\\file.txt'
- 
D:\buildarea\3.x.ware-win81-release.nondebug\build\build\test_python_4088\test_python_worker_4476\@test_4476_tmp\MyVeryLongDirectoryName\file.txt
?   
^ 
+ 
D:\buildarea\3.x.ware-win81-release.nondebug\build\build\test_python_4088\test_python_worker_4476\@test_4476_tmp\MYVERY~1\file.txt
?   
^ ^

--
nosy: +vstinner

___
Python tracker 

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



[issue26103] Contradiction in definition of "data descriptor" between (dotted lookup behavior/datamodel documentation) and (inspect lib/descriptor how-to)

2019-11-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16689
pull_request: https://github.com/python/cpython/pull/17180

___
Python tracker 

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



[issue38778] Document that os.fork is not allowed in subinterpreters

2019-11-15 Thread Eric Snow


Eric Snow  added the comment:

Flipping the label one more time did the trick.  Thanks again, Phil!

--
resolution:  -> fixed
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



[issue34651] Disallow fork in a subinterpreter.

2019-11-15 Thread miss-islington


miss-islington  added the comment:


New changeset a4be5aae6e587f5310f1fc0d66d37e032621ce39 by Miss Islington (bot) 
in branch '3.8':
bpo-38778: Document that os.fork is not allowed in subinterpreters (GH-17123)
https://github.com/python/cpython/commit/a4be5aae6e587f5310f1fc0d66d37e032621ce39


--

___
Python tracker 

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



[issue38816] Clarify about fork() and the CPython runtime in the C-API docs.

2019-11-15 Thread Eric Snow


Change by Eric Snow :


--
resolution:  -> fixed
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



[issue38778] Document that os.fork is not allowed in subinterpreters

2019-11-15 Thread miss-islington


miss-islington  added the comment:


New changeset a4be5aae6e587f5310f1fc0d66d37e032621ce39 by Miss Islington (bot) 
in branch '3.8':
bpo-38778: Document that os.fork is not allowed in subinterpreters (GH-17123)
https://github.com/python/cpython/commit/a4be5aae6e587f5310f1fc0d66d37e032621ce39


--

___
Python tracker 

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



[issue38816] Clarify about fork() and the CPython runtime in the C-API docs.

2019-11-15 Thread miss-islington


miss-islington  added the comment:


New changeset 7a5d4c7a8653cb6be126f87731802aa9a4bc90e2 by Miss Islington (bot) 
in branch '3.8':
bpo-38816: Add notes in the C-API docs about fork in subinterpreters. (GH-17176)
https://github.com/python/cpython/commit/7a5d4c7a8653cb6be126f87731802aa9a4bc90e2


--

___
Python tracker 

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



[issue38778] Document that os.fork is not allowed in subinterpreters

2019-11-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16687
pull_request: https://github.com/python/cpython/pull/17179

___
Python tracker 

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



[issue34651] Disallow fork in a subinterpreter.

2019-11-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +16688
pull_request: https://github.com/python/cpython/pull/17179

___
Python tracker 

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



[issue38816] Clarify about fork() and the CPython runtime in the C-API docs.

2019-11-15 Thread miss-islington


Change by miss-islington :


--
keywords: +patch
pull_requests: +16686
pull_request: https://github.com/python/cpython/pull/17178

___
Python tracker 

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



[issue38816] Clarify about fork() and the CPython runtime in the C-API docs.

2019-11-15 Thread miss-islington


miss-islington  added the comment:


New changeset 73cdb0c6b2c3861e034004cdc57be5e726876078 by Miss Islington (bot) 
(Eric Snow) in branch 'master':
bpo-38816: Add notes in the C-API docs about fork in subinterpreters. (GH-17176)
https://github.com/python/cpython/commit/73cdb0c6b2c3861e034004cdc57be5e726876078


--
nosy: +miss-islington

___
Python tracker 

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



[issue38782] Convert importlib.abc to use typing.Protocol

2019-11-15 Thread Ivan Levkivskyi


Change by Ivan Levkivskyi :


--
nosy: +levkivskyi

___
Python tracker 

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



[issue38805] locale.getlocale() returns a non RFC1766 language code

2019-11-15 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +lemburg

___
Python tracker 

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



[issue38788] Inconsistent documentation of tell/seek on textiobase/textiowrapper

2019-11-15 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +terry.reedy

___
Python tracker 

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



[issue38783] the window size is bigger than the specific size when create a window with a fix size in Windows platform

2019-11-15 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

When I add "master.update(); print(master.geometry())" I get "100x100+104+104". 
 I have the same Windows and 3.7+, but with tcl/tk *8.6*, not the ancient 8.4.  
 If you really are using the latter, I strongly suggest updating.  Even if not, 
your result is likely a tcl/tk 3rd party problem, not a tkinter problem.  So I 
suspect that this should be closed.

--
nosy: +serhiy.storchaka, terry.reedy

___
Python tracker 

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



[issue38755] Long unicode string causes SyntaxError: Non-UTF-8 code starting with '\xe2' in file ..., but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

2019-11-15 Thread Andrew Ushakov


Andrew Ushakov  added the comment:

> On Windows, with 3.7, 3.8.0, and master, neither the posted comment, the one 
> in the file, not the initial statement in #34979 give the SyntaxError.

Just tried again on my corporate laptop with the downloaded file from this site:

Microsoft Windows [Version 10.0.16299.1451]
(c) 2017 Microsoft Corporation. All rights reserved.

D:\Downloads>py
Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC v.1916 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()

D:\Downloads>py tst112.py
  File "tst112.py", line 1
SyntaxError: Non-UTF-8 code starting with '\xe2' in file tst112.py on line 1, 
but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

d:\Downloads>py -3.7
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul  8 2019, 20:34:20) [MSC v.1916 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()

d:\Downloads>py -3.7 tst112.py
  File "tst112.py", line 1
SyntaxError: Non-UTF-8 code starting with '\xe2' in file tst112.py on line 1, 
but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

--

___
Python tracker 

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



[issue38817] Immutable types inplace operations work incorrect in async

2019-11-15 Thread Anton Bryzgalov


Anton Bryzgalov  added the comment:

Example code (also is attached to the issue):


import asyncio

async def count_smth(seconds: int) -> int:
await asyncio.sleep(seconds)
return seconds * 3

async def small_job(d: dict, key: str, seconds: int) -> None:
d[key] += await count_smth(seconds)  # <-- strange happens here

async def main() -> None:
 d = dict(key=0)
 await asyncio.gather(
   small_job(d, 'key', 1),
   small_job(d, 'key', 2),
 )
 print(d['key'])  # expected: 0 + 1 * 3 + 2 * 3 = 9, actual: 6

if __name__ == '__main__':
asyncio.run(main())


Expected output: 0 + 1 * 3 + 2 * 3 = 9. Actual: 6. Seems to be a race condition.

Same happens for other immutable types: str, tuple (when used as values of dict 
instead of int). But works correctly with list and custom class with __iadd__ 
method.

Same effect for treading version (output is the same):


import time
import threading

def count_smth(seconds: int) -> int:
time.sleep(seconds)
return seconds * 3

def small_job(d: dict, key: str, seconds: int) -> None:
d[key] += count_smth(seconds)  # <-- strange happens here

def main() -> None:
d = dict(key=0)
t1 = threading.Thread(target=small_job, args=(d, 'key', 1))
t2 = threading.Thread(target=small_job, args=(d, 'key', 2))
t1.start()
t2.start()
t1.join()
t2.join()
print(d['key'])  # expected: 0 + 1 * 3 + 2 * 3 = 9, actual: 6

main()


Inplace operation is expected to occur only at the time when the second operand 
is evaluated.

--
Added file: https://bugs.python.org/file48718/inplace_bug_threading.py

___
Python tracker 

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



[issue38765] `ast.AST._attributes` is used by `ast.dump()` but not documented

2019-11-15 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

A leading underscore usually means that the name is private and should not be 
relied on.  We of course use private names to implement public objects, else 
they should not exist.  '_fields' is an exception, and I leave it to the ast 
experts to decide if '_attributes' should be also.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue25866] Reference 3. Data Model: miscellaneous minor cleanups on the word "sequence".

2019-11-15 Thread Alex


Change by Alex :


--
pull_requests: +16685
pull_request: https://github.com/python/cpython/pull/17177

___
Python tracker 

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



[issue25866] Reference 3. Data Model: miscellaneous minor cleanups on the word "sequence".

2019-11-15 Thread Alex


Alex  added the comment:

I've decided to raise a pull request for the patch, considering it's only been 
a few hours.

--

___
Python tracker 

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



[issue34979] Python throws “SyntaxError: Non-UTF-8 code start with \xe8...” when parse source file

2019-11-15 Thread Ezio Melotti


Change by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue34979] Python throws “SyntaxError: Non-UTF-8 code start with \xe8...” when parse source file

2019-11-15 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

On Windows, with 3.7, 3.8.0, and master, none of the demo.py statement here and 
the examples in #38755 raise an error.  I tried 'python -m module', running 
from IDLE editor, and interactive IDLE and REPL.  Even the following worked.

>>> s = (b'\xe2\x96\x91'*111).decode()
>>> s[-10:]
'░░'

susaki, what OS, and do you have the same problem with current Python (at least 
3.8)?

Also, susuki, when replying by email, please delete the quoted message.  When 
your message is added to the web page, the quoted message is redundant and 
distracting noise.

If this issue effectively duplicates (part of) #14811 and/or #25643, it should 
be closed as a duplicate of one of them.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue38817] Immutable types inplace operations work incorrect in async

2019-11-15 Thread Антон Брызгалов

New submission from Антон Брызгалов :

Example code (also is attached to the issue):


import asyncio

async def count_smth(seconds: int) -> int:
await asyncio.sleep(seconds)
return seconds * 3

async def small_job(d: dict, key: str, seconds: int) -> None:
d[key] += await count_smth(seconds)  # <-- strange happens here

async def main() -> None:
 d = dict(key=0)
 await asyncio.gather(
   small_job(d, 'key', 1),
   small_job(d, 'key', 2),
 )
 print(d['key'])  # expected: 0 + 1 * 3 + 2 * 3 = 9, actual: 6

if __name__ == '__main__':
asyncio.run(main())


Expected output: 0 + 1 * 3 + 2 * 3 = 9. Actual: 6. Seems to be a race condition.

Same happens for other immutable types: str, tuple (when used as values of dict 
instead of int). But works correctly with list and custom class with __iadd__ 
method.

--
components: Interpreter Core, asyncio
files: scratch_1.py
messages: 356710
nosy: asvetlov, yselivanov, Антон Брызгалов
priority: normal
severity: normal
status: open
title: Immutable types inplace operations work incorrect in async
type: behavior
versions: Python 3.6, Python 3.7
Added file: https://bugs.python.org/file48717/scratch_1.py

___
Python tracker 

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



[issue38755] Long unicode string causes SyntaxError: Non-UTF-8 code starting with '\xe2' in file ..., but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

2019-11-15 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I think that this should be closed as a duplicate of #34979 and this example 
posted there, with the OS and python version included.

On Windows, with 3.7, 3.8.0, and master, neither the posted comment, the one in 
the file, not the initial statement in #34979 give the SyntaxError.

--
nosy: +terry.reedy
stage:  -> test needed
type:  -> behavior

___
Python tracker 

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



[issue25866] Reference 3. Data Model: miscellaneous minor cleanups on the word "sequence".

2019-11-15 Thread Alex


Alex  added the comment:

dorosch, please note section 3.9 from the developers guide:

"When a patch exists in the issue tracker that should be converted into a 
GitHub pull request, please first ask the original patch author to prepare 
their own pull request. If the author does not respond after a week, it is 
acceptable for another contributor to prepare the pull request based on the 
existing patch."

It's been two hours, not a week, and I would've liked to raise a pull request 
for this change.

--

___
Python tracker 

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



[issue38813] math.modf() change integer returned part as integer instead of float

2019-11-15 Thread Tim Peters


Tim Peters  added the comment:

Raymond, I think you've tricked yourself ;-)  The prototype for C's duoble modf 
is

double modf(double x, double *intptr);

Yes, after the call *intptr is an exact integer, but in the double format.

>>> math.modf(1e300)
(0.0, 1e+300)

I don't think it would be doing anyone a real favor by returning

152504760255204420248704468581108159154915854115511802457988908195786371375080447864043704443832883878176942523235360430575644792184786706982848387200926575803737830233794788090059368953234970799945081119038967640880074652742780142494579258788820056842838115669472196386865459400540160

instead of 1e300 for "the integer part".

`frexp()` is very different, in that the second part is a (small!) integer 
exponent - a float would work for that too, but would be surprising.

>>> math.frexp(1e300)
(0.7466108948025751, 997)

A better analogy would be to math.floor(), which does return an int, even for 
cases like floor(1e300).  In Python 2 it did not (it returned an integer but in 
float format), and I believe it was a mistake to change it to return an int.  
Building giant ints is not what C does, so is surprising on that count alone, 
and is far more expensive than returning (as C does) a float.

That is, we didn't improve on C's floor, we introduced a surprising difference 
that sometimes hurts and rarely helps (if anyone really wanted an int, they 
could apply int() to the float result).

--

___
Python tracker 

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



[issue38750] Solve IPv4 categorisation issues with the ipaddress module

2019-11-15 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +pmoody

___
Python tracker 

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



[issue38812] Comparing datetime.time objects incorrect for TZ aware and unaware

2019-11-15 Thread Jason Killen


Jason Killen  added the comment:

This appears to be a bug in pytz which as far as I can tell is not part of the 
"standard" lib, at least it's not in Lib.

Running this example which does not use pytz:
from datetime import timedelta, datetime, tzinfo, timezone, time

# stole this from the docs, and beat it up a bit
class KabulTz(tzinfo):
def utcoffset(self, dt):
return timedelta(hours=4, minutes=30)

def fromutc(self, dt):
# Follow same validations as in datetime.tzinfo
if not isinstance(dt, datetime):
raise TypeError("fromutc() requires a datetime argument")
if dt.tzinfo is not self:
raise ValueError("dt.tzinfo is not self")

return dt + timedelta(hours=4)

def dst(self, dt):
# Kabul does not observe daylight saving time.
return timedelta(0)

def tzname(self, dt):
return "+04"

tzaware_time2 = time(7,30,tzinfo=timezone.utc)
tzaware_time1 = time(7,30,tzinfo=KabulTz())

tzunaware_time = time(7, 30)

tzaware_time1 < tzaware_time2

I get no error.

When I use your example I notice that utcoffset in pytz/tzinfo.py returns None 
for the Denver example but for the UTC object returns ZERO which happens to be 
timedelta(0) which seems correct.  It's weird to me that pytz is returning None 
in the Denver case because I think what it should return is right there in 
self._utcoffset.

More info: It looks like pytz isn't handling the fact that it's a time only 
type.  `dt` appears to be a datetime when utcoffset is called from a datetime.

--
nosy: +Jason.Killen

___
Python tracker 

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



[issue38816] Clarify about fork() and the CPython runtime in the C-API docs.

2019-11-15 Thread Eric Snow


New submission from Eric Snow :

The C-API docs are a bit sparse on the interplay between C fork() and the 
CPython runtime.

--
assignee: eric.snow
components: Documentation
messages: 356705
nosy: eric.snow, gregory.p.smith, pconnell
priority: normal
pull_requests: 16684
severity: normal
stage: patch review
status: open
title: Clarify about fork() and the CPython runtime in the C-API docs.
versions: Python 3.8, Python 3.9

___
Python tracker 

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



[issue25866] Reference 3. Data Model: miscellaneous minor cleanups on the word "sequence".

2019-11-15 Thread Andrei Daraschenka


Change by Andrei Daraschenka :


--
pull_requests: +16683
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/17175

___
Python tracker 

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



[issue38778] Document that os.fork is not allowed in subinterpreters

2019-11-15 Thread Eric Snow


Eric Snow  added the comment:

Nice work, Phil.  We need a backport to 3.8, but the miss-islington bot is 
having trouble with it. [1]  Either we can try flipping the "needs backport to 
3.8" label again or you could create a backport PR yourself (like 
miss-islington suggested).  If you do that then be sure to request a review 
from me. :)


[1] https://github.com/python/cpython/pull/17123#issuecomment-554469177

--
versions: +Python 3.9

___
Python tracker 

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



[issue38453] ntpath.realpath() does not fully resolve relative paths

2019-11-15 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +16682
pull_request: https://github.com/python/cpython/pull/17174

___
Python tracker 

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



[issue38811] Pathlib crashes when os module is missing 'link' method

2019-11-15 Thread Toke Høiland-Jørgensen

Toke Høiland-Jørgensen  added the comment:

Right, sure, that makes sense; thanks for clarifying :)

--

___
Python tracker 

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



[issue38453] ntpath.realpath() does not fully resolve relative paths

2019-11-15 Thread Steve Dower


Steve Dower  added the comment:


New changeset abde52cd8e31830bfc06c5803221faae6172104a by Steve Dower in branch 
'master':
bpo-38453: Ensure ntpath.realpath correctly resolves relative paths (GH-16967)
https://github.com/python/cpython/commit/abde52cd8e31830bfc06c5803221faae6172104a


--

___
Python tracker 

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



[issue38453] ntpath.realpath() does not fully resolve relative paths

2019-11-15 Thread Steve Dower


Steve Dower  added the comment:

I think the PR as it stands is a net improvement over where we currently are, 
so I'll merge it. We can make more tweaks as necessary.

--

___
Python tracker 

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



[issue35381] posixmodule: convert statically allocated types (DirEntryType & ScandirIteratorType) to heap-allocated types

2019-11-15 Thread Eddie Elizondo


Eddie Elizondo  added the comment:

Woops! I'll get to it before the end of the weekend!

--

___
Python tracker 

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



[issue38803] test_wait3 and test_wait4 leaked references on x86 Gentoo Refleaks 3.x

2019-11-15 Thread Eddie Elizondo


Eddie Elizondo  added the comment:

Woops! I'll get to it before the end of the weekend!

--
nosy: +eelizondo

___
Python tracker 

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



[issue38742] ElementTree won't parse comments before root element

2019-11-15 Thread Stefan Behnel


Stefan Behnel  added the comment:

Duplicate of issue 9521 (and issue 24287).

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> xml.etree.ElementTree skips processing instructions when parsing

___
Python tracker 

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



[issue34572] C unpickling bypasses import thread safety

2019-11-15 Thread Brett Cannon


Brett Cannon  added the comment:

3.6 and 3.5 are in security mode, so unless there's a security risk due to this 
bug the fix will not be backported to those older versions 
(https://devguide.python.org/#status-of-python-branches).

--

___
Python tracker 

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



[issue38811] Pathlib crashes when os module is missing 'link' method

2019-11-15 Thread Brett Cannon


Brett Cannon  added the comment:

Just an FYI a raised exception isn't considered a crash. For us a crash is a 
C-level crash like a segfault.

--
nosy: +brett.cannon
type: crash -> behavior

___
Python tracker 

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



[issue11354] argparse: nargs could accept range of options count

2019-11-15 Thread Raymond Hettinger


Change by Raymond Hettinger :


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



[issue38794] Setup: support linking openssl statically

2019-11-15 Thread Lukas Vacek


Lukas Vacek  added the comment:

Christian, I don't want to argue.

Feel free to close both this bug and the PR as "enhancement rejected". Adding 
one ./configure option is not really worth arguing over, I can always compile 
python as I need. I just tried to solve the same problem for others because 
other people also want a simple way to install a new version of Python on old 
distros and have a working ssl module. 

If my contribution is not welcome it's fine.

However, I have a feeling the reason for the rejection is not technical because 
after I stated I am happy to help solve the problem in other ways ("If you can 
think of a better real world solution than static linking OpenSSL please share 
and let's do it!") you literally twisted my words 180 degrees ("You are trying 
to solve a problem by dictating the solution at the same time."). This is very 
inappropriate.

--

___
Python tracker 

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



[issue34651] Disallow fork in a subinterpreter.

2019-11-15 Thread miss-islington


miss-islington  added the comment:


New changeset b22030073b9327a3aeccb69507694bce078192aa by Miss Islington (bot) 
(Phil Connell) in branch 'master':
bpo-38778: Document that os.fork is not allowed in subinterpreters (GH-17123)
https://github.com/python/cpython/commit/b22030073b9327a3aeccb69507694bce078192aa


--
nosy: +miss-islington

___
Python tracker 

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



[issue38815] test_ssl: test_min_max_version() fails on AMD64 FreeBSD Shared 3.x

2019-11-15 Thread STINNER Victor


STINNER Victor  added the comment:

Same failure on AMD64 FreeBSD Shared 3.8:
https://buildbot.python.org/all/#/builders/374/builds/32

FAIL: test_min_max_version (test.test_ssl.ContextTests)
FAIL: test_min_max_version_mismatch (test.test_ssl.ThreadedTests)

--

___
Python tracker 

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



[issue38778] Document that os.fork is not allowed in subinterpreters

2019-11-15 Thread miss-islington


miss-islington  added the comment:


New changeset b22030073b9327a3aeccb69507694bce078192aa by Miss Islington (bot) 
(Phil Connell) in branch 'master':
bpo-38778: Document that os.fork is not allowed in subinterpreters (GH-17123)
https://github.com/python/cpython/commit/b22030073b9327a3aeccb69507694bce078192aa


--
nosy: +miss-islington

___
Python tracker 

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



[issue38815] test_ssl: test_min_max_version() fails on AMD64 FreeBSD Shared 3.x

2019-11-15 Thread STINNER Victor


New submission from STINNER Victor :

Fail with OpenSSL 1.1.1d  10 Sep 2019 on AMD64 FreeBSD Shared 3.x:
https://buildbot.python.org/all/#/builders/371/builds/78

==
FAIL: test_min_max_version (test.test_ssl.ContextTests)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_ssl.py", 
line 1238, in test_min_max_version
self.assertIn(
AssertionError:  not found in {, }

==
FAIL: test_min_max_version_mismatch (test.test_ssl.ThreadedTests)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_ssl.py", 
line 220, in wrapper
return func(*args, **kw)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build/Lib/test/test_ssl.py", 
line 3840, in test_min_max_version_mismatch
self.assertIn("alert", str(e.exception))
AssertionError: 'alert' not found in '[SSL: NO_PROTOCOLS_AVAILABLE] no 
protocols available (_ssl.c:1108)'


SSL infos from pythoninfo:

ssl.HAS_SNI: True
ssl.OPENSSL_VERSION: OpenSSL 1.1.1d  10 Sep 2019
ssl.OPENSSL_VERSION_INFO: (1, 1, 1, 4, 15)
ssl.OP_ALL: 0x8054
ssl.OP_NO_TLSv1_1: 0x1000

ssl.SSLContext.maximum_version: TLSVersion.MAXIMUM_SUPPORTED
ssl.SSLContext.minimum_version: TLSVersion.MINIMUM_SUPPORTED
ssl.SSLContext.options: 
Options.OP_ALL|OP_NO_SSLv3|OP_CIPHER_SERVER_PREFERENCE|OP_ENABLE_MIDDLEBOX_COMPAT|OP_NO_COMPRESSION
ssl.SSLContext.protocol: _SSLMethod.PROTOCOL_TLS
ssl.SSLContext.verify_mode: VerifyMode.CERT_NONE

ssl.default_https_context.maximum_version: TLSVersion.MAXIMUM_SUPPORTED
ssl.default_https_context.minimum_version: TLSVersion.MINIMUM_SUPPORTED
ssl.default_https_context.options: 
Options.OP_ALL|OP_NO_SSLv3|OP_CIPHER_SERVER_PREFERENCE|OP_ENABLE_MIDDLEBOX_COMPAT|OP_NO_COMPRESSION
ssl.default_https_context.protocol: _SSLMethod.PROTOCOL_TLS
ssl.default_https_context.verify_mode: VerifyMode.CERT_REQUIRED

ssl.stdlib_context.maximum_version: TLSVersion.MAXIMUM_SUPPORTED
ssl.stdlib_context.minimum_version: TLSVersion.MINIMUM_SUPPORTED
ssl.stdlib_context.options: 
Options.OP_ALL|OP_NO_SSLv3|OP_CIPHER_SERVER_PREFERENCE|OP_ENABLE_MIDDLEBOX_COMPAT|OP_NO_COMPRESSION
ssl.stdlib_context.protocol: _SSLMethod.PROTOCOL_TLS
ssl.stdlib_context.verify_mode: VerifyMode.CERT_NONE

--
assignee: christian.heimes
components: SSL, Tests
messages: 356691
nosy: christian.heimes, vstinner
priority: normal
severity: normal
status: open
title: test_ssl: test_min_max_version() fails on AMD64 FreeBSD Shared 3.x
versions: Python 3.9

___
Python tracker 

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



[issue38276] test_asyncio: test_cancel_make_subprocess_transport_exec() failed on RHEL7 LTO + PGO 3.x

2019-11-15 Thread STINNER Victor


STINNER Victor  added the comment:

AMD64 Fedora Stable Refleaks 3.8:
https://buildbot.python.org/all/#/builders/260/builds/50

...
test_devnull_input 
(test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) ... ok
test_devnull_output 
(test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) ... ok
test_empty_input (test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) 
... ok
test_exec_loop_deprecated 
(test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) ... ok
test_kill (test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) ... ok
test_pause_reading 
(test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) ... ok
test_popen_error (test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) 
... ok
test_popen_error_with_stdin_pipe 
(test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) ... ok
test_read_stdout_after_process_exit 
(test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) ... ok
test_send_signal (test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) 
... ok
test_shell (test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) ... ok
test_shell_loop_deprecated 
(test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) ... ok
test_start_new_session 
(test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) ... ok
test_stdin_broken_pipe 
(test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) ... ok
test_stdin_not_inheritable 
(test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) ... ok
test_stdin_stdout 
(test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) ... ok
test_terminate (test.test_asyncio.test_subprocess.SubprocessFastWatcherTests) 
... ok
Timeout (3:15:00)!
Thread 0x7f59c7bf0740 (most recent call first):
  File 
"/home/buildbot/buildarea/3.8.cstratak-fedora-stable-x86_64.refleak/build/Lib/selectors.py",
 line 468 in select
  File 
"/home/buildbot/buildarea/3.8.cstratak-fedora-stable-x86_64.refleak/build/Lib/asyncio/base_events.py",
 line 1808 in _run_once
  File 
"/home/buildbot/buildarea/3.8.cstratak-fedora-stable-x86_64.refleak/build/Lib/asyncio/base_events.py",
 line 563 in run_forever
  File 
"/home/buildbot/buildarea/3.8.cstratak-fedora-stable-x86_64.refleak/build/Lib/asyncio/base_events.py",
 line 595 in run_until_complete
  File 
"/home/buildbot/buildarea/3.8.cstratak-fedora-stable-x86_64.refleak/build/Lib/test/test_asyncio/test_subprocess.py",
 line 440 in test_cancel_make_subprocess_transport_exec
  (...)

--

___
Python tracker 

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



[issue38814] Python3.7.5 crashes on OSX with my django project

2019-11-15 Thread László Károlyi

New submission from László Károlyi :

Hey,

I have a huge Django project that starts up fine with the dev server on Linux 
and in production that is also Linux. Whenever I try to start it on my OSX, the 
python process crashes with a SIGABRT and I get a crash window from OSX.

I use homebrew with the latest packages and python3.7.5 is now compiled from 
source, to avoid dependency problems.

Here's the log:
Process:   Python [85125]
Path:  
/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python
Identifier:Python
Version:   3.7.5 (3.7.5)
Code Type: X86-64 (Native)
Parent Process:fish [1857]
Responsible:   Terminal [1732]
User ID:   501

Date/Time: 2019-11-15 17:39:46.178 +0100
OS Version:Mac OS X 10.15.1 (19B88)
Report Version:12
Anonymous UUID:CC50B63E-FBC1-6461-576B-EE6AF1E52EFE

Sleep/Wake UUID:   A2774262-4258-4B95-8AAF-642CDEF9014E

Time Awake Since Boot: 28 seconds
Time Since Wake:   710 seconds

System Integrity Protection: enabled

Crashed Thread:0  Dispatch queue: com.apple.main-thread

Exception Type:EXC_CRASH (SIGABRT)
Exception Codes:   0x, 0x
Exception Note:EXC_CORPSE_NOTIFY

Termination Signal:Abort trap: 6
Termination Reason:Namespace SIGNAL, Code 0x6
Terminating Process:   Python [85125]

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib  0x7fff67936e1a __kill + 10
1   org.python.python   0x000100ab0614 os_kill + 57
2   org.python.python   0x0001009d910c 
_PyMethodDef_RawFastCallKeywords + 488
3   org.python.python   0x0001009d8698 
_PyCFunction_FastCallKeywords + 41
4   org.python.python   0x000100a6cfd0 call_function + 628
5   org.python.python   0x000100a65fab 
_PyEval_EvalFrameDefault + 6767
6   org.python.python   0x0001009d8a6c 
function_code_fastcall + 106
7   org.python.python   0x000100a6d03d call_function + 737
8   org.python.python   0x000100a66046 
_PyEval_EvalFrameDefault + 6922
9   org.python.python   0x000100a6d831 
_PyEval_EvalCodeWithName + 1698
10  org.python.python   0x0001009d8660 
_PyFunction_FastCallKeywords + 212
11  org.python.python   0x000100a6d03d call_function + 737
12  org.python.python   0x000100a65fab 
_PyEval_EvalFrameDefault + 6767
13  org.python.python   0x000100a6d831 
_PyEval_EvalCodeWithName + 1698
14  org.python.python   0x0001009d82d8 
_PyFunction_FastCallDict + 444
15  org.python.python   0x0001009d93df 
_PyObject_Call_Prepend + 131
16  org.python.python   0x0001009d87a5 PyObject_Call + 136
17  org.python.python   0x000100a6628f 
_PyEval_EvalFrameDefault + 7507
18  org.python.python   0x000100a6d831 
_PyEval_EvalCodeWithName + 1698
19  org.python.python   0x0001009d82d8 
_PyFunction_FastCallDict + 444
20  org.python.python   0x0001009d93df 
_PyObject_Call_Prepend + 131
21  org.python.python   0x0001009d87a5 PyObject_Call + 136
22  org.python.python   0x000100a6628f 
_PyEval_EvalFrameDefault + 7507
23  org.python.python   0x000100a6d831 
_PyEval_EvalCodeWithName + 1698
24  org.python.python   0x0001009d82d8 
_PyFunction_FastCallDict + 444
25  org.python.python   0x0001009d93df 
_PyObject_Call_Prepend + 131
26  org.python.python   0x0001009d87a5 PyObject_Call + 136
27  org.python.python   0x000100a6628f 
_PyEval_EvalFrameDefault + 7507
28  org.python.python   0x000100a6d831 
_PyEval_EvalCodeWithName + 1698
29  org.python.python   0x0001009d82d8 
_PyFunction_FastCallDict + 444
30  org.python.python   0x0001009d93df 
_PyObject_Call_Prepend + 131
31  org.python.python   0x0001009d87a5 PyObject_Call + 136
32  org.python.python   0x000100a6628f 
_PyEval_EvalFrameDefault + 7507
33  org.python.python   0x000100a6d831 
_PyEval_EvalCodeWithName + 1698
34  org.python.python   0x0001009d82d8 
_PyFunction_FastCallDict + 444
35  org.python.python   0x0001009d93df 
_PyObject_Call_Prepend + 131
36  org.python.python   0x0001009d87a5 PyObject_Call + 136
37  org.python.python   0x000100a6628f 
_PyEval_EvalFrameDefault + 7507
38  org.python.python   0x0001009d8a6c 
function_code_fastcall + 106
39  

[issue25866] Reference 3. Data Model: miscellaneous minor cleanups on the word "sequence".

2019-11-15 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Can you please turn this into a regular PR?

--
assignee: docs@python -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue11354] argparse: nargs could accept range of options count

2019-11-15 Thread Alex


Alex  added the comment:

Weighing up how little demand there seems to be for this, and how easy it is to 
achieve the same effect with post-processing within a hypothetical script that 
happens to need it - I agree with closing it.

--

___
Python tracker 

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



[issue38813] math.modf() change integer returned part as integer instead of float

2019-11-15 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

This is odd.  The underlying C library modf() returns an integer for the second 
part.  Likewise the Python math.frexp() function returns an integer for the 
second part.  So, I'm not sure why Python's math.modf() returns a float for the 
second field.

--
nosy: +mark.dickinson, rhettinger, tim.peters

___
Python tracker 

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



[issue38794] Setup: support linking openssl statically

2019-11-15 Thread Christian Heimes


Christian Heimes  added the comment:

> In ideal world OpenSSL would provide stable ABI just like the other libraries 
> Python depends on. That would be, unarguably, the best way to achieve that 
> goal. Agreed.

OpenSSL provides a stable API and stable ABI already. The fact is well 
documented at https://www.openssl.org/policies/releasestrat.html. Python is not 
compatible with ancient, unsupported OpenSSL versions 1.0.1 and earlier because 
Python requires features that were introduced in OpenSSL 1.0.2.

> However, OpenSSL does not provide stable ABI and Python should deal with that 
> as nicely as possible. If you can think of a better real world solution than 
> static linking OpenSSL please share and let's do it!

That's a) incorrect, b) not related to this issue.

You are trying to solve a problem by dictating the solution at the same time. 
Could you please start with a high level explanation of the problem and let us 
figure out a viable solution?

--

___
Python tracker 

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



[issue35453] pathlib.Path: glob and rglob should accept PathLike patterns

2019-11-15 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:

@BTaskaya From what I see, there is no consensus yet.If you are interested in 
exploring, go on.

--

___
Python tracker 

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



[issue38794] Setup: support linking openssl statically

2019-11-15 Thread Lukas Vacek

Lukas Vacek  added the comment:

In ideal world OpenSSL would provide stable ABI just like the other libraries 
Python depends on. That would be, unarguably, the best way to achieve that 
goal. Agreed.

Aferall frequent OpenSSL ABI breakages are the reason why apple switched to 
their own cryptography ABI 
(https://developer.apple.com/library/archive/documentation/Security/Conceptual/cryptoservices/SecureNetworkCommunicationAPIs/SecureNetworkCommunicationAPIs.html):

"""
Although OpenSSL is commonly used in the open source community, it doesn’t 
provide a stable API from version to version. For this reason, the programmatic 
interface to OpenSSL is deprecated in macOS and is not provided in iOS. Use of 
the Apple-provided OpenSSL libraries by apps is strongly discouraged.

To ensure compatibility, if your app depends on OpenSSL, you should compile it 
yourself and statically link a known version of OpenSSL into your app. Such use 
works on both iOS and macOS.
"""

However, OpenSSL does not provide stable ABI and Python should deal with that 
as nicely as possible. If you can think of a better real world solution than 
static linking OpenSSL please share and let's do it!

--

___
Python tracker 

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



[issue35453] pathlib.Path: glob and rglob should accept PathLike patterns

2019-11-15 Thread Batuhan


Batuhan  added the comment:

@nanjekyejoannah, are you still interested in adding tests or can i add tests?

--
nosy: +BTaskaya

___
Python tracker 

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



[issue3530] ast.NodeTransformer doc bug

2019-11-15 Thread Batuhan


Change by Batuhan :


--
keywords: +patch
pull_requests: +16681
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/17172

___
Python tracker 

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



[issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag)

2019-11-15 Thread Dong-hee Na


Dong-hee Na  added the comment:

Dear Core developers

Although I updated the unit test for this issue if the reverting is a better 
way. Please let me know.
I am happy to follow the decision. :)

Thanks always

--

___
Python tracker 

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



[issue38813] math.modf() change integer returned part as integer instead of float

2019-11-15 Thread aikimark1955


New submission from aikimark1955 :

The description for this function reads:
"Return the fractional and integer parts of x. Both results carry the sign of x 
and are floats."

Since the second returned value is "integer parts", I submit that the value 
should be integer.

--
components: Library (Lib)
messages: 356680
nosy: aikimark1955
priority: normal
severity: normal
status: open
title: math.modf() change integer returned part as integer instead of float
type: behavior

___
Python tracker 

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



[issue7687] Bluetooth support untested

2019-11-15 Thread Batuhan


Change by Batuhan :


--
nosy: +BTaskaya
versions: +Python 3.9 -Python 2.7, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue38794] Setup: support linking openssl statically

2019-11-15 Thread Christian Heimes


Christian Heimes  added the comment:

I'm drawing a different conclusion from these posts. It sounds to me like 
people want a simple way to install a new version of Python on old distros and 
have a working ssl module. Static linking is one possible way to archive the 
goal. I argue that it is not necessarily the best way, especially in the light 
of OpenSSL 3.0.0, dynamic engines and the new crypto providers.

--

___
Python tracker 

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



[issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag)

2019-11-15 Thread Dong-hee Na


Dong-hee Na  added the comment:

@Michael.Felt

Thanks for the suggestion.
I 've updated the PR to skip the test on AIX.

cc @vstinner

--

___
Python tracker 

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



[issue21767] singledispatch docs should explicitly mention support for abstract base classes

2019-11-15 Thread Batuhan


Change by Batuhan :


--
keywords: +patch
pull_requests: +16680
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/17171

___
Python tracker 

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



[issue23407] os.walk always follows Windows junctions

2019-11-15 Thread Jim Carroll


Jim Carroll  added the comment:

I can confirm the os.walk() behavior still exists on 3.8. Just curious on the 
status of the patch?

--
nosy: +jamercee

___
Python tracker 

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



[issue38794] Setup: support linking openssl statically

2019-11-15 Thread Lukas Vacek


Lukas Vacek  added the comment:

However, I'm still convinced many would appreciate adding this ./configure 
option:

https://github.com/pyenv/pyenv/issues/1184#issuecomment-403149437
https://joshspicer.com/python37-ssl-issue
https://superuser.com/questions/1428109/install-python-3-7-3-from-source-with-ssl-failed
https://raspberrypi.stackexchange.com/questions/88150/how-to-install-python-3-7-with-ssl
https://stackoverflow.com/questions/53543477/building-python-3-7-1-ssl-module-failed
https://help.dreamhost.com/hc/en-us/articles/115000702772-Installing-a-custom-version-of-Python-3#3.7.1
https://stackoverflow.com/questions/55928393/compile-python-3-6-statically-with-openssl
https://readthisblog.net/2018/08/13/til-how-to-build-python-3-7-with-statically-linked-libssl-and-libcrypto/
https://gist.github.com/eddy-geek/9604982

If you look at the associated PR you will see it should work fine, and be 
useful, on other POSIX systems as well. I can test on *BSD if necessary.

Only extra depedency of --with-openssl-static compared to --with-openssl is an 
assumption of existing files libssl.a libcrypto.a and OpenSSL has provided 
these files (when compiled static) since the very beginning despite somewhat 
frequent ABI changes. Option --with-openssl-static works with current libressl 
as well.

--

___
Python tracker 

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



[issue22367] Add open_file_descriptor parameter to fcntl.lockf() (use the new F_OFD_SETLK flag)

2019-11-15 Thread Michael Felt


Michael Felt  added the comment:

@corona10

The AIX bot's are also in the red zone with PR17010.

This was examined earlier See: https://bugs.python.org/issue35633#msg333662

In short, the recommendation by Victor was to skip the test: quote:
> On AIX the test for flock() passes, but the test for lockf() fails: (...)

I would prefer to simply skip the lockf() test rather than ignoring 
PermissionError for flock() and lockf() on all platforms. 

And so,  Lib/test/eintrdata/eintr_tester.py now has:

@unittest.skipIf(platform.system() == "AIX", "AIX returns PermissionError")
def test_lockf(self):
self._lock(fcntl.lockf, "lockf")


Thanks for your understanding.

--
nosy: +Michael.Felt

___
Python tracker 

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



[issue38808] weird bug while using a for loop and array

2019-11-15 Thread Zach kuunka


Zach kuunka  added the comment:

I will check that out, Thank you

--

___
Python tracker 

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



[issue38812] Comparing datetime.time objects incorrect for TZ aware and unaware

2019-11-15 Thread Mike


New submission from Mike :

import pytz
import datetime

tzaware_time1 = datetime.time(7,30,tzinfo=pytz.timezone("America/Denver"))
tzaware_time2 = datetime.time(7,30,tzinfo=pytz.utc)

tzunaware_time = datetime.time(7, 30)

# This fails with exception: TypeError: can't compare offset-naive and 
offset-aware times
# even though both ARE tz aware.
tzaware_time1 < tzaware_time2

# This does NOT raise an exception and should since one is aware and one isn't.
tzunaware_time < tzaware_time1

--
messages: 356673
nosy: epicadv
priority: normal
severity: normal
status: open
title: Comparing datetime.time objects incorrect for TZ aware and unaware
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



[issue38591] Deprecate Process Child Watchers

2019-11-15 Thread Kyle Stanley


Kyle Stanley  added the comment:

> I think so. It will take a long before we remove it though.

In that case, it could be a long term deprecation notice, where we start the 
deprecation process without having a definitive removal version. This will at 
least encourage users to look towards using the other watchers instead of 
FastChildWatcher. I can start working on a PR.

--

___
Python tracker 

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



[issue29620] unittest.TestCase.assertWarns raises RuntimeEror if sys.modules changes size

2019-11-15 Thread Arthit Suriyawongkul


Arthit Suriyawongkul  added the comment:

Confirmed this behavior on
- Python 3.6.8 64-bit on Windows Server 2016 (AppVeyor "Visual Studio 2017" 
build environment)
- Python 3.6.7 64-bit on Linux

--
nosy: +Arthit Suriyawongkul

___
Python tracker 

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



[issue38811] Pathlib crashes when os module is missing 'link' method

2019-11-15 Thread Toke Høiland-Jørgensen

Change by Toke Høiland-Jørgensen :


--
keywords: +patch
pull_requests: +16678
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/17170

___
Python tracker 

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



[issue26978] Implement pathlib.Path.link (Using os.link)

2019-11-15 Thread Toke Høiland-Jørgensen

Change by Toke Høiland-Jørgensen :


--
pull_requests: +16679
pull_request: https://github.com/python/cpython/pull/17170

___
Python tracker 

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



  1   2   >