[issue37444] Differing exception between builtins and importlib when importing beyond top-level package

2019-08-02 Thread miss-islington


miss-islington  added the comment:


New changeset c5fa44944ee0a31a12b9a70776c7cb56c4dc39a2 by Miss Islington (bot) 
(Ngalim Siregar) in branch 'master':
bpo-37444: Update differing exception between builtins and importlib (GH-14869)
https://github.com/python/cpython/commit/c5fa44944ee0a31a12b9a70776c7cb56c4dc39a2


--
nosy: +miss-islington

___
Python tracker 

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



[issue37749] ipaddress - is_global method all multicast addresses and networks return true

2019-08-02 Thread Brandon James


Change by Brandon James :


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

___
Python tracker 

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



[issue37749] ipaddress - is_global method all multicast addresses and networks return true

2019-08-02 Thread Brandon James


New submission from Brandon James :

When using the ipaddress library, all multicast addresses and networks return 
True when using the is_global method for their respective classes. I believe 
their are two possible fixes for this. 

1) In practice no multicast addresses are globally routable. If our definition 
of is_global means the address is globally routable, then I propose adding not 
is_multicast to each class's is_global logic. 

2) RFC 5771 (IPv4) and RFCs 4291 and 7346 (IPv6) both have guidelines for what 
MAY be routed on the public internet (as mentioned above multicast is not 
routed globally in practice). Logic following those guidelines should be added.

IPv4: 224.0.1.0/24, AD-HOC I, II and III addresses 224.0.2.0 - 224.0.255.255, 
224.3.0.0 - 224.4.255.255, and 233.252.0.0 - 233.255.255.255

IPv6: Multicast addresses with 0xE in the SCOPE field

The current logic is inaccurate when looking at the relevant RFCs and worse 
when looking at how routing is actually implemented. 

Github PR submitted for option 1 above. I've also submitted a thread to NANOG's 
mailing list (currently pending moderator approval) posing a few questions 
regarding the RFCs above. I think it's unlikely that multicast will ever be 
publicly routed on the internet, so really we just need to define global here. 
My definition would be addresses that are routed on the public internet.

--
components: Library (Lib)
messages: 348942
nosy: bjames
priority: normal
severity: normal
status: open
title: ipaddress - is_global method all multicast addresses and networks return 
true

___
Python tracker 

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



[issue37627] IDLE: populate Run Customized arguments with previous entry

2019-08-02 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This issues fixed item 2 above.  Re-ordering the Run menu is #37748

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
superseder:  -> IDLE: Re-order run menu
title: Minor improvements to IDLE's "Run Customized" -> IDLE: populate Run 
Customized arguments with previous entry
type:  -> enhancement
versions: +Python 3.7

___
Python tracker 

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



[issue37748] IDLE: Re-order run menu

2019-08-02 Thread Terry J. Reedy


New submission from Terry J. Reedy :

With the addition of Run Customized, the run menu looks like

Python Shell
Check Module
Run Module
Run... Customized

This order resulted from Check and Run Module originally being implemented as 
extensions, which forced them to be below Python Shell.  The situation was 
similar with Format Paragraph being forced below less commonly used options on 
the Format menu.  It is now at the top.
Run... Customized was tacked on below, without worrying about the appropriate 
order for the menu..

On issue #37627, Raymond Hettinger suggested "Move the [new] menu option up by 
one so that the regular F5 "run" is last -- learners we having a hard time 
finding and mouse targeting the more commonly used regular "run" option.  The 
result would be

Python Shell
Check Module
Run... Customized
Run Module

I would rather make Run Module, the most commonly used option even more 
prominent by putting it at the top, perhaps by reversing the order.

Run Module
Run... Customized
Check Module
Python Shell

With Run Module at the top, remaining items could be ordered by logic, and to 
me, the above is plausible on that score, or by use, perhaps putting the 
second-most used at the bottom.  I suspect that this will be Run Customized.  
To me, Check Module is useless, though I can imagine situation when it is not.  
Python Shell is only needed when there is no shell and one does not want to 
make one appear by running a module.  To switch to an existing Shell, on should 
use the Windows menu.  Anyway, another candidate is

Run Module
Check Module
Python Shell
Run... Customized

--
messages: 348940
nosy: cheryl.sabella, rhettinger, taleinat, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: Re-order run menu
type: enhancement
versions: Python 3.7, 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



[issue37746] Provide Windows predefined access type constants

2019-08-02 Thread Eryk Sun


Eryk Sun  added the comment:

> Perhaps _winapi is the best place? It already includes CreateFile and 
> OpenProcess, both of which also use these flags and already have some 
> of the "preconstructed" values exposed.

I'd like to see an os.windows namespace, with os.windows.constants and 
os.windows.errors. _winapi is for internal use. Some of what's defined there 
can be made public, including common constants and errors, but not all of it.

> At least the first five can be used to open keys with even less rights 
> than default, which can sometimes be necessary for keys with obscure 
> ACLs.

Key objects don't support SYNCHRONIZE. The only concern for us is excluding the 
other standard rights (i.e. READ_CONTROL, WRITE_OWNER, WRITE_DAC, DELETE).

All four modes of generic access include READ_CONTROL, which allows querying an 
object's owner, group, and DACL, but we have no direct use of this information 
in winreg. KEY_ALL_ACCESS also includes WRITE_OWNER, WRITE_DAC and DELETE 
access, of which we also have no need. For deleting a key, DeleteKey[Ex] does 
not require DELETE access on the supplied handle, which is used by WINAPI 
RegDeleteKey[Ex]W only for an internal handle-relative open that requests 
DELETE access. The other two are also never needed directly by winreg, since it 
doesn't support security functions to modify the owner/group and DACL in a 
key's security descriptor. They're only of use indirectly if using ctypes or 
PyWin32 to call a handle-based security function such as SetSecurityInfo.

