[issue37106] python re.escape doesn't escape some special characters.

2019-05-30 Thread MANI M


MANI M  added the comment:

Thanks a lot for the info. May I know in what version of python the patches are 
applied? Because still 3.7.3 seems to have the issue.

--

___
Python tracker 

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



[issue30835] AttributeError when parsing multipart email with invalid non-decodable Content-Transfer-Encoding

2019-05-30 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
nosy: +Jeffrey.Kintscher

___
Python tracker 

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



[issue36910] Certain Malformed email causes email.parser to throw AttributeError

2019-05-30 Thread Abhilash Raj


Abhilash Raj  added the comment:

I am not sure which 2nd PR are we talking about here?

The reported exception stems from Lib/email/feedparser.py#L323 and same is 
fixed in PR (https://github.com/python/cpython/pull/13598) for bpo-30835.

--

___
Python tracker 

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



[issue37029] PyObject_Free is O(N) where N = # of arenas

2019-05-30 Thread Tim Peters


Tim Peters  added the comment:

Added file arena.py.  This adds some code to the OP's original test, to print 
out build time and teardown time, and display obmalloc stats.

You'll need at least 80GB of RAM to run it - I don't have that much.  Building 
the tree may take on the order of an hour, but the time to tear it down is 
what's interesting here.  Apparently 3.7.3 needs more than 4 hours to reclaim 
the memory.

--
Added file: https://bugs.python.org/file48378/arena.py

___
Python tracker 

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



[issue37103] Undo deprecation of optparse

2019-05-30 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

See also issue25521

--
nosy: +xtreak

___
Python tracker 

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



[issue37106] python re.escape doesn't escape some special characters.

2019-05-30 Thread Karthikeyan Singaravelan

Karthikeyan Singaravelan  added the comment:

Please consider posting text content instead of images for better 
accessibility. This could be due to issue29995.

➜  cpython git:(master) python3.6
Python 3.6.4 (default, Mar 12 2018, 13:42:53)
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> a = r"Hello'`~world"
>>> re.escape(a)
"Hello\\'\\`\\~world"

➜  cpython git:(master) python3.7
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 16:52:21)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> a = r"Hello'`~world"
>>> re.escape(a)
"Hello'`\\~world"

--
nosy: +serhiy.storchaka, xtreak

___
Python tracker 

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



[issue36910] Certain Malformed email causes email.parser to throw AttributeError

2019-05-30 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

The PR for bpo-30835 changes code in a different source file. I suggest 
adopting both PRs so that future changes don't accidentally reintroduce either 
bug.

--

___
Python tracker 

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



[issue37106] python re.escape doesn't escape some special characters.

2019-05-30 Thread MANI M


New submission from MANI M :

Recently I figured out an issue in python3 re which doesn't escape some special 
characters.
Not sure whether this bug has been reported already.
Have attached screenshots for your reference.

Steps to reproduce:
1. wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz
2. tar -xvzf Python-3.7.3.tar.xz
3. cd Python-3.7.3
4. ./configure
5. make
6. make install.

GCC version: gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36)
OS: CentOS Linux release 7.6.1810 (Core)

--
components: Regular Expressions
files: python_3.7.3_bug.png
messages: 344020
nosy: MANI M, ezio.melotti, mrabarnett
priority: normal
severity: normal
status: open
title: python re.escape doesn't escape some special characters.
type: behavior
versions: Python 3.7
Added file: https://bugs.python.org/file48377/python_3.7.3_bug.png

___
Python tracker 

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



[issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream

2019-05-30 Thread Kubilay Kocak


Kubilay Kocak  added the comment:

@Andrew That would be great, as having failing buildbots can hide new 
regressions that end up taking much longer to identify and fix as they are 
hidden, and is better for you than reverting implementation code

--

___
Python tracker 

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



[issue36910] Certain Malformed email causes email.parser to throw AttributeError

2019-05-30 Thread Abhilash Raj


Abhilash Raj  added the comment:

This is a dupe of https://bugs.python.org/issue30835, which has an attached PR.

I have verified the provided test case is fixed by the PR for bpo-30835.

--
nosy: +maxking

___
Python tracker 

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



[issue36411] Python 3 f.tell() gets out of sync with file pointer in binary append+read mode

2019-05-30 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

I ran another C test where I called lseek(fd, 0, SEEK_CUR) in-between each of 
the stream I/O functions to see how it reports the buffered and kernel file 
positions:

opening file with wb
writing 3 bytes to file
lseek: 0
ftell(f): expecting 3, got 3
lseek: 3
closing file
opening file with a+b
lseek: 3
ftell(f): expecting 3, got 3
lseek: 3
writing 3 bytes to file
lseek: 3
ftell(f): expecting 6, got 6
lseek: 6
fseek(f, 0, SEEK_SET): expecting 0, got 0
lseek: 0
ftell(f): expecting 0, got 0
lseek: 0
writing 3 bytes to file
lseek: 0
ftell(f): expecting 9, got 9
lseek: 9
writing 3 bytes to file
lseek: 9
ftell(f): expecting 12, got 12
lseek: 12
fseek(f, 0, SEEK_CUR): expecting 0, got 0
lseek: 12
ftell(f): expecting 12, got 12
lseek: 12
fseek(f, 0, SEEK_SET): expecting 0, got 0
lseek: 0
fread(buf, 1, 256, f): expecting 12, got 12
lseek: 12
expecting 'abcdefghijkl', got 'abcdefghijkl'
closing file
removing file

The C library fseek() and ftell() functions update the kernel file position, 
but fwrite() doesn't (because it hasn't overflowed its write buffer). The 
kernel doesn't allow seeking past the end of the file, so it looks like fseek() 
and ftell() are flushing the C library's write buffer because the subsequent 
lseek() calls return the same value.

My observation of Python 3 and C library behavior with read/write append mode:

Bufferred write:
C - write to memory buffer, no kernel position updates unless the buffer is 
flushed to the kernel by buffer overflow
Python - same as C

Buffered seek:
C - write buffer is flushed to the kernel to update the kernel position, then a 
kernel seek operation is performed and the new location reported by the kernel 
is returned
Python - same as C

Buffered tell:
C - identical behavior as buffered seek; semantically a wrapper for fseek(f, 0, 
SEEK_CUR)
Python - the position is calculated using the last queried kernel position and 
the dirty buffer length, the kernel position is queried only if a kernel 
position hasn't been previously queried since the file was opened


Having the buffered I/O library keep track of the file position is attractive 
in that it saves time by skipping a few kernel calls, but, as demonstrated, it 
can easily get out of sync. I'm sure I can come up with a way to fix the 
accounting to work properly without querying the kernel, but I don't think that 
is a good solution.

I see dangers with trying to track the file position in the library independent 
of the kernel. For one, when the file is opened with the append flag, the 
kernel changes the position to the end of the file with every write. Yes, that 
can be tracked with careful code in the library, except when the file is opened 
two or more times and written to using different file descriptors. This is a 
common scenario for log files, with appends being performed by multiple 
processes. The only mitigation is to use file locking to guarantee exclusive 
file access, but the semantics vary from system to system and it is not 
universally supported.