If we can't get generic access because we lack one or more of the standard 
rights or specific rights in the generic set, then we can request just the 
required specific rights. The specific rights of the four generic access modes 
are as follows:

KEY_READ  : KEY_QUERY_VALUE, KEY_ENUMERATE_SUB_KEYS, KEY_NOTIFY
KEY_WRITE : KEY_SET_VALUE, KEY_CREATE_SUB_KEY
KEY_EXECUTE   : Same as KEY_READ
KEY_ALL_ACCESS: KEY_QUERY_VALUE, KEY_SET_VALUE, KEY_CREATE_SUB_KEY,
KEY_ENUMERATE_SUB_KEYS, KEY_NOTIFY, KEY_CREATE_LINK

--

___
Python tracker 

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



[issue37433] syntax error in multiline f-string produces ~40k spaces output

2019-08-02 Thread Aaron Meurer


Aaron Meurer  added the comment:

This seems related. It's also possible I'm misunderstanding what is supposed to 
happen here.

If you create test.py with just the 2 lines:

"""
a

and run python test.py from CPython master, you get

$./python.exe test.py
  File "/Users/aaronmeurer/Documents/cpython/test.py", line 4
a
^
SyntaxError: EOF while scanning triple-quoted string literal

Notice that it reports line 4 even though the file only has 2 lines.

The offset in the syntax error is 6 columns (line numbers and column offsets
in SyntaxErrors count from 1)

>>> try:
... compile('"""\na', '', 'exec')
... except SyntaxError as e:
... print(repr(e))
...
SyntaxError('EOF while scanning triple-quoted string literal', ('', 2, 6, 
'"""\na\n'))

--

___
Python tracker 

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



[issue37746] Provide Windows predefined access type constants

2019-08-02 Thread Steve Dower


Steve Dower  added the comment:

At least the first five can be used to open keys with even less rights than 
default, which can sometimes be necessary for keys with obscure ACLs.

Having the constants present is also helpful when rendering a text view.

Perhaps _winapi is the best place? It already includes CreateFile and 
OpenProcess, both of which also use these flags and already have some of the 
"preconstructed" values exposed.

--

___
Python tracker 

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



[issue33408] Enable AF_UNIX support in Windows

2019-08-02 Thread Steve Dower


Steve Dower  added the comment:

> I think it's possible that there is code that detects whether AF_UNIX is an 
> attribute on socket or not and does something different on Windows, but I 
> haven't seen an example of it so far.

One of the test suites linked above had a skipUnless(hasattr(socket, 
'AF_UNIX')) on the whole class, and at least one test assumed that it could use 
datagram support, so there's the example.

--

___
Python tracker 

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



[issue25172] Unix-only crypt should not be present on Windows.

2019-08-02 Thread Steve Dower


Steve Dower  added the comment:

Marking this easy/newcomer friendly.

This should catch the ModuleNotFoundError raised when _crypt is missing and 
raise a more informative ImportError saying that crypt is unsupported.

All the other modules that are missing are native extension modules that are 
not built - this is the only one that is a .py file. We don't exclude any other 
Lib\*.py files from the distribution.

--
keywords: +easy, newcomer friendly
versions: +Python 3.8, Python 3.9 -Python 3.6, Python 3.7

___
Python tracker 

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



[issue31476] Stdlib source files not installed

2019-08-02 Thread Steve Dower


Steve Dower  added the comment:

Closing this as out of date, but if you're still watching Zero, make sure you 
aren't browsing the __pycache__ directory instead of the source directories. We 
definitely ship sources with all of our distributions.

--
resolution:  -> out of date
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



[issue31612] Building 3.6 fails on Windows

2019-08-02 Thread Steve Dower


Change by Steve Dower :


--
resolution:  -> out of date
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



[issue30974] Update os.samefile docstring to match documentation

2019-08-02 Thread miss-islington


miss-islington  added the comment:


New changeset a49f203e052c6fb1244d4e55c3fccc439dda0e2e by Miss Islington (bot) 
in branch '3.7':
bpo-30974: Change os.path.samefile docstring to match docs (GH-7337)
https://github.com/python/cpython/commit/a49f203e052c6fb1244d4e55c3fccc439dda0e2e


--

___
Python tracker 

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



[issue30974] Update os.samefile docstring to match documentation

2019-08-02 Thread miss-islington


miss-islington  added the comment:


New changeset 6b833901fe9053937c289c6371bb731c9aceb58e by Miss Islington (bot) 
in branch '3.8':
bpo-30974: Change os.path.samefile docstring to match docs (GH-7337)
https://github.com/python/cpython/commit/6b833901fe9053937c289c6371bb731c9aceb58e


--
nosy: +miss-islington

___
Python tracker 

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



[issue34026] Request for 2 Windows installation changes.

2019-08-02 Thread Steve Dower


Change by Steve Dower :


--
resolution:  -> wont fix
stage: needs patch -> 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



[issue33220] Antivirus hits on python-2.7.14.amd64.msi file

2019-08-02 Thread Steve Dower


Change by Steve Dower :


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



[issue34232] Python3.7.0 exe installers (32 and 64 bit) failing on Windows7

2019-08-02 Thread Steve Dower


Steve Dower  added the comment:

Sorry about forgetting this - this is an issue with certain security 
configurations where variables are not passed across the Administrator boundary 
properly (and the subinstallers are automatically elevated to Administrator).

If you right click the installer and choose "Run as Administrator" and then do 
the install it should be fine.

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



[issue1327594] Static Windows Build fails to locate existing installation

2019-08-02 Thread Steve Dower


Change by Steve Dower :


--
resolution:  -> out of date
stage: test needed -> 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



[issue34142] Windows launcher version lookup flawed

2019-08-02 Thread Steve Dower


Change by Steve Dower :


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



[issue30974] Update os.samefile docstring to match documentation