My preferred solution is to follow the C library semantics and turn buffered 
tell() into a wrapper for buffered seek(0, io.SEEK_CUR). Please, let me know if 
there are some semantics I haven't considered.

--

___
Python tracker 

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



[issue36974] Implement PEP 590

2019-05-30 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 530f506ac91338b55cf2be71b1cdf50cb077512f by Benjamin Peterson 
(Jeroen Demeyer) in branch 'master':
bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async 
(GH-13464)
https://github.com/python/cpython/commit/530f506ac91338b55cf2be71b1cdf50cb077512f


--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue37105] Add deprecated-remove information on stream doc

2019-05-30 Thread Emmanuel Arias


Change by Emmanuel Arias :


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

___
Python tracker 

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



[issue37105] Add deprecated-remove information on stream doc

2019-05-30 Thread Emmanuel Arias


New submission from Emmanuel Arias :

According to the code on streams.py the functions:
open_connection(), start_server(), open_unix_connection(),
start_unix_server() are deprecated. I inform that on
documentation.

--
assignee: docs@python
components: Documentation
messages: 344015
nosy: docs@python, eamanu
priority: normal
severity: normal
status: open
title: Add deprecated-remove information on stream doc
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



[issue37091] subprocess - uncaught PermissionError in send_signal can cause hang

2019-05-30 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Clarifying: The problem is that the TimeoutExpired exception that is desired 
was replaced with a PermissionError that the caller isn't expecting to catch 
and handle.

--

___
Python tracker 

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



[issue37091] subprocess - uncaught PermissionError in send_signal can cause hang

2019-05-30 Thread Gregory P. Smith


Change by Gregory P. Smith :


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



[issue37091] subprocess - uncaught PermissionError in send_signal can cause hang

2019-05-30 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
assignee:  -> gregory.p.smith

___
Python tracker 

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



[issue29262] Provide a way to check for *real* typing.Union instances

2019-05-30 Thread Ivan Levkivskyi


Change by Ivan Levkivskyi :


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

___
Python tracker 

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



[issue36839] Support the buffer protocol in code objects

2019-05-30 Thread Inada Naoki


Inada Naoki  added the comment:

> In the Instagram case there's about 20mb of byte code total and there are 3-4 
> dozen worker processes running per server.  The byte code also represents the 
> second largest section of memory as far as serialized code objects are 
> concerned, the only larger one is strings (which are about 25mb).  

How did you measure it?  How much % of the RAM usage of process?  What 
"serialized code objects are concerned" means?  Don't you concern RAM usage in 
process?


> FWIW, I don't see the problem with supporting any read-only "buffer" object, 
> rather than just bytes objects, for the string of bytes in a code object.  
> That's all that Dino is proposing.

It means byte code is changed in anytime by anyone other than code object.
code object is not immutable anymore.  "read-only" means only code object 
doesn't change the co_code.  Anyone else can modify it without breaking Python 
(and Python/C API) semantics.

For example, per-opcode cache can't assume opcode is not changed.
I think there are some other possible optimization from co_code is constant.

Another complexity is GC.  We allowed only bytes here (no subclass allowed) and 
it allow us to code object is non-GC object.

If we allow any object implementing buffer protocol, we should make code object 
as GC object.  We can untrack the code object if co_code is bytes (like tuples 
does), but all code objects needs 16byte header (like tuples requires it...)

Of course we can break the rule and allow Python makes circular reference not 
collected.

But please don't think changing from bytes to arbitrary objects is simple 
change.

I think it needs significant benefits for typical users, not only for Instagram.
If only Instagram get benefit from this, keep it as Instagram's internal patch.

--

___
Python tracker 

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



[issue29262] Provide a way to check for *real* typing.Union instances

2019-05-30 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:


New changeset 4c23aff065fb28aba789a211937a2af974842110 by Ivan Levkivskyi in 
branch 'master':
bpo-29262: Add get_origin() and get_args() introspection helpers to typing 
(GH-13685)
https://github.com/python/cpython/commit/4c23aff065fb28aba789a211937a2af974842110


--

___
Python tracker 

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



[issue36271] '_io.TextIOWrapper' object has no attribute 'mode'

2019-05-30 Thread Berker Peksag


Berker Peksag  added the comment:

Thank you for the report. This is a duplicate of issue 32655.

--
nosy: +berker.peksag
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> File mode should be a constant

___
Python tracker 

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



[issue32655] File mode should be a constant

2019-05-30 Thread Berker Peksag


Berker Peksag  added the comment:

Changing the value of mode also changes its repr. This seems like a bug to me. 
It's probably too late to change TextIOWrapper.__repr__(). I think this needs 
to be discussed on python-dev first.

>>> f = open("README.rst")
>>> f
<_io.TextIOWrapper name='README.rst' mode='r' encoding='UTF-8'>
>>> f.writable()
False
>>> f.mode = "w"
>>> f.writable()
False
>>> f
<_io.TextIOWrapper name='README.rst' mode='w' encoding='UTF-8'>

There's an commented-out code in the initial checkin:

https://github.com/python/cpython/commit/4fa88fa0ba35e25ad9be66ebbdaba9aca553dc8b#diff-b67be9e0a41447de808ba3b7099a44a8R2341

/*{"mode", (getter)TextIOWrapper_mode_get, NULL, NULL},
*/

TextIOWrapper.__repr__() was updated to include 'mode' in 
https://github.com/python/cpython/commit/a4815caa7ccf21aa994d0e0eec66873072f0e352

See issue 36271 for a related report. The OP was confused because we don't set 
mode manually in gzip.open() and bz2.open() (as opposed to what we do in 
io.open() and tokenize.open())

--
nosy: +berker.peksag, pitrou
stage:  -> test needed
versions: +Python 3.9 -Python 3.7

___
Python tracker 

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



[issue35950] io.BufferedReader.writabe is False, but io.BufferedReader.truncate does not raise OSError

2019-05-30 Thread Berker Peksag


Change by Berker Peksag :


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

___
Python tracker 

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



[issue36839] Support the buffer protocol in code objects

2019-05-30 Thread Dino Viehland


Dino Viehland  added the comment:

Well given that we're one day away from 3.8 Beta 1 I'm not going to rush this 
in :)  In particular the discussion has made me wonder if I can also do more 
with sharing strings using the legacy unicode strings (which I don't believe 
will require any runtime changes).  So I'll keep pushing on this and hopefully 
be able to demonstrate an even large win from the concept.

--

___
Python tracker 

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



[issue12639] msilib Directory.start_component() fails if keyfile is not None

2019-05-30 Thread Zackery Spytz


Change by Zackery Spytz :


--
nosy: +ZackerySpytz
type:  -> behavior
versions: +Python 2.7, Python 3.7, Python 3.8 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue12639] msilib Directory.start_component() fails if keyfile is not None

2019-05-30 Thread Zackery Spytz


Change by Zackery Spytz :


--
pull_requests: +13576
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/13688

___
Python tracker 

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



[issue5028] tokenize.generate_tokens doesn't always return logical line

2019-05-30 Thread miss-islington


miss-islington  added the comment:


New changeset 2a58b0636d1f620f8a85a2e4c030cc10551936a5 by Miss Islington (bot) 
(Anthony Sottile) in branch 'master':
bpo-5028: Fix up rest of documentation for tokenize documenting line (GH-13686)
https://github.com/python/cpython/commit/2a58b0636d1f620f8a85a2e4c030cc10551936a5


--
nosy: +miss-islington

___
Python tracker 

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



[issue37104] logging.Logger.disabled is not documented

2019-05-30 Thread Mario Corchero


Change by Mario Corchero :


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

___
Python tracker 

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



[issue37104] logging.Logger.disabled is not documented

2019-05-30 Thread Mario Corchero


New submission from Mario Corchero :

Just realised the "disabled" attribute of the Logger class is not documented in 
https://docs.python.org/3/library/logging.html#logging.Logger.

Any reason to not have it documented? I'll send a PR otherwise.

This comes as I was trying to point to the docs of the attribute in 
https://bugs.python.org/issue29143

--
assignee: docs@python
components: Documentation
messages: 344007
nosy: docs@python, mariocj89
priority: low
severity: normal
status: open
title: logging.Logger.disabled is not documented
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



[issue29143] Logger should ignore propagate property for disabled handlers.

2019-05-30 Thread Mario Corchero


Mario Corchero  added the comment:

Closing as unable to reproduce. Please comment if you can reproduce the issue 
and we can have a further look.

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



[issue5028] tokenize.generate_tokens doesn't always return logical line

2019-05-30 Thread Anthony Sottile


Change by Anthony Sottile :


--
pull_requests: +13574
pull_request: https://github.com/python/cpython/pull/13686

___
Python tracker 

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



[issue36953] Remove collections ABCs?

2019-05-30 Thread miss-islington


miss-islington  added the comment:


New changeset eea47e09394dfb64d3a59a601d947d25bb1bdc96 by Miss Islington (bot) 
(Matthias Bussonnier) in branch 'master':
bpo-36953: Delay removal of ABCs from collections. (GH-13409)
https://github.com/python/cpython/commit/eea47e09394dfb64d3a59a601d947d25bb1bdc96


--
nosy: +miss-islington

___
Python tracker 

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



[issue36342] test_venv failure when executed by test_multiprocessing and the platform lacks a functional sem_open()

2019-05-30 Thread miss-islington


miss-islington  added the comment:


New changeset 5437ccca1424e415a938c583df43d8cc74047d16 by Miss Islington (bot) 
(xdegaye) in branch 'master':
bpo-36342: Fix test_multiprocessing in test_venv (GH-12513)
https://github.com/python/cpython/commit/5437ccca1424e415a938c583df43d8cc74047d16


--
nosy: +miss-islington

___
Python tracker 

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



[issue29262] Provide a way to check for *real* typing.Union instances

2019-05-30 Thread Ivan Levkivskyi


Change by Ivan Levkivskyi :


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

___
Python tracker 

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



[issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses

2019-05-30 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Guys, thank you for investigation.
If there is AIX "idiosyncrasy" -- please feel free to skip failed tests on AIX.

If you have access to AIX box it would be much easier for you. I can only look 
at Python buildbot statuses.

--

___
Python tracker 

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



[issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses

2019-05-30 Thread Michael Felt

Michael Felt  added the comment:

On 30/05/2019 10:27, Erwan Le Pape wrote:
> Erwan Le Pape  added the comment:
>
> Assuming similar configuration to the one in msg343430, a simple native 
> getaddrinfo test to check whether any scope ID is returned.

The 'expanded' program ... main():

int main() {
/* local addresses */
    test("fe80::221:5eff:fea3:c746%0");
    test("fe80::221:5eff:fea3:c746%en0");
    test("fe80::f8d1:8cff:fe32:8305%2");
    test("fe80::f8d1:8cff:fe32:8305%en1");
/* remote addresses */
    test("fe80::f8d1:81ff:fe81:ac05%2");
    test("fe80::f8d1:81ff:fe81:ac05%en1");

    return 0;
}

The conclusion seems to be that the scopeid returned is always 0 - when
it is working;
The status is always "8", when it fails.

This seems to be:
#define EAI_NONAME  8   /* hostname nor servname not provided,
or not known */

So, %enX is not recognized - only a numerical scope.

+++ Details +++

On the first server - added two addresses - they are local to platform.

root@x066:[/data/prj/aixtools/tests/tcpip/socket]cc -g ex03.c -o ex03
root@x066:[/data/prj/aixtools/tests/tcpip/socket]./ex03
getaddrinfo(fe80::221:5eff:fea3:c746%en0) returned 8
getaddrinfo(fe80::f8d1:8cff:fe32:8305%en1) returned 8
getaddrinfo(fe80::f8d1:81ff:fe81:ac05%en1) returned 8
root@x066:[/data/prj/aixtools/tests/tcpip/socket]netstat -ni
Name  Mtu   Network Address    Ipkts Ierrs    Opkts Oerrs  Coll
en0   1500  link#2  0.21.5e.a3.c7.46  1496455 0  1214300 0 0
en0   1500  192.168.129 192.168.129.66    1496455 0  1214300 0 0
en0   1500  fe80::221:5eff:fea3:c746  1496455 0  1214300 0 0
en1   65390 link#3  fa.d1.8c.32.83.5 4041 0   34 0 0
en1   65390 fe80::f8d1:8cff:fe32:8305%2  4041 0   34 0 0
lo0   16896 link#1 160253 0   160252 0 0
lo0   16896 127 127.0.0.1  160253 0   160252 0 0
lo0   16896 ::1%1  160253 0   160252 0 0
root@x066:[/data/prj/aixtools/tests/tcpip/socket]oslevel -s
6100-07-07-1316
+++ Note +++ the 5th field says below (-), equal (=), or exceeded (+)
 - so on this server they are equal, on the AIX 7.1 TL4 - exceeded.
root@x066:[/data/prj/aixtools/tests/tcpip/socket]instfix -ciqk IV52116
IV52116:bos.64bit:6.1.7.21:6.1.7.21:=:GETADDRINFO AND INET_PTON CANNOT
HANDLE IPV6 SCOPE/ZONE
IV52116:bos.rte.control:6.1.7.21:6.1.7.21:=:GETADDRINFO AND INET_PTON
CANNOT HANDLE IPV6 SCOPE/ZONE
IV52116:bos.rte.libc:6.1.7.21:6.1.7.21:=:GETADDRINFO AND INET_PTON
CANNOT HANDLE IPV6 SCOPE/ZONE
IV52116:bos.rte.shell:6.1.7.22:6.1.7.22:=:GETADDRINFO AND INET_PTON
CANNOT HANDLE IPV6 SCOPE/ZONE
IV52116:mcr.rte:6.1.7.21:6.1.7.21:=:GETADDRINFO AND INET_PTON CANNOT
HANDLE IPV6 SCOPE/ZONE

On a second server (all addresses are 'remote now')
root@x064:[/data/prj/aixtools/tests/tcpip/socket]netstat -ni
Name  Mtu   Network Address    Ipkts Ierrs    Opkts Oerrs  Coll
en0   1500  link#2  0.21.5e.a3.c7.44   765518 0   792062 0 0
en0   1500  192.168.129 192.168.129.64 765518 0   792062 0 0
en0   1500  fe80::221:5eff:fea3:c744   765518 0   792062 0 0
en1   1500  link#3  fa.d1.81.81.ac.5   773516 0   422335 0 0
en1   1500  192.168.2   192.168.2.64   773516 0   422335 0 0
en1   1500  fe80::f8d1:81ff:fe81:ac05%2    773516 0   422335 0 0
lo0   16896 link#1 410599 0   410596 0 0
lo0   16896 127 127.0.0.1  410599 0   410596 0 0
lo0   16896 ::1%1  410599 0   410596 0 0

root@x064:[/data/prj/aixtools/tests/tcpip/socket]./ex03
getaddrinfo(fe80::221:5eff:fea3:c746%en0) returned 8
gai_strerror:Hostname and service name not provided or found
getaddrinfo(fe80::f8d1:8cff:fe32:8305%en1) returned 8
gai_strerror:Hostname and service name not provided or found
getaddrinfo(fe80::f8d1:81ff:fe81:ac05%en1) returned 8
gai_strerror:Hostname and service name not provided or found

root@x064:[/data/prj/aixtools/tests/tcpip/socket]oslevel -s
7100-04-06-1806
root@x064:[/data/prj/aixtools/tests/tcpip/socket]instfix -ciqk IV53671
IV53671:bos.64bit:7.1.3.15:7.1.4.33:+:getaddrinfo cannot handle IPv6
scope/zone
IV53671:bos.rte.control:7.1.3.15:7.1.4.33:+:getaddrinfo cannot handle
IPv6 scope/zone
IV53671:bos.rte.libc:7.1.3.15:7.1.4.33:+:getaddrinfo cannot handle IPv6
scope/zone
IV53671:bos.rte.shell:7.1.3.15:7.1.4.33:+:getaddrinfo cannot handle IPv6
scope/zone
IV53671:mcr.rte:7.1.3.15:7.1.4.33:+:getaddrinfo cannot handle IPv6
scope/zone

And a server with the bug - i.e., not fixed:
root@x065:[/data/prj/aixtools/tests/tcpip/socket]./ex03
getaddrinfo(fe80::221:5eff:fea3:c746%0) returned 8
getaddrinfo(fe80::221:5eff:fea3:c746%en0) returned 8
getaddrinfo(fe80::f8d1:8cff:fe32:8305%2) returned 8
getaddrinfo(fe80::f8d1:8cff:fe32:8305%en1) returned 8
getaddrinfo(fe80::f8d1:81ff:fe81:ac05%2) 

[issue37103] Undo deprecation of optparse

2019-05-30 Thread Eric V. Smith


Change by Eric V. Smith :


--
nosy: +eric.smith

___
Python tracker 

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



[issue30969] Docs should say that `x is z or x == z` is used for `x in y` in containers that do not implement `__contains__`

2019-05-30 Thread miss-islington


miss-islington  added the comment:


New changeset e8661c1dabc206bf7fe6e302e38fa426aa734dd0 by Miss Islington (bot) 
in branch '3.7':
bpo-30969: Fix docs about the comparison in absence of __contains__ (GH-2761)
https://github.com/python/cpython/commit/e8661c1dabc206bf7fe6e302e38fa426aa734dd0


--
nosy: +miss-islington

___
Python tracker 

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



[issue27605] Inconsistent calls to __eq__ from built-in __contains__

2019-05-30 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
stage:  -> needs patch
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



[issue30969] Docs should say that `x is z or x == z` is used for `x in y` in containers that do not implement `__contains__`

2019-05-30 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13572
pull_request: https://github.com/python/cpython/pull/13684

___
Python tracker 

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



[issue30969] Docs should say that `x is z or x == z` is used for `x in y` in containers that do not implement `__contains__`

2019-05-30 Thread Cheryl Sabella


Change by Cheryl Sabella :


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



[issue30969] Docs should say that `x is z or x == z` is used for `x in y` in containers that do not implement `__contains__`

2019-05-30 Thread Cheryl Sabella


Cheryl Sabella  added the comment:


New changeset 2f5b9dcc0a89cbde1499c76df81c36bfd5ef9aa8 by Cheryl Sabella (Antti 
Haapala) in branch 'master':
bpo-30969: Fix docs about the comparison in absence of __contains__ (GH-2761)
https://github.com/python/cpython/commit/2f5b9dcc0a89cbde1499c76df81c36bfd5ef9aa8


--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue36839] Support the buffer protocol in code objects

2019-05-30 Thread Brett Cannon


Brett Cannon  added the comment:

I agree with Eric. While I understand what Serhiy is saying about code objects 
being more than a bytearray of bytecode, the buffer protocol is still a view on 
an object, and that view happens to be for a subset which I think is acceptable 
as I think of what a buffer of a code object would be other than the bytecode.

I also think read-only is a good enough guarantee. We're talking low-level 
stuff here and if anyone were to muck with this stuff they are already playing 
with fire.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue29753] Ctypes Packing Bitfields Incorrectly - Linux

2019-05-30 Thread Karl Ding


Karl Ding  added the comment:

I believe the example can be simplified to the following:

class MyStructure(ctypes.Structure):
_pack_ = 1
_fields_ = [('A', ctypes.c_uint32, 8)]

assert ctypes.sizeof(MyStructure) == 1

Here, ctypes.sizeof returns 4 on my machine (64-bit Ubuntu 18.04 LTS), while I 
would expect it to return 1 like GCC. This is using a tree checked out at 
33ce3f012f249782507df896824b045b34f765aa, if it makes a difference.

If we compile the equivalent C code (on 64-bit Ubuntu 18.04 LTS):

#include 
#include 
#include 

struct my_structure_uint32 {
  uint32_t a : 8;
} __attribute__((packed));

int main(int argc, char *argv[]) {
  printf("sizeof(struct my_structure_uint32): %d\n", sizeof(struct 
my_structure_uint32));
  printf("alignof(struct my_structure_uint32): %d\n", alignof(struct 
my_structure_uint32));
  return 0;
}

Using the following GCC invocation:

gcc temp.c -o test && ./test

We get the following result:

sizeof(struct my_structure_uint32): 1
alignof(struct my_structure_uint32): 1