2019-08-02 Thread Steve Dower


Steve Dower  added the comment:

Still needs a 2.7 backport if someone would like to do it.

--

___
Python tracker 

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



[issue31534] python 3.6.2 installation failed 0x80070002 error

2019-08-02 Thread Steve Dower


Change by Steve Dower :


--
resolution:  -> out of date
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



[issue30974] Update os.samefile docstring to match documentation

2019-08-02 Thread Steve Dower


Steve Dower  added the comment:

I'm not personally thrilled about it being documented like this, but it's 
certainly how the current documentation reads. Consistency is better until we 
get motivated enough to fix all of it.

Thanks for the patch!

--
stage: patch review -> backport needed

___
Python tracker 

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



[issue30974] Update os.samefile docstring to match documentation

2019-08-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14831
pull_request: https://github.com/python/cpython/pull/15086

___
Python tracker 

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



[issue30974] Update os.samefile docstring to match documentation

2019-08-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14832
pull_request: https://github.com/python/cpython/pull/15087

___
Python tracker 

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



[issue30974] Update os.samefile docstring to match documentation

2019-08-02 Thread Steve Dower


Steve Dower  added the comment:


New changeset 8e568ef266a2805f9a6042003723d9c050830461 by Steve Dower (Timo 
Furrer) in branch 'master':
bpo-30974: Change os.path.samefile docstring to match docs (GH-7337)
https://github.com/python/cpython/commit/8e568ef266a2805f9a6042003723d9c050830461


--

___
Python tracker 

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



[issue20523] global .pdbrc on windows 7 not reachable out of the box

2019-08-02 Thread miss-islington


miss-islington  added the comment:


New changeset 79af3bd1d170ed6a72a5c126e862590cdbf192d7 by Miss Islington (bot) 
in branch '3.8':
bpo-20523: pdb searches for .pdbrc in ~ instead of $HOME (GH-11847)
https://github.com/python/cpython/commit/79af3bd1d170ed6a72a5c126e862590cdbf192d7


--

___
Python tracker 

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



[issue34470] windows msi in headless mode fails to install Script directory on reinstall if the python folder was deleted but not uninstalled

2019-08-02 Thread Steve Dower


Change by Steve Dower :


--
resolution:  -> out of date
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



[issue34564] Tutorial Section 2.1 Windows Installation Path Correction

2019-08-02 Thread Steve Dower


Steve Dower  added the comment:

I updated this section in a separate issue.

--
resolution:  -> out of date
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



[issue20523] global .pdbrc on windows 7 not reachable out of the box

2019-08-02 Thread miss-islington


miss-islington  added the comment:


New changeset 1ff7dd681c7f3e31524bfada6d6d2786d4e37704 by Miss Islington (bot) 
in branch '3.7':
bpo-20523: pdb searches for .pdbrc in ~ instead of $HOME (GH-11847)
https://github.com/python/cpython/commit/1ff7dd681c7f3e31524bfada6d6d2786d4e37704


--
nosy: +miss-islington

___
Python tracker 

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



[issue33617] subprocess.Popen etc do not accept os.PathLike in passed sequence on Windows

2019-08-02 Thread Steve Dower


Change by Steve Dower :


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



[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2019-08-02 Thread Steve Dower


Change by Steve Dower :


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



[issue21983] segfault in ctypes.cast

2019-08-02 Thread Steve Dower


Change by Steve Dower :


--
assignee: steve.dower -> 
stage: patch review -> backport needed
versions:  -Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue34562] cannot install versions 3.6.5+ on Windows

2019-08-02 Thread Steve Dower


Change by Steve Dower :


--
resolution:  -> out of date
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



[issue35058] Unable to Install Python on Windows

2019-08-02 Thread Steve Dower


Change by Steve Dower :


--
resolution:  -> out of date
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



[issue33779] Error while installing python 3.6.5 on windows 10

2019-08-02 Thread Steve Dower


Change by Steve Dower :


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



[issue23451] Deprecation warnings building 3.5 Visual Studio Windows 8.1 64 bit

2019-08-02 Thread Steve Dower


Change by Steve Dower :


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



[issue5438] test_bigmem.test_from_2G_generator uses more memory than expected

2019-08-02 Thread Steve Dower


Change by Steve Dower :


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



[issue32326] Update Build projects to version 10.0.16299.0 of the Windows 10 SDK.

2019-08-02 Thread Steve Dower


Change by Steve Dower :


--
resolution:  -> out of date
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



[issue20523] global .pdbrc on windows 7 not reachable out of the box

2019-08-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14829
pull_request: https://github.com/python/cpython/pull/15084

___
Python tracker 

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



[issue20523] global .pdbrc on windows 7 not reachable out of the box

2019-08-02 Thread Steve Dower


Steve Dower  added the comment:


New changeset 7ea9a85f132b32347fcbd2cbe1b553a2e9890b56 by Steve Dower (Timothy 
Hopper) in branch 'master':
bpo-20523: pdb searches for .pdbrc in ~ instead of $HOME (GH-11847)
https://github.com/python/cpython/commit/7ea9a85f132b32347fcbd2cbe1b553a2e9890b56


--

___
Python tracker 

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



[issue20523] global .pdbrc on windows 7 not reachable out of the box

2019-08-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14830
pull_request: https://github.com/python/cpython/pull/15085

___
Python tracker 

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



[issue20523] global .pdbrc on windows 7 not reachable out of the box

2019-08-02 Thread Steve Dower


Change by Steve Dower :


--
versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.5

___
Python tracker 

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



[issue33408] Enable AF_UNIX support in Windows

2019-08-02 Thread Paul Monson


Paul Monson  added the comment:

If you try to create a datagram socket with the current AF_UNIX changes on 
Windows the error is:

OSError: [WinError 10047] An address incompatible with the requested protocol 
was used