However, if I compile with MSVC bitfields:

gcc -mms-bitfields test.c -o test && ./test

We get the following result:

sizeof(struct my_structure_uint32): 4
alignof(struct my_structure_uint32): 1

Similarly, adding a second and third 8-bit wide bitfield member fails and 
returns 4, instead of the expected 2 and 3.

This is not just c_uint32, c_uint16 and c_int also exhibit the same behaviour:

class MyStructure(ctypes.Structure):
_pack_ = 1
_fields_ = [('A', ctypes.c_uint16, 8)]

assert ctypes.sizeof(MyStructure) == 1

--
nosy: +karlding

___
Python tracker 

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



[issue35018] Sax parser provides no user access to lexical handlers

2019-05-30 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
nosy: +scoder

___
Python tracker 

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



[issue6686] xml.sax.xmlreader.XMLReader.getProperty (xml.sax.handler.property_xml_string) returns bytes

2019-05-30 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
nosy: +scoder

___
Python tracker 

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



[issue9371] pulldom doesn't provide END_DOCUMENT or COMMENT nodes.

2019-05-30 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
nosy: +scoder

___
Python tracker 

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



[issue37103] Undo deprecation of optparse

2019-05-30 Thread Anders Kaseorg

New submission from Anders Kaseorg :

The optparse library is currently marked in the documentation as deprecated in 
favor of argparse.  However, argparse uses a nonstandard reinterpretation of 
Unix command line grammars that makes certain arguments impossible to express, 
and causes scripts to break when ported from optparse to argparse.  See the bug 
report I filed nine years ago:

https://bugs.python.org/issue9334
argparse does not accept options taking arguments beginning with dash 
(regression from optparse)

The conclusion of the core developers (e.g. msg309691) seems to have been that 
although it’s a valid bug, it can’t or won’t be fixed with the current argparse 
architecture.

I was asked by another core developer to file a bug report for the 
de-deprecation of optparse 
(https://discuss.python.org/t/pep-594-removing-dead-batteries-from-the-standard-library/1704/20),
 so here it is.

--
assignee: docs@python
components: Documentation, Library (Lib)
messages: 343997
nosy: andersk, docs@python
priority: normal
severity: normal
status: open
title: Undo deprecation of optparse
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



[issue36839] Support the buffer protocol in code objects

2019-05-30 Thread Eric Snow


Eric Snow  added the comment:

FWIW, I don't see the problem with supporting any read-only "buffer" object, 
rather than just bytes objects, for the string of bytes in a code object.  
That's all that Dino is proposing.  The change is not invasive and solves a 
real need.  The additional maintenance burden is negligible.  Furthermore, the 
accommodation makes sense conceptually.

--

___
Python tracker 

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



[issue5028] tokenize.generate_tokens doesn't always return logical line

2019-05-30 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
nosy:  -miss-islington
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



[issue5028] tokenize.generate_tokens doesn't always return logical line

2019-05-30 Thread miss-islington


miss-islington  added the comment:


New changeset 1e36f75d634383eb243aa1798c0f2405c9ceb5d4 by Miss Islington (bot) 
(Andrew Carr) in branch 'master':
bpo-5028: fix doc bug for tokenize (GH-11683)
https://github.com/python/cpython/commit/1e36f75d634383eb243aa1798c0f2405c9ceb5d4


--
nosy: +miss-islington

___
Python tracker 

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



[issue9883] minidom: AttributeError: DocumentFragment instance has no attribute 'writexml'

2019-05-30 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

I've closed PR1745 as it appeared to be abandoned.

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue36839] Support the buffer protocol in code objects

2019-05-30 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I concur with Inada. This would add complexity in the code object.

Note also that the code object is not just a sequence of bytes. It is a complex 
object which contains references to a dozen of objects: bytes objects, strings, 
integers, tuples, dicts. I suppose that the byte code itself is only a tiny 
part of the memory consumed by the code object in large program.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue36839] Support the buffer protocol in code objects

2019-05-30 Thread Dino Viehland


Dino Viehland  added the comment:

In the Instagram case there's about 20mb of byte code total and there are 3-4 
dozen worker processes running per server.  The byte code also represents the 
second largest section of memory as far as serialized code objects are 
concerned, the only larger one is strings (which are about 25mb).  
 
Anyway, that leads to around 1gb of memory savings per server, which is the 
reason why this was an interesting optimization to pursue when it's applied to 
many servers.

--

___
Python tracker 

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



[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-05-30 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

I think dedenting docstring content by default would be a great thing to do.  
But that's a separate issue, it isn't quite the same as .dedent() due to the 
first line.  I filed https://bugs.python.org/issue37102 to track that.

--

___
Python tracker 

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



[issue37102] Automatically dedent docstring constants by default

2019-05-30 Thread Gregory P. Smith


New submission from Gregory P. Smith :

I'm spawning this issue of as a separate feature from 
https://bugs.python.org/issue36906 (adding string dedent method and an 
optimization to do it at compile timer on constants).

It'd be great if docstrings were given a similar treatment.  Right now we carry 
the whitespace burden within the str constants for __doc__ stored in all code 
objects in the process.  This adds up.

This is not _quite_ the same as calling textwrap.dedent() or the upcoming 
str.dedent method on them at compile time.  We need to special case the first 
line of docstrings.  inspect.getdoc() is our library function that does this 
for us today.

Change of breaking things with this change?  not impossible, but extremely 
minor.  Something using docstrings as data _and_ depending on leading 
indentation whitespace preservation would not like this.  I am not aware of 
anything that would ever do that.

--
components: Interpreter Core
messages: 343990
nosy: gregory.p.smith
priority: normal
severity: normal
status: open
title: Automatically dedent docstring constants by default
type: enhancement
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



[issue1572968] release GIL while doing I/O operations in the mmap module

2019-05-30 Thread Nic Watson


Nic Watson  added the comment:

I'll add one more system I/O call that's not GIL-wrapped in the mmap module 
that can take some time:  mmap itself.

mmap on Linux with MAP_POPULATE (0x8000) as the flags can take quite a bit of 
time.  That's the flag that prefaults the memory range.  MAP_POPULATE has been 
around since Linux 2.5.46.

I know that MAP_POPULATE isn't explicitly supported in the module, but 
mmap.mmap does take arbitrary flags, so it isn't exactly unsupported either.

--
nosy: +jnwatson

___
Python tracker 

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



[issue30754] textwrap.dedent mishandles empty lines

2019-05-30 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

The current behavior is desired.  We just need to document it better in 
https://docs.python.org/3/library/textwrap.html#textwrap.dedent

--
assignee:  -> docs@python
components: +Documentation -Library (Lib)
keywords: +easy
nosy: +docs@python, gregory.p.smith
versions: +Python 3.8 -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



[issue22385] Define a binary output formatting mini-language for *.hex()

2019-05-30 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

thanks, i'll take care of them.

--

___
Python tracker 

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