All of the examples given will fail to load with AttributeError on Windows 
because socket.AF_UNIX is not a valid attribute on Windows.

I think it's possible that there is code that detects whether AF_UNIX is an 
attribute on socket or not and does something different on Windows, but I 
haven't seen an example of it so far.

I can make the changes to WIN_AF_UNIX when I continue working on this, just in 
case there is portable code out there somewhere.

--

___
Python tracker 

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



[issue37409] relative import without parent succeeds with builtins.__import__

2019-08-02 Thread Brett Cannon


Change by Brett Cannon :


--
assignee:  -> brett.cannon

___
Python tracker 

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



[issue20391] windows python launcher should support explicit 64-bit version

2019-08-02 Thread Steve Dower


Steve Dower  added the comment:

This has been implemented.

--
resolution:  -> out of date
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



[issue36394] test_multiprocessing_spawn fails on Windows7 3.x buildbot

2019-08-02 Thread Steve Dower


Change by Steve Dower :


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



[issue36311] Flaw in Windows code page decoder for large input

2019-08-02 Thread Steve Dower


Change by Steve Dower :


--
keywords: +patch
pull_requests: +14828
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/15083

___
Python tracker 

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



[issue36311] Flaw in Windows code page decoder for large input

2019-08-02 Thread Steve Dower


Change by Steve Dower :


--
assignee:  -> steve.dower
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



[issue36311] Flaw in Windows code page decoder for large input

2019-08-02 Thread Steve Dower


Steve Dower  added the comment:

If we reduce our chunk size below INT_MAX, then we avoid the issue entirely. 
Our logic for hitting the middle of a multibyte character is fine (perhaps 
fixed since this issue was opened?), there's just a weird edge case at 2 GiB in 
the API call.

As a bonus, smaller chunks seems to have a performance benefit too. It seems 
like INT_MAX/4 is the sweet spot - it took about a quarter of the time for my 
2GiB test case as INT_MAX (and we're measuring in tens of seconds here, so I'm 
pretty comfortable with the direction of the result). INT_MAX/2 and INT_MAX/8 
were both slower than INT_MAX/4.

--

___
Python tracker 

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



[issue36077] Inheritance dataclasses fields and default init statement

2019-08-02 Thread Daniel Lepage


Daniel Lepage  added the comment:

A simpler way to merge them would be to make all arguments after a default 
argument keyword-only, e.g.

__index__(self, i, j=0, *, k, l=0)

It does mean you'd have to explicitly write e.g. Child(1, k=4), but that's a 
lot more readable than seeing Child(1, 4) and wondering which field gets the 4.

--
nosy: +Daniel Lepage2

___
Python tracker 

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



[issue37746] Provide Windows predefined access type constants

2019-08-02 Thread Eryk Sun


Eryk Sun  added the comment:

The STANDARD_RIGHTS_* and SPECIFIC_RIGHTS_ALL constants aren't used much in 
practice. Do you have a particular case that needs them?

I don't think we have direct use for the standard rights constants in winreg. 
For example, deleting a key via winreg.DeleteKeyEx internally opens a handle 
with the required DELETE access. Also, kernel key objects don't even support 
SYNCHRONIZE access (i.e. they can't be waited on).

There's also the generic rights that object types map to sets of standard and 
specific rights: GENERIC_READ (0x8000_), GENERIC_WRITE (0x4000_), 
GENERIC_EXECUTE (0x2000_), and GENERIC_ALL (0x1000_). But, here again, 
winreg doesn't really need this. It already includes the pre-mapped generic key 
rights: KEY_READ, KEY_WRITE, KEY_EXECUTE, and KEY_ALL_ACCESS (except 
GENERIC_EXECUTE actually maps to KEY_EXECUTE | KEY_CREATE_LINK).

--
nosy: +eryksun

___
Python tracker 

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



[issue36557] Python (Launcher)3.7.3 CMDLine install/uninstall

2019-08-02 Thread Steve Dower


Steve Dower  added the comment:

Sorry for the slow reply.

> immediately begin removing Python - no prompt will be displayed

This is meant to imply that no *confirmation* prompt will be displayed before 
uninstall starts. Documentation patches are welcome :)

> tell me something about passive

The /passive option means the user can see progress and (if appropriate), 
cancel the operation, but otherwise does not have to interact with it at all. 
This is good for semi-interactive scripts, where the user starts it and wants 
to see what's happening, but could also walk away and let it run to completion. 
With /quiet, there'd be no progress or errors (generally /passive will stop and 
wait if an error occurs), and without either the success page would also stop 
and wait.

These are fairly typical command line options for installers on Windows, and 
the Python installer users them in the standard way. Mostly because we haven't 
done anything to customize them from the installer toolkit we use :)

--

___
Python tracker 

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



[issue37733] Fail to build _curses module of Python 3.7.4 on AIX 7.1 using gcc

2019-08-02 Thread Michael Felt


Michael Felt  added the comment:

Issue36210 needs a back-port to 3.7 and 3.6.

--

___
Python tracker 

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



[issue31226] shutil.rmtree fails when target has an internal directory junction (Windows)

2019-08-02 Thread Steve Dower


Steve Dower  added the comment:

Sorry for being slow to review, I just added a few more comments on the PR and 
I think we're nearly done.

--
versions: +Python 3.9 -Python 3.6

___
Python tracker 

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



[issue36590] Add Bluetooth RFCOMM Support for Windows

2019-08-02 Thread Steve Dower


Steve Dower  added the comment:

Thanks for the patch!

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

___
Python tracker 

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



[issue36590] Add Bluetooth RFCOMM Support for Windows

2019-08-02 Thread Steve Dower


Steve Dower  added the comment:


New changeset 8fbece135d7615e836a845ca39223097046c8b8b by Steve Dower (Greg 
Bowser) in branch 'master':
bpo-36590: Add Bluetooth RFCOMM and support for Windows. (GH-12767)
https://github.com/python/cpython/commit/8fbece135d7615e836a845ca39223097046c8b8b


--

___
Python tracker 

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



[issue33408] Enable AF_UNIX support in Windows

2019-08-02 Thread Steve Dower


Steve Dower  added the comment:

Most of those examples would break today if run on Windows, though 
(AttributeError). So they'd just continue to break, probably with a different 
error (I'm not clear what happens if we specify SOCK_DGRAM with this change).

Having an undocumented field doesn't really help much - what we want is a 
documented field with a different name, perhaps WIN_AF_UNIX? (I think we need 
to keep the "AF_" prefix for real values and not mess up the namespace 
ourselves.) That way we can document that it matches AF_UNIX when defined on 
Windows, but will not trigger existing code that checks for the presence of 
AF_UNIX. Then we'll have to update the standard library to use either/both 
values where supported.

--

___
Python tracker 

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



[issue36683] duplicate method definition in Lib/test/test_utf8_mode.py

2019-08-02 Thread Steve Dower


Change by Steve Dower :


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



[issue36678] duplicate method definitions in Lib/test/test_dataclasses.py

2019-08-02 Thread Steve Dower


Change by Steve Dower :


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



[issue36681] duplicate method definition in Lib/test/test_logging.py

2019-08-02 Thread Steve Dower


Change by Steve Dower :


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



[issue36680] duplicate method definition in Lib/test/test_importlib/test_util.py

2019-08-02 Thread Steve Dower


Change by Steve Dower :


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



[issue37733] Fail to build _curses module of Python 3.7.4 on AIX 7.1 using gcc

2019-08-02 Thread Tal Einat


Change by Tal Einat :


--
nosy: +Michael.Felt

___
Python tracker 

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



[issue37724] [[Errno 17] File exists: ] # Try create directories that are not part of the archive with

2019-08-02 Thread Tal Einat


Tal Einat  added the comment:

Hi Tal, could you please make your report clearer by giving more context? Right 
now it is very hard to understand.

The following would be helpful:

* What are you trying to do that is failing? (perhaps extract a Zip archive?)
* Which libraries/classes/functions are you using?
* Can you provide a small sample of code which we can use to reproduce this 
error ourselves?

--
nosy: +taleinat

___
Python tracker 

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



[issue37745] 3.8b3 - windows install gui/ inconsistent options

2019-08-02 Thread Steve Dower


Steve Dower  added the comment:

The "for all users" checkbox you refer to only applies to the launcher, which 
is why it is immediately alongside the option to install the launcher (and 
above the comment about the launcher).

The "Install for all users" option on the final page is for the Python runtime 
(and if selected, also the launcher).

So the only duplication is the "launcher for all users" checkbox on the front 
page, and that's there so that people who use the default options are able to 
easily disable it if they don't have administrative privileges. (Also, 
everything on the front page is a duplicate of something else :) )

I'd happily accept an alternative design for the launcher options if it doesn't 
involve making the window larger and only uses checkboxes (we have fairly 
limited UI options available in this installer framework). Or maybe there's a 
simple text update we can make?

--

___
Python tracker 

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



[issue37747] _markupbase.py fails with TypeError on invalid keyword in marked section

2019-08-02 Thread bp256r1
New submission from bp256r1 :

Hello,

I'm not sure if this a bug, but I noticed that a TypeError is raised by the 
parse_marked_section function of the _markupbase module in Python 3.7.4 when 
attempting to parse a name token of https://github.com/python/cpython/blob/3.7/Lib/_markupbase.py#L149

Steps to reproduce:

$ pip3 freeze | grep beautifulsoup4
beautifulsoup4==4.6.3

$ python3
>>> a='>> from bs4 import BeautifulSoup
>>> BeautifulSoup(a, 'html.parser')
/usr/local/lib/python3.7/site-packages/bs4/builder/_htmlparser.py:78: 
UserWarning: expected name token at '", line 1, in 
  File "/usr/local/lib/python3.7/site-packages/bs4/__init__.py", line 303, in 
__init__
self._feed()
  File "/usr/local/lib/python3.7/site-packages/bs4/__init__.py", line 364, in 
_feed
self.builder.feed(self.markup)
  File "/usr/local/lib/python3.7/site-packages/bs4/builder/_htmlparser.py", 
line 250, in feed
parser.feed(markup)
  File 
"/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/html/parser.py",
 line 111, in feed
self.goahead(0)
  File 
"/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/html/parser.py",
 line 179, in goahead
k = self.parse_html_declaration(i)
  File 
"/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/html/parser.py",
 line 264, in parse_html_declaration
return self.parse_marked_section(i)
  File 
"/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/_markupbase.py",
 line 149, in parse_marked_section
sectName, j = self._scan_name( i+3, i )
TypeError: cannot unpack non-iterable NoneType object

If it's not a bug, sorry, not sure.

--
components: Library (Lib)
messages: 348910
nosy: berker.peksag, bp256r1, ezio.melotti, kodial
priority: normal
severity: normal
status: open
title: _markupbase.py fails with TypeError on invalid keyword in marked section
versions: Python 3.7

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


[issue36487] Make C-API docs clear about what the "main" interpreter is

2019-08-02 Thread Eric Snow


Eric Snow  added the comment:


New changeset 375f35be0688da0fc0f27afc4faea76590d7c24d by Eric Snow (Miss 
Islington (bot)) in branch '3.8':
bpo-36487: Make C-API docs clear about what the main interpreter is. (gh-15080)
https://github.com/python/cpython/commit/375f35be0688da0fc0f27afc4faea76590d7c24d


--

___
Python tracker 

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



[issue37746] Provide Windows predefined access type constants

2019-08-02 Thread Steve Dower


New submission from Steve Dower :

We currently do not provide the standard access type constants anywhere, 
despite providing some of the specific access type flags (e.g. in `winreg`):