[issue37101] Filterer.filter can be rewritten using built-ins just as efficient much more readable

2019-05-30 Thread Dale Visser


Dale Visser  added the comment:

Great! My PR now uses getattr as @zach.ware has suggested.

--

___
Python tracker 

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



[issue37101] Filterer.filter can be rewritten using built-ins just as efficient much more readable

2019-05-30 Thread Dale Visser


Change by Dale Visser :


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

___
Python tracker 

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



[issue37101] Filterer.filter can be rewritten using built-ins just as efficient much more readable

2019-05-30 Thread Zachary Ware


Zachary Ware  added the comment:

This could simplify even further with the following:

def filter(self, record):
return all(getattr(f, 'filter', f)(record) for f in self.filters)

--
nosy: +zach.ware
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



[issue36709] Asyncio SSL keep-alive connections raise errors after loop close.

2019-05-30 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Sorry, I'm not comfortable with such change just before the feature freeze.
The idea is maybe good but let's discuss and implement it later.

--

___
Python tracker 

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



[issue37101] Filterer.filter can be rewritten using built-ins just as efficient much more readable

2019-05-30 Thread SilentGhost


Change by SilentGhost :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue37101] Filterer.filter can be rewritten using built-ins just as efficient much more readable

2019-05-30 Thread Dale Visser


New submission from Dale Visser :

Alternative version of Filterer.filter(...) would look like this, which takes 
advantage of efficient Python 3.x built-ins, and is immediately understandable:

def _filter_callable(filter):
return filter.filter if hasattr(filter, 'filter') else filter

def filter(self, record):
filters = map(_filter_callable, self.filters)
return all(f(record) for f in filters)

I will add a tested pull request on GitHub.

--
components: Library (Lib)
messages: 343983
nosy: dwvisser
priority: normal
severity: normal
status: open
title: Filterer.filter can be rewritten using built-ins just as efficient much 
more readable
type: enhancement
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



[issue36999] Expose the coroutine object in asyncio task objects

2019-05-30 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



[issue36999] Expose the coroutine object in asyncio task objects

2019-05-30 Thread miss-islington

miss-islington  added the comment:


New changeset 98ef92002ec289bf8086b0ef3d4f96c2589f4e68 by Miss Islington (bot) 
(Alex Grönholm) in branch 'master':
bpo-36999: Add asyncio.Task.get_coro() (GH-13680)
https://github.com/python/cpython/commit/98ef92002ec289bf8086b0ef3d4f96c2589f4e68


--
nosy: +miss-islington

___
Python tracker 

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



[issue36974] Implement PEP 590

2019-05-30 Thread Jeroen Demeyer


Change by Jeroen Demeyer :


--
pull_requests: +13569
pull_request: https://github.com/python/cpython/pull/13682

___
Python tracker 

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



[issue36709] Asyncio SSL keep-alive connections raise errors after loop close.

2019-05-30 Thread Yury Selivanov


Yury Selivanov  added the comment:

> Not sure if we have to drop this warning, it enforces writing good code that 
> controls all created resources lifecycle.

Right, maybe we add "transport.terminate()" as well?  Synchronously & 
immediately closing a transport is a valid use case. 

TBH I don't see why we absolutely must wait the "connection_lost" callback 
call.  I mean it would be reasonable to allow users to terminate the connection 
(even if it means that in some cases, like SSL, it won't be correctly closed) 
and not care about what happens to it next.

--

___
Python tracker 

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



[issue36709] Asyncio SSL keep-alive connections raise errors after loop close.

2019-05-30 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

It's not about streams only.
The stream protocol can have such flag, sure.

But transport emits a warning like "unclosed transport ..."

Not sure if we have to drop this warning, it enforces writing good code that 
controls all created resources lifecycle.

--

___
Python tracker 

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



[issue36709] Asyncio SSL keep-alive connections raise errors after loop close.

2019-05-30 Thread Yury Selivanov


Yury Selivanov  added the comment:

> Sorry, that's how asyncio is designed.

Andrew, couldn't we provide a "stream.terminate()" method (not a coroutine) 
that would do the following:

* close the transport
* set a flag in the protocol that the stream has been terminated.  When the 
flag is set, the protocol simply ignores all errors (i.e. they are never shown 
to the user or logged)

This way Tom could have a weakref to the stream object from his high-level 
wrapper, and whenever the wrapper object is dereferenced it could terminate its 
stream.

> Sorry, that's how asyncio is designed.

I think it's a real problem, let's try to find out if we can provide a solution.

--

___
Python tracker 

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



[issue36709] Asyncio SSL keep-alive connections raise errors after loop close.

2019-05-30 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

The difference is that socket.close() is an instant call.
After socket.close() the socket is done.
But transport.close() doesn't close the transport instantly.
asyncio requires at least one loop iteration for calling 
protocol.connection_lost() and actual socket closing.

In case of SSL it may take much longer.

Sorry, that's how asyncio is designed.

--

___
Python tracker 

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



[issue36709] Asyncio SSL keep-alive connections raise errors after loop close.

2019-05-30 Thread Tom Christie


Tom Christie  added the comment:

Right, and `requests` *does* provide both those styles.

The point more being that *not* having closed the transport at the point of 
exit shouldn't end up raising a hard error. It doesn't raise errors in 
sync-land, and it shouldn't do so in async-land.

Similarly, we wouldn't expect an open file resource to cause errors to be 
raised at the point of exit.

--

___
Python tracker 

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



[issue37100] test_coroutine.test_unawaited_warning_when_module_broken fails on -Werror

2019-05-30 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

The coroutine is not awaited in the test and generates a RuntimeWarning. Since 
I used -Werror I guess the warning was converted to an error and thus replacing 
ZeroDivisionError in the support.catch_unraisable_exception context manager.

--

___
Python tracker 

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



[issue36974] Implement PEP 590

2019-05-30 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset 37788bc23f6f1ed0362b9b3b248daf296c024849 by Petr Viktorin (Jeroen 
Demeyer) in branch 'master':
bpo-36974: rename _FastCallKeywords -> _Vectorcall (GH-13653)
https://github.com/python/cpython/commit/37788bc23f6f1ed0362b9b3b248daf296c024849


--

___
Python tracker 

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



[issue37099] test_inspect generates DeprecationWarning

2019-05-30 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


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



[issue37100] test_coroutine.test_unawaited_warning_when_module_broken fails on -Werror

2019-05-30 Thread Karthikeyan Singaravelan


New submission from Karthikeyan Singaravelan :

Running test_coroutines under -Werror raises error. It seems ZeroDivisionError 
is expected and RuntimeWarning is raised and happens only under -Werror. This 
test was added with e4d300e07c3 .

./python.exe -Werror -m test test_coroutines
Run tests sequentially
0:00:00 load avg: 2.02 [1/1] test_coroutines
test test_coroutines failed -- Traceback (most recent call last):
  File 
"/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_coroutines.py",
 line 2263, in test_unawaited_warning_when_module_broken
self.assertEqual(cm.unraisable.exc_type, ZeroDivisionError)
AssertionError:  != 

test_coroutines failed

== Tests result: FAILURE ==

1 test failed:
test_coroutines

Total duration: 436 ms
Tests result: FAILURE

--
components: Tests
messages: 343974
nosy: vstinner, xtreak
priority: normal
severity: normal
status: open
title: test_coroutine.test_unawaited_warning_when_module_broken fails on -Werror
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



[issue30006] Deadlocks in `concurrent.futures.ProcessPoolExecutor`

2019-05-30 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Ok, closing as duplicate then.

--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Deadlocks in `concurrent.futures.ProcessPoolExecutor` with 
pickling error

___
Python tracker 

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



[issue36999] Expose the coroutine object in asyncio task objects

2019-05-30 Thread Alex Grönholm

Change by Alex Grönholm :


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

___
Python tracker 

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



[issue37099] test_inspect generates DeprecationWarning

2019-05-30 Thread miss-islington


miss-islington  added the comment:


New changeset 6d0b7470a4738a403ef48cfd50d9447e0f32f00c by Miss Islington (bot) 
(Xtreak) in branch 'master':
bpo-37099: Silence DeprecationWarning in test_inspect (GH-13679)
https://github.com/python/cpython/commit/6d0b7470a4738a403ef48cfd50d9447e0f32f00c


--
nosy: +miss-islington

___
Python tracker 

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



[issue37099] test_inspect generates DeprecationWarning

2019-05-30 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


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

___
Python tracker 

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



[issue37099] test_inspect generates DeprecationWarning

2019-05-30 Thread Karthikeyan Singaravelan


New submission from Karthikeyan Singaravelan :

In PR 13245 getfullargspec was undeprecated. But functions like getargspec and 
formatargspec still have deprecation warnings in code. As part of the PR code 
to ignore these warnings in test were also removed though the actual warning 
remains in Lib/inspect.py . This generates below warnings.

./python.exe -Wall -m test test_inspect
Run tests sequentially
0:00:00 load avg: 3.05 [1/1] test_inspect
/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:753:
 DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use 
inspect.signature() or inspect.getfullargspec()
  args, varargs, varkw, defaults = inspect.getargspec(routine)
/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:759:
 DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use 
`signature` and the `Signature` object directly
  self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults),