#define DELETE   (0x0001L)
#define READ_CONTROL (0x0002L)
#define WRITE_DAC(0x0004L)
#define WRITE_OWNER  (0x0008L)
#define SYNCHRONIZE  (0x0010L)

#define STANDARD_RIGHTS_REQUIRED (0x000FL)

#define STANDARD_RIGHTS_READ (READ_CONTROL)
#define STANDARD_RIGHTS_WRITE(READ_CONTROL)
#define STANDARD_RIGHTS_EXECUTE  (READ_CONTROL)

#define STANDARD_RIGHTS_ALL  (0x001FL)

#define SPECIFIC_RIGHTS_ALL  (0xL)

I'm not sure where the best place to expose them would be. `os` (`nt`) seems 
best, but it's 99% a POSIX shim that doesn't actually have anything 
Windows-specific exposed, and `_winapi` is not public.

They're likely already available through pywin32 or similar, but given their 
use with `winreg` we should probably at least make them available there.

--
components: Windows
messages: 348908
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: Provide Windows predefined access type constants
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



[issue37745] 3.8b3 - windows install gui/ inconsistent options

2019-08-02 Thread Christopher Brousseau


New submission from Christopher Brousseau :

When installing 3.8.0b3 64-bit into Win 10 using the gui following the 
`customize installation` path, there are duplicate and inconsistent options on 
three different screens for the `install for all users` checkbox.

Observed Behavior:
1. first screen (Install Python) - `install launcher for all users` is marked 
as checked as default
2. second screen (Optional Features) - 
2.1 `for all users` is also marked as checked if first screen marked.  if 
second screen marked - this is unchecked.
2.2 layout of this checkbox is above a comment that relates only to the "py 
launcher" checkbox.  would be more clear for user if `for all users` was 
located below "py launcher", or removed from this screen (per note below)
3. third screen (Advanced Options) - `Install for all users` is UNchecked in 
all cases, even if first & second screens are checked.

Expected Behavior:
1. if first screen is checked, all follow on screens are also checked
2. feature options only appear on one screen, or at a minimum, checkbox label 
is exactly the same on all screens

Additional Questions for the team:
1. Should all install customizations be removed from first screen, set as 
default options and just listed as descriptions under the `Install Now` default?
2. Should `for all users` option be removed from the 2nd screen (Optional 
Features)?  It seems more like an "advanced option" than a feature.

Screenshots (this site appears to only allow one file)
first: https://imgur.com/a/0a45CBh
second: https://imgur.com/a/6ZV16bV
third:  https://imgur.com/a/stRTh25

Link to binary used for this:
https://www.python.org/ftp/python/3.8.0/python-3.8.0b3-amd64.exe

--
components: Installation, Windows
files: python_3.8b3_screen02_optional_features_2019-08-02_9-56-02.png
messages: 348907
nosy: Christopher Brousseau, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: 3.8b3 - windows install gui/ inconsistent options
type: behavior
versions: Python 3.8
Added file: 
https://bugs.python.org/file48527/python_3.8b3_screen02_optional_features_2019-08-02_9-56-02.png

___
Python tracker 

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



[issue18049] Re-enable threading test on macOS

2019-08-02 Thread Michael Felt


Change by Michael Felt :


--
pull_requests: +14827
pull_request: https://github.com/python/cpython/pull/15081

___
Python tracker 

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



[issue37742] logging.getLogger accepts name='root' leading to confusion

2019-08-02 Thread Vinay Sajip


Change by Vinay Sajip :


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



[issue36487] Make C-API docs clear about what the "main" interpreter is

2019-08-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14826
pull_request: https://github.com/python/cpython/pull/15080

___
Python tracker 

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



[issue36487] Make C-API docs clear about what the "main" interpreter is

2019-08-02 Thread Eric Snow


Eric Snow  added the comment:

Thanks, Joannah!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue37742] logging.getLogger accepts name='root' leading to confusion

2019-08-02 Thread Vinay Sajip

Vinay Sajip  added the comment:


New changeset cb65b3a4f484ce71dcb76a918af98c7015513025 by Vinay Sajip in branch 
'master':
bpo-37742: Return the root logger when logging.getLogger('root') is c… (#15077)
https://github.com/python/cpython/commit/cb65b3a4f484ce71dcb76a918af98c7015513025


--

___
Python tracker 

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



[issue36487] Make C-API docs clear about what the "main" interpreter is

2019-08-02 Thread Eric Snow


Eric Snow  added the comment:


New changeset 854d0a4b98b13629252e21edaf2b785b429e5135 by Eric Snow (Joannah 
Nanjekye) in branch 'master':
bpo-36487: Make C-API docs  clear about what the main interpreter is. (gh-12666)
https://github.com/python/cpython/commit/854d0a4b98b13629252e21edaf2b785b429e5135


--

___
Python tracker 

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



[issue17254] add thai encoding aliases to encodings.aliases

2019-08-02 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue34488] improve performance of BytesIO.writelines() by avoiding creation of unused PyLongs

2019-08-02 Thread Sergey Fedoseev


Sergey Fedoseev  added the comment:

`BytesIO.write()` and `BytesIO.writelines()` are independent of each other.

--

___
Python tracker 

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



[issue17254] add thai encoding aliases to encodings.aliases

2019-08-02 Thread Benjamin Wood


Benjamin Wood  added the comment:

>From what I can tell

cp874 != ibm_874 != iso_8859_11

What I can say is that the current cp874 is the implementation of the 
windows_874 code page. The page itself references the microsoft code page, and 
also contains the appropriate characters (like EURO SIGN).