/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:777:
 DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use 
`signature` and the `Signature` object directly
  self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults,
/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:777:
 DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use 
`signature` and the `Signature` object directly
  self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults,
/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:753:
 DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use 
inspect.signature() or inspect.getfullargspec()
  args, varargs, varkw, defaults = inspect.getargspec(routine)
/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:759:
 DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use 
`signature` and the `Signature` object directly
  self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults),
/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:753:
 DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use 
inspect.signature() or inspect.getfullargspec()
  args, varargs, varkw, defaults = inspect.getargspec(routine)
/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:759:
 DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use 
`signature` and the `Signature` object directly
  self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults),
/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:753:
 DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use 
inspect.signature() or inspect.getfullargspec()
  args, varargs, varkw, defaults = inspect.getargspec(routine)
/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:759:
 DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use 
`signature` and the `Signature` object directly
  self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults),
/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:753:
 DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use 
inspect.signature() or inspect.getfullargspec()
  args, varargs, varkw, defaults = inspect.getargspec(routine)
/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:759:
 DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use 
`signature` and the `Signature` object directly
  self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults),
/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:753:
 DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use 
inspect.signature() or inspect.getfullargspec()
  args, varargs, varkw, defaults = inspect.getargspec(routine)
/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:759:
 DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use 
`signature` and the `Signature` object directly
  self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults),
/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:753:
 DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use 
inspect.signature() or inspect.getfullargspec()
  args, varargs, varkw, defaults = inspect.getargspec(routine)
/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:759:
 DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use 
`signature` and the `Signature` object directly
  self.assertEqual(inspect.formatargspec(args, varargs, varkw, defaults),
/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/test/test_inspect.py:753:
 DeprecationWarning: inspect.getargspec() is deprecated 

[issue20602] sys.flags and sys.float_info disappear at shutdown

2019-05-30 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset 249b7d59d8038f9017fc95dc28a3ce3494aaf832 by Petr Viktorin 
(Zackery Spytz) in branch 'master':
bpo-20602: Do not clear sys.flags and sys.float_info during shutdown (GH-8096)
https://github.com/python/cpython/commit/249b7d59d8038f9017fc95dc28a3ce3494aaf832


--
nosy: +petr.viktorin

___
Python tracker 

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



[issue36411] Python 3 f.tell() gets out of sync with file pointer in binary append+read mode

2019-05-30 Thread PEW's Corner


PEW's Corner  added the comment:

Great analysis, Jeffrey. Does the kernel position actually move to the end of 
the file on the f.write() in step 10, or on the flush in step 14? If it's the 
latter, then f.write() should probably call lseek() to set both the kernel 
position and internal position to the end of the file before the write. This 
would have the added benefit of making the Python append behavior independent 
of the kernel behavior (as some kernels apparently handle appending 
differently).

--

___
Python tracker 

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



[issue36974] Implement PEP 590

2019-05-30 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset c145f3bfbe80d498d40848450d4d33c14e2cf782 by Petr Viktorin (Jeroen 
Demeyer) in branch 'master':
bpo-36974: remove _PyObject_HasFastCall (GH-13460)
https://github.com/python/cpython/commit/c145f3bfbe80d498d40848450d4d33c14e2cf782


--

___
Python tracker 

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



[issue36974] Implement PEP 590

2019-05-30 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset 735e8afa9ee942367b5d0807633a2b9f662cbdbf by Petr Viktorin (Jeroen 
Demeyer) in branch 'master':
bpo-36974: inherit the vectorcall protocol (GH-13498)
https://github.com/python/cpython/commit/735e8afa9ee942367b5d0807633a2b9f662cbdbf


--

___
Python tracker 

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



[issue22385] Define a binary output formatting mini-language for *.hex()

2019-05-30 Thread Karthikeyan Singaravelan

Karthikeyan Singaravelan  added the comment:

This change seems to have created some compile time warnings : 
https://buildbot.python.org/all/#/builders/103/builds/2544/steps/3/logs/warnings__6_

Python/pystrhex.c:18:45: warning: passing argument 1 of ‘PyObject_Size’ 
discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
Python/pystrhex.c:60:27: warning: comparison of integer expressions of 
different signedness: ‘unsigned int’ and ‘Py_ssize_t’ {aka ‘const int’} 
[-Wsign-compare]
Python/pystrhex.c:90:29: warning: ‘sep_char’ may be used uninitialized in this 
function [-Wmaybe-uninitialized]
Python/pystrhex.c:90:29: warning: ‘sep_char’ may be used uninitialized in this 
function [-Wmaybe-uninitialized]

--
nosy: +xtreak

___
Python tracker 

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



[issue37039] IDLE: Improve zoomheight doc and behavior.

2019-05-30 Thread Andre Roberge


Andre Roberge  added the comment:

As I wrote on Github:

On my computer (Windows 10, resolution: 3000 x 2000, scaling of UI elements
set to 200%), clicking on Zoom Height makes Idle go full screen. Clicking
on the same menu (now called Restore Height) does absolutely nothing: Idle
stays in full screen mode.

If I run the program on a secondary monitor (4k), the height only changes,
but nowhere enough to be equal to the height of the screen.

--

___
Python tracker 

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



[issue37015] Fix asyncio mock warnings

2019-05-30 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Fixed

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



[issue37039] IDLE: Improve zoomheight doc and behavior.

2019-05-30 Thread Tal Einat


Tal Einat  added the comment:

See an implementation in PR GH-13678.

--

___
Python tracker 

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



[issue37015] Fix asyncio mock warnings

2019-05-30 Thread miss-islington


miss-islington  added the comment:


New changeset 0f39c2b1919727904f4fac2d79cb41dc6bfe41fe by Miss Islington (bot) 
(Xtreak) in branch 'master':
bpo-37015: Ensure tasks created by _accept_connection2 due to AsyncMock are 
completed (GH-13661)
https://github.com/python/cpython/commit/0f39c2b1919727904f4fac2d79cb41dc6bfe41fe


--
nosy: +miss-islington

___
Python tracker 

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



[issue37039] IDLE: Improve zoomheight doc and behavior.

2019-05-30 Thread Tal Einat


Change by Tal Einat :


--
pull_requests: +13566
pull_request: https://github.com/python/cpython/pull/13678

___
Python tracker 

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



[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-05-30 Thread Inada Naoki


Inada Naoki  added the comment:

Can we dedent docstring too?

Is there any string like inspect.cleandoc(s) != inspect.cleandoc(s.dedent())?

--
nosy: +inada.naoki

___
Python tracker 

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



[issue30006] Deadlocks in `concurrent.futures.ProcessPoolExecutor`

2019-05-30 Thread Thomas Moreau


Thomas Moreau  added the comment:

The deadlocks I refer to in this issue are fixed by the PR #3895.
Subsequent failures (like the fact that the Executor is set in a broken state 
when there is an unpickling error) are tracked in other issues so I think it is 
safe to close this one.

--

___
Python tracker 

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



[issue37098] test_memfd_create() test failure

2019-05-30 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 6eb814b8ce9a4fed8773a65501fb96aad8b3ecf2 by Christian Heimes in 
branch 'master':
bpo-37098: Skip memfd_create test before Linux 3.17 (GH-13677)
https://github.com/python/cpython/commit/6eb814b8ce9a4fed8773a65501fb96aad8b3ecf2


--

___
Python tracker 

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



[issue37086] time.sleep error message misleading

2019-05-30 Thread Justin Fay


Justin Fay  added the comment:

>From looking at the code for this (note I am not a C programmer so may have 
>gotten this wrong) _PyTime_FromObject first checks if the object is a float 
>using PyFloat_Check(obj) this is evident as passing nan to time.sleep raises a 
>ValueError with the message "Invalid value NaN (not a number)". However if the 
>object is not a float it next assumes the only valid value to be an integer, 
>this logic appears fine to me. The problem however is if the object is not an 
>integer the code raises the error with the message that an integer is 
>required, it is unaware that a before this branch of the code executes a float 
>would have been an accepted value. In python I imagine the fix for this would 
>be along the lines

try:
float(obj)
except (TypeError, ValueError):
try:
int(obj):
except (TypeError, ValueError):
raise TypeError('an float or integer is required')

--

___
Python tracker 

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



[issue37098] test_memfd_create() test failure

2019-05-30 Thread Christian Heimes


Change by Christian Heimes :


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

___
Python tracker 

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



[issue35545] asyncio.base_events.create_connection doesn't handle scoped IPv6 addresses

2019-05-30 Thread Erwan Le Pape


Erwan Le Pape  added the comment:

Assuming similar configuration to the one in msg343430, a simple native 
getaddrinfo test to check whether any scope ID is returned.

```
#include 
#include 
#include 
#include 


void test(char *addrstr) {
int status;
struct addrinfo *res;
struct addrinfo *iter;
struct sockaddr_in6 *addr;

status = getaddrinfo(addrstr, "80", NULL, );
if (status != 0) {
fprintf(stderr, "getaddrinfo(%s) returned %i\n", addrstr, status);

return;
}

for (iter = res; iter; iter = iter->ai_next) {
if (iter->ai_addr->sa_family != AF_INET6)
continue;

addr = (struct sockaddr_in6 *) iter->ai_addr;
if (addr->sin6_scope_id != 0) {
fprintf(stdout, "getaddrinfo(%s) return scope %u\n", addrstr, 
addr->sin6_scope_id);

return;
}
}
}

int main() {
test("fe80::f8d1:81ff:fe81:ac05%2");
test("fe80::f8d1:81ff:fe81:ac05%en1");

return 0;
}
```

I've explicitly tested against numeric and named interfaces to ensure that this 
isn't linked to AIX only handling named interfaces for scopes instead of 
numeric ones (although given your `netstat` output, that's be surprising).

Since I've had to look for AIX programming documentation just to be sure, I 
also stumbled upon this AIX bug 
https://www-01.ibm.com/support/docview.wss?uid=isg1IV53671 (which is referenced 
by the one I mentioned previously but I missed that). It seem to apply up to 
7100-03 so you should be immune nonetheless.

I also noticed that it mentions SSH not working so I went and checked the 
OpenSSH sources to see how they handle AIX.
While they have an explicit BROKEN_GETADDRINFO define, it doesn't check for the 
specific scoped IPv6 address issue so I'm not sure they decided to special case 
it.
https://github.com/openssh/openssh-portable/blob/85ceb0e64bff672558fc87958cd548f135c83cdd/configure.ac#L2341

If this is truly an "idiosyncrasy" in AIX, I'm not sure there is a better way 
to handle it than skipping it since it's not really a Python bug if the 
underlying `libc` doesn't work as intended.

--

___
Python tracker 

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



[issue31904] Python should support VxWorks RTOS

2019-05-30 Thread LihuaZhao


Change by LihuaZhao :


--
pull_requests:  -12349

___
Python tracker 

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



[issue36935] bpo-35813 introduced usage of the deprecated PyErr_SetFromWindowsErrWithUnicodeFilename() function

2019-05-30 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset eda385c0dca62f97a8ae80feb57c2a51df3c807f by Victor Stinner 
(Zackery Spytz) in branch 'master':
bpo-36935: Remove usage of the deprecated 
PyErr_SetFromWindowsErrWithUnicodeFilename() (GH-13355)
https://github.com/python/cpython/commit/eda385c0dca62f97a8ae80feb57c2a51df3c807f


--

___
Python tracker 

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



  1   2   >