https://github.com/python/cpython/blob/master/Lib/encodings/cp874.py
""" Python Character Mapping Codec cp874 generated from 
'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP874.TXT' with gencodec.py.

https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP874.TXT

It seems appropriate to at least alias windows_874 with cp874. They are 
provably the same.

If someone needs the IBM standard, they may have to write a different code page.

--
nosy: +Benjamin Wood

___
Python tracker 

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



[issue29036] logging module: Add `full_module_name` to LogRecord details

2019-08-02 Thread João Eiras

João Eiras  added the comment:

Hi.

I ask for this to be reconsidered. The "recommended" approach of using 
"getLogger(__name__)" comes with some downsides.

In my projects I often have many many files (in one particularly I have 
hundreds) and creating Logger object for each and every file, so LogRecord.name 
is correct is burdensome, litters the code and forces to add a global variable 
to the file. So, the easy approach we took was to use using logging.log(...) 
everywhere.

I've also seen code elsewhere where it is not guaranteed that 
"getLogger(__name__)" is called with the module __name__, but with some other 
string.

Or I've seen code where there is a shared Logger() created in some config.py 
that is then imported into other files.

Overall, relying on LogRecord.name is error prone and requires adding more code.

I checked the logging module. The findCaller() function could easily just poke 
frame.f_globals.get("__name__") to get the module name, and propagate that to 
the LogRecord.

It's a simple addition. I can make a PR so you can comment further there. The 
name of the property would be LogRecord.fullModule.

Thank you.

--
nosy: +João Eiras

___
Python tracker 

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



[issue37742] logging.getLogger accepts name='root' leading to confusion

2019-08-02 Thread Vinay Sajip


Change by Vinay Sajip :


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

___
Python tracker 

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



[issue37742] logging.getLogger accepts name='root' leading to confusion

2019-08-02 Thread Vinay Sajip


Change by Vinay Sajip :


--
assignee:  -> vinay.sajip

___
Python tracker 

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



[issue18049] Re-enable threading test on macOS

2019-08-02 Thread Michael Felt

Michael Felt  added the comment:

On 02/08/2019 11:57, Michael Felt wrote:
> On 02/08/2019 11:48, Ronald Oussoren wrote:
>> Ronald Oussoren  added the comment:
>>
>> That code is only called if THREAD_STACK_SIZE is defined. The block I 
>> mention defines it for macOS and FreeBSD, but not for other platforms. I 
>> therefore expect that this code is not used on AIX (which would be easy 
>> enough to verify by adding an #error to the block you mention.
> Should have been watching mail - I'll look at this asap.

Actually, it is defined for "most" platforms...

root@x066:[/data/prj/python/python3-3.9]make
xlc_r -c  -DNDEBUG -O -I/opt/include -O2 -qmaxmem=-1
-I../git/python3-3.9/Include/internal -IObjects -IInclude -IPython -I.
-I../git/python3-3.9/Include -I/opt/include   -DPy_BUILD_CORE -o
Python/thread.o ../git/python3-3.9/Python/thread.c
"../git/python3-3.9/Python/thread_pthread.h", line 255.2: 1506-205 (S)
#error "Not expected"
make: *** [Makefile:1706: Python/thread.o] Error 1

At the top of the file:

/* The POSIX spec requires that use of pthread_attr_setstacksize
   be conditional on _POSIX_THREAD_ATTR_STACKSIZE being defined. */
#ifdef _POSIX_THREAD_ATTR_STACKSIZE
#ifndef THREAD_STACK_SIZE
#define THREAD_STACK_SIZE   0   /* use default stack size */
#endif

/* The default stack size for new threads on OSX and BSD is small enough
that
 * we'll get hard crashes instead of 'maximum recursion depth exceeded'
 * exceptions.
 *
 * The default stack sizes below are the empirically determined minimal
stack
 * sizes where a simple recursive function doesn't cause a hard crash.
 */

So, the block is executed - but the size is 0 aka default.

As a first attempt - I'll take the FreeBSD size going:

michael@x071:[/data/prj/python/git/python3-3.9]git diff
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h
index 994e35b..83b7e77 100644
--- a/Python/thread_pthread.h
+++ b/Python/thread_pthread.h
@@ -47,6 +47,10 @@
 #undef  THREAD_STACK_SIZE
 #define THREAD_STACK_SIZE   0x40
 #endif
+#if defined(_AIX) && defined(THREAD_STACK_SIZE) && THREAD_STACK_SIZE == 0
+#undef  THREAD_STACK_SIZE
+#define THREAD_STACK_SIZE   0x40
+#endif
 /* for safety, ensure a viable minimum stacksize */
 #define THREAD_STACK_MIN    0x8000  /* 32 KiB */
 #else  /* !_POSIX_THREAD_ATTR_STACKSIZE */

And with this - the test passes. :)

--

___
Python tracker 

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



[issue18049] Re-enable threading test on macOS

2019-08-02 Thread Michael Felt


Michael Felt  added the comment:

On 02/08/2019 11:48, Ronald Oussoren wrote:
> Ronald Oussoren  added the comment:
>
> That code is only called if THREAD_STACK_SIZE is defined. The block I mention 
> defines it for macOS and FreeBSD, but not for other platforms. I therefore 
> expect that this code is not used on AIX (which would be easy enough to 
> verify by adding an #error to the block you mention.
Should have been watching mail - I'll look at this asap.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue37733] Fail to build _curses module of Python 3.7.4 on AIX 7.1 using gcc

2019-08-02 Thread LIU YONG


LIU YONG  added the comment:

Additional information of environment 
OS - AIX 7.1 (7100-05-03-1838)
gcc version 6.3.0 (GCC)
ncurses-6.1-2.ppc
ncurses-devel-6.1-2.ppc

I had tried to build Python3.7.3 and Python3.6.9, it hit same errors
It looks like some issue with ncurses version

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



[issue18049] Re-enable threading test on macOS

2019-08-02 Thread Michael Felt


Michael Felt  added the comment:

Going to take a stab in the dark - the the issue lies here:

"./Python/errors.c"
#ifndef Py_NORMALIZE_RECURSION_LIMIT
#define Py_NORMALIZE_RECURSION_LIMIT 32
#endif

As there is not enough memory for this to run in the default memory model.

However, 32 does not seem to be a counter limit:

With this "hack" I get success:

script = """if True:
import threading

def recurse(loop=0):
loop = loop+1
if loop < 128+32+8+3:
return recurse(loop)
else:
return

def outer():
try:
recurse()
except RecursionError:
pass

w = threading.Thread(target=outer)
w.start()
w.join()
print('end of main thread')
"""

So, I hope this helps point at where we need to look to find why RecursionError 
is not being returned when (I assume) memory runs out.

--

___
Python tracker 

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



[issue18049] Re-enable threading test on macOS

2019-08-02 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

That code is only called if THREAD_STACK_SIZE is defined. The block I mention 
defines it for macOS and FreeBSD, but not for other platforms. I therefore 
expect that this code is not used on AIX (which would be easy enough to verify 
by adding an #error to the block you mention.

--

___
Python tracker 

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



[issue18049] Re-enable threading test on macOS

2019-08-02 Thread Michael Felt


Michael Felt  added the comment:

*** 
Looking in ./Python/thread_pthread.h"

  +252  #if defined(THREAD_STACK_SIZE)
  +253  PyThreadState *tstate = _PyThreadState_GET();
  +254  size_t stacksize = tstate ? tstate->interp->pythread_stacksize : 0;
  +255  tss = (stacksize != 0) ? stacksize : THREAD_STACK_SIZE;
  +256  if (tss != 0) {
  +257  if (pthread_attr_setstacksize(, tss) != 0) {
  +258  pthread_attr_destroy();
  +259  return PYTHREAD_INVALID_THREAD_ID;
  +260  }
  +261  }
  +262  #endif

It appears asif the call needed (for AIX) - thread_attr_setstacksize(, 
tss) should be occurring.

Can you help me with a quick program that reports back the actual stack size an 
AIX thread has?

What may be at the heart of this (assuming the call above is working as 
expected) - the default memory size for AIX 32-bit is 256MB. Assuming 16 to 
32MB is already in use - if I understand this "recurse" logic - after about 
12-14 recursions the 256MB is consumed.

In short (work calls) - it seems the API mentioned is already in place and what 
is happening in terms of "exception catching" is different.

Looking forward to hints on how to dig further.

--

___
Python tracker 

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



[issue18049] Re-enable threading test on macOS

2019-08-02 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

@Michael: The relevant code is in Python/thread_pthread.h:  
https://github.com/python/cpython/blob/bf8162c8c45338470bbe487c8769bba20bde66c2/Python/thread_pthread.h#L34

There are already blocks for macOS and FreeBSD, adding a block for AIX should 
be easy enough. I don't know what a good size for the stack would be though, 
the macOS size is large enough to not cause crashes with the default recursion 
limit in debug builds and was experimentally determined.

--

___
Python tracker 

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



[issue34788] ipaddress module fails on rfc4007 scoped IPv6 addresses

2019-08-02 Thread Oleksandr Pavliuk


Oleksandr Pavliuk  added the comment:

Please, pay attention to this issue. Pull request needs core review.

--

___
Python tracker 

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



[issue29636] Specifying indent in the json.tool command

2019-08-02 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

[Serhiy]
> I don't think this PR should be merged. It adds too much options.

[Daniel]
> Since opening this issue, I've encountered several additional 
> instances where indentation control would have been nice.
> I don't agree that jq is a sufficient substitute.

I'm inclined to agree with Serhiy.  While there are some handy command-line 
calls, they are secondary offshoots to the standard library and tend to be 
lightweight rather than full featured.  They serve various purposes from quick 
demos to support of development and testing.  In general, they aren't intended 
to be applications unto themselves: we don't document all command line tools in 
one place, we don't version number them, we don't maintain forums or web pages 
for them, we typically don't lock in their behaviors with a unit tests, we 
don't guarantee that they will be available across versions, and we 
periodically change their APIs (for example when switching from getopt to 
argparse).

--

___
Python tracker 

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



[issue18049] Re-enable threading test on macOS

2019-08-02 Thread Michael Felt


Michael Felt  added the comment:

@Ronald - thanks.

Gives me something to work from. Would not have found this so easily!

But - where to put it... :)

--
nosy: +Michael.Felt

___
Python tracker 

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



[issue14384] Add "default" kw argument to operator.itemgetter and operator.attrgetter

2019-08-02 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Marking as closed for the reasons listed above.  And there has been no further 
comments for over a year.

--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue37729] gc: stats from multi process are mixed up

2019-08-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14823
pull_request: https://github.com/python/cpython/pull/15076

___
Python tracker 

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



[issue37729] gc: stats from multi process are mixed up

2019-08-02 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset bf8162c8c45338470bbe487c8769bba20bde66c2 by Inada Naoki in branch 
'master':
bpo-37729: gc: write stats at once (GH-15050)
https://github.com/python/cpython/commit/bf8162c8c45338470bbe487c8769bba20bde66c2


--

___
Python tracker 

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



[issue37742] logging.getLogger accepts name='root' leading to confusion

2019-08-02 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

It looks like the issue is that the root logger is missing from the manager's 
loggerDict.

A suggested fix is to change the creation of the loggerDict in the Manager 
class:

-   self.loggerDict = {}
+   self.loggerDict = {rootnode.name: rootnode}

This may have been omitted from the initial design to avoid reference cycles; 
however, with the advent of garbage collection this should no longer be an 
issue.  Alternatively, a weak reference could be used.

--
nosy: +rhettinger

___
Python tracker 

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



[issue37743] How should contextmanager/ContextDecorator work with generators?

2019-08-02 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
assignee:  -> ncoghlan

___
Python tracker 

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