[issue36502] The behavior of str.isspace() for U+00A0 and U+202F is different from what is documented

2019-04-02 Thread SilentGhost


SilentGhost  added the comment:

I think you have to read that "and" as "or". It's sufficient that '\u202f' is a 
separator for it to be considered a whitespace character.

--
nosy: +SilentGhost

___
Python tracker 

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



[issue36260] Cpython/Lib vulnerability found and request a patch submission

2019-04-02 Thread JUN-WEI SONG

JUN-WEI SONG  added the comment:

Hello Python community,

With Christian Heimes’ suggestion, we manipulate appropriate warning to inform 
users that they may encounter zip bomb issues when using the zipfile module.

The warning we would like to add in the zipfile documentation is shown below : 

https://github.com/python/cpython/blob/3.7/Doc/library/zipfile.rst

   .. warning::

Never extract files from untrusted sources without prior 
inspection. It is possible that the file may contain zip bomb 
issues such as 42.zip. The zip bomb will usually be a small file 
before decompression, but once it is decompressed, it will 
exhaust system resources.

You can protect your system by limiting system resources, limiting compression 
ratio (zip bombs are usually quite high), and checking for nested zip files. 

We are also pleasure to provide a patch to enhance the zipfile module to 
provide basic information.

In zipfile.py

https://github.com/python/cpython/blob/master/Lib/zipfile.py

Inside the ZipFile class : 


def filecount(self):
 
"""Return total count of files in the archive."""   
 
return len(self.filelist)   
 

 
def total_compressed_size(self):
 
"""Return total compressed size in the archive."""  
 
return sum([data.compress_size for data in self.filelist])  
 

 
def total_uncompressed_size(self):  
 
"""Return total uncompressed size in the archive."""
 
return sum([data.file_size for data in self.filelist])

--
resolution:  -> remind
status: closed -> open

___
Python tracker 

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



[issue27181] Add geometric mean to `statistics` module

2019-04-02 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Steven, how does this look?

https://patch-diff.githubusercontent.com/raw/python/cpython/pull/12638.diff

--

___
Python tracker 

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



[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2019-04-02 Thread miss-islington


miss-islington  added the comment:


New changeset 5ca4fe04784fa278c319a3764c9a755f49cc0944 by Miss Islington (bot) 
in branch '3.7':
bpo-13120: fix typo with test_issue13120() method name (GH-12250)
https://github.com/python/cpython/commit/5ca4fe04784fa278c319a3764c9a755f49cc0944


--

___
Python tracker 

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



[issue36473] dictkeysobject: Add maximum iteration check for .values() and .items()

2019-04-02 Thread Inada Naoki


Change by Inada Naoki :


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



[issue36210] correct AIX logic in setup.py for (non-existant) optional extensions

2019-04-02 Thread Michael Felt


Change by Michael Felt :


--
title: correct AIX logic in setup.py for non-existant optional extensions -> 
correct AIX logic in setup.py for (non-existant) optional extensions

___
Python tracker 

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



[issue36499] unpickling of a datetime object in 3.5 fails when pickled with 2.7

2019-04-02 Thread Karthikeyan Singaravelan

Karthikeyan Singaravelan  added the comment:

This seems to have been fixed with 8452ca15f41061c8a6297d7956df22ab476d4df4. I 
checked out your example locally and renamed pickle.py to another name to avoid 
module collision. Ran the below commands to pickle using Python 2 and to 
unpickle from master before and after the relevant commit. The fix is present 
in 3.7 and 3.6.

➜  bpo36499 python2 pickledatetime.py

# with 8452ca15f41061c8a6297d7956df22ab476d4df4
➜  bpo36499 ../cpython/python.exe unpickledatetime.py
Pickle:  {'timenode': datetime.datetime(2019, 4, 2, 15, 13, 2, 675110)}

# with 8452ca15f41061c8a6297d7956df22ab476d4df4~1
➜  bpo36499 ../cpython/python.exe unpickledatetime.py
Traceback (most recent call last):
  File "unpickledatetime.py", line 22, in 
main()
  File "unpickledatetime.py", line 18, in main
pkl = unpickler.load()
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/pickle.py", 
line 1081, in load
dispatch[key[0]](self)
  File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/pickle.py", 
line 1429, in load_reduce
stack[-1] = func(*args)
TypeError: an integer is required (got type str)

# pickledatetime.py

import io
import pickle
from datetime import datetime


def main():
"""
Uses python 2.7 to create a pickle file with a datetime object inside a 
dictionary.
"""
data = {}
data['timenode'] = datetime.now()
with io.open('written_by_py27.pickle', 'wb') as handle:
pickle.dump(data, handle, protocol=pickle.HIGHEST_PROTOCOL)

if __name__ == "__main__":
main()

# unpickledatetime.py

import io
import pickle


def main():
"""
Attempts to unpickle a dictionary with a datatype object inside
"""
with io.open('written_by_py27.pickle', 'rb') as handle:
unpickler = pickle._Unpickler(handle)
unpickler.encoding = 'latin1'
pkl = unpickler.load()
print("Pickle: ", pkl)

if __name__ == "__main__":
main()

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



[issue35838] ConfigParser calls optionxform twice when assigning dict

2019-04-02 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +12585

___
Python tracker 

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



[issue36503] remove references to aix3 and aix4 in \*.py

2019-04-02 Thread Michael Felt


New submission from Michael Felt :

sys.platform returns "aix[3|4|4|5|6|7"

AIX 3 and AIX 4 are no longer around, in any supported form, so references to 
these specific releases is pointless.

This will remove the (two) places where they are still referenced.

--
components: Build, Tests
messages: 339322
nosy: Michael.Felt
priority: normal
severity: normal
status: open
title: remove references to aix3 and aix4 in \*.py
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



[issue34677] Event scheduler page example

2019-04-02 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue36502] The behavior of str.isspace() for U+00A0 and U+202F is different from what is documented

2019-04-02 Thread Jun

New submission from Jun :

I was looking for a list of Unicode codepoints that str.isspace() returns true.

According to https://docs.python.org/3/library/stdtypes.html#str.isspace, it's 
"Whitespace characters are those characters defined in the Unicode character 
database as “Other” or “Separator” and those with bidirectional property being 
one of “WS”, “B”, or “S”."

However, for 
U+202F(https://www.fileformat.info/info/unicode/char/202f/index.htm) which is a 
"Separator" and its bidirectional property is "CS", str.isspace() returns True 
while it shouldn't if we follow the definition above. 

>>> "\u202f".isspace()
True

I'm not sure either the documentation should be updated or behavior should be 
updated, but at least those should be consistent.

--
assignee: docs@python
components: Documentation, Unicode
messages: 339317
nosy: Jun, docs@python, ezio.melotti, vstinner
priority: normal
severity: normal
status: open
title: The behavior of str.isspace() for U+00A0 and U+202F is different from 
what is documented
type: behavior
versions: Python 2.7, 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



[issue36503] remove references to aix3 and aix4 in \*.py

2019-04-02 Thread Michael Felt


Change by Michael Felt :


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

___
Python tracker 

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



[issue35838] ConfigParser: document optionxform must be idempotent

2019-04-02 Thread Inada Naoki


Change by Inada Naoki :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
title: ConfigParser calls optionxform twice when assigning dict -> 
ConfigParser: document optionxform must be idempotent

___
Python tracker 

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



[issue36502] The behavior of str.isspace() for U+00A0 and U+202F is different from what is documented

2019-04-02 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +lemburg

___
Python tracker 

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



[issue35838] ConfigParser calls optionxform twice when assigning dict

2019-04-02 Thread miss-islington


miss-islington  added the comment:


New changeset 9a838c593f6ada69a37025d7ded8ac822816a74c by Miss Islington (bot) 
in branch '3.7':
bpo-35838: document optionxform must be idempotent (GH-12656)
https://github.com/python/cpython/commit/9a838c593f6ada69a37025d7ded8ac822816a74c


--
nosy: +miss-islington

___
Python tracker 

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



[issue36473] dictkeysobject: Add maximum iteration check for .values() and .items()

2019-04-02 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset b8311cf5e5d72f8a8aa688b7da1760d6a74a4d72 by Inada Naoki (Thomas 
Perl) in branch 'master':
bpo-36473: add maximum iteration check for dict .values() and .items() 
(GH-12619)
https://github.com/python/cpython/commit/b8311cf5e5d72f8a8aa688b7da1760d6a74a4d72


--

___
Python tracker 

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



[issue35838] ConfigParser calls optionxform twice when assigning dict

2019-04-02 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 04694a306b8f4ab54ef5fc4ba673c26fa53b0ac1 by Inada Naoki in branch 
'master':
bpo-35838: document optionxform must be idempotent (GH-12656)
https://github.com/python/cpython/commit/04694a306b8f4ab54ef5fc4ba673c26fa53b0ac1


--

___
Python tracker 

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



[issue35838] ConfigParser calls optionxform twice when assigning dict

2019-04-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12586

___
Python tracker 

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



[issue36504] Signed integer overflow in _ctypes.c's PyCArrayType_new()

2019-04-02 Thread SilentGhost


Change by SilentGhost :


--
nosy: +amaury.forgeotdarc, belopolsky, meador.inge

___
Python tracker 

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



[issue36260] Cpython/Lib vulnerability found and request a patch submission

2019-04-02 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I am against such trivial methods in ZipFile. Its interface is already 
complicate. The advantage of Python is that you do not need tons of methods for 
every possible query -- you can just combine few Python features into a 
one-line expression.

As for the documentation change, it could be useful to add more general note 
about possible pitfalls. What happen when interrupt extracting or adding to the 
archive, what happen when extract into existing tree or overwrite an existing 
file, what happen when the file system does not support some file names, what 
happen when extract to case-insensitive file system, what happen when extract 
encrypted file with wrong password, etc. We do not have to tell the user what 
he should not do, just to warn about the possible consequences.

--

___
Python tracker 

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



[issue36504] Signed integer overflow in _ctypes.c's PyCArrayType_new()

2019-04-02 Thread Zackery Spytz


New submission from Zackery Spytz :

Signed integer overflow can occur in the overflow check in PyCArrayType_new() 
if "itemsize" is large enough.

--
components: Extension Modules, ctypes
messages: 339326
nosy: ZackerySpytz
priority: normal
severity: normal
status: open
title: Signed integer overflow in _ctypes.c's PyCArrayType_new()
type: behavior
versions: Python 2.7, 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



[issue36499] unpickling of a datetime object in 3.5 fails when pickled with 2.7

2019-04-02 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

As noted, this is fixed in 3.6+. 3.5 is in security fix only mode ( 
https://devguide.python.org/#status-of-python-branches ), which is why the fix 
for #22005 wasn't backported.

--
nosy: +josh.r
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> datetime.__setstate__ fails decoding python2 pickle

___
Python tracker 

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



[issue36504] Signed integer overflow in _ctypes.c's PyCArrayType_new()

2019-04-02 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 487b73ab39c80157474821ef9083f51e0846bd62 by Serhiy Storchaka 
(Zackery Spytz) in branch 'master':
bpo-36504: Fix signed integer overflow in _ctypes.c's PyCArrayType_new(). 
(GH-12660)
https://github.com/python/cpython/commit/487b73ab39c80157474821ef9083f51e0846bd62


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue36504] Signed integer overflow in _ctypes.c's PyCArrayType_new()

2019-04-02 Thread Zackery Spytz


Change by Zackery Spytz :


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

___
Python tracker 

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



[issue34677] Event scheduler page example

2019-04-02 Thread Karthikeyan Singaravelan

Karthikeyan Singaravelan  added the comment:

enter takes a relative time and priority is taken into consideration only when 
time is equal. So in the example enter(0.001, 2) is executed first and there is 
some delay in executing enter(0.001, 2). You can also view the queue with 
s.queue which is a heap. So even though they look similar the first call is 
scheduled earlier than the second one even with lower priority. 

Your report is correct if the example used enterabs where the time is absolute 
and then the two events are ordered based on priority with keyword executed 
first in the heapq used . In your script you can print s.sched and maybe add 
the same to the report?

# enter and s.sched prints different time with positional scheduled to be 
executed first in time.

➜  cpython git:(master) cat /tmp/bar.py
import sched, time
s = sched.scheduler(time.time, time.sleep)

def print_time(a='default'):
print("From print_time", time.time(), a)

def print_some_times():
print(time.time())
s.enter(0.001, 2, print_time, argument=('positional',))
s.enter(0.001, 1, print_time, kwargs={'a': 'keyword'})
print(s.queue)
s.run()
print(time.time())

print_some_times()
➜  cpython git:(master) ./python.exe /tmp/bar.py
1554204002.401897
[Event(time=1554204002.40309, priority=2, action=, argument=('positional',), kwargs={}), 
Event(time=1554204002.403158, priority=1, action=, argument=(), kwargs={'a': 'keyword'})]
>From print_time 1554204002.40331 positional
>From print_time 1554204002.403441 keyword
1554204002.403517

# enterabs and s.sched prints same time with keyword ordered first based on 
priority with time being equal.

➜  cpython git:(master) cat /tmp/baz.py
import sched, time
s = sched.scheduler(time.time, time.sleep)

def print_time(a='default'):
print("From print_time", time.time(), a)

def print_some_times():
print(time.time())
s.enterabs(0.001, 2, print_time, argument=('positional',))
s.enterabs(0.001, 1, print_time, kwargs={'a': 'keyword'})
print(s.queue)
s.run()
print(time.time())

print_some_times()
➜  cpython git:(master) ./python.exe /tmp/baz.py
1554204136.854676
[Event(time=0.001, priority=1, action=, 
argument=(), kwargs={'a': 'keyword'}), Event(time=0.001, priority=2, 
action=, argument=('positional',), 
kwargs={})]
>From print_time 1554204136.855422 keyword
>From print_time 1554204136.855669 positional
1554204136.855788

--
nosy: +giampaolo.rodola, xtreak

___
Python tracker 

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



[issue36505] PYTHON-CAN with vector

2019-04-02 Thread SilentGhost


SilentGhost  added the comment:

Hi tejesh, this is a bug tracker for development of CPython. If you have a 
problem with your code I'd suggest trying StackOverflow or python-help mailing 
list.

--
nosy: +SilentGhost
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue36502] The behavior of str.isspace() for U+00A0 and U+202F is different from what is documented

2019-04-02 Thread amazon kurodaju


amazon kurodaju  added the comment:

Do you mean read the statement as follows?

Whitespace characters are characters that satisfy either one of:
1. Character type is "Other"
2. Character type is "Separator"
3. Characters with "WS", "B", or "S" bidirectional property

If that's the case, this is also not reflect the behavior as most of characters 
in "Other" are not whitespace characters and in fact str.isspace() returns 
False for those characters.

--
nosy: +amazon kurodaju

___
Python tracker 

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



[issue36508] python-config --ldflags must not contain LINKFORSHARED

2019-04-02 Thread STINNER Victor

New submission from STINNER Victor :

python-config --ldflags must not contain LINKFORSHARED.

Attached PR modifies python-config --ldflags to no longer include LINKFORSHARED.

This similar change was already made on macOS: see bpo-14197.


--


Python build system uses a LINKFORSHARED variable, extract of configure.ac:

# LINKFORSHARED are the flags passed to the $(CC) command that links
# the python executable -- this is only needed for a few systems

This variable is set to "-Xlinker -export-dynamic" on Linux. Extract of ld 
manual page for --export-dynamic option:
---
When creating a dynamically linked executable, using the -E
option or the --export-dynamic option causes the linker to
add all symbols to the dynamic symbol table.  The dynamic
symbol table is the set of symbols which are visible from
dynamic objects at run time.

If you do not use either of these options (or use the
--no-export-dynamic option to restore the default behavior),
the dynamic symbol table will normally contain only those
symbols which are referenced by some dynamic object
mentioned in the link.

If you use "dlopen" to load a dynamic object which needs to
refer back to the symbols defined by the program, rather
than some other dynamic object, then you will probably need
to use this option when linking the program itself.

You can also use the dynamic list to control what symbols
should be added to the dynamic symbol table if the output
format supports it.  See the description of --dynamic-list.

Note that this option is specific to ELF targeted ports.  PE
targets support a similar function to export all symbols
from a DLL or EXE; see the description of
--export-all-symbols below.
---

Both configure.ac and ld manual page mention an "executable", whereas 
LINKFORSHARED is currently exported in python-config --ldflags. Example on 
Fedora 29:

$ python3-config --ldflags
 -L/usr/lib64 -lpython3.7m -lpthread -ldl  -lutil -lm  -Xlinker -export-dynamic

The "-export-dynamic" flag causes non-obvious dynamic linking bug like the 
following bug in Samba which embeds Python:

* https://bugzilla.redhat.com/show_bug.cgi?id=1198161 (python bug)
* https://bugzilla.redhat.com/show_bug.cgi?id=1198158 (bug reported on samba)
* https://bugzilla.redhat.com/show_bug.cgi?id=1197914 (bug originally reported 
on gdb)


--


History of the LINKFORSHARED variable.

(*) Python build system uses a LINKFORSHARED variable since this commit:

commit 7cc5abd4548629cc41d3951576f41ff2ddd7b5f7
Author: Guido van Rossum 
Date:   Mon Sep 12 10:42:20 1994 +

Support shared library creation.

The value of the variable changed on Linux with:

commit b65a48e2b631f9a171e6eab699974bd2074f40d7 (HEAD)
Author: Guido van Rossum 
Date:   Wed Jun 14 18:21:23 1995 +

linux elf shlib; sys/wait.h; don't add -posix for NeXT

Extract of the configure.in change:

 if test -z "$LINKFORSHARED"
 then
case $ac_sys_system in
hp*|HP*) LINKFORSHARED="-Wl,-E";;
+   Linux*) LINKFORSHARED="-rdynamic";;
esac
 fi

The variable was only used to build the "python" executable. Extract of 
Modules/Makefile.in (at commit 7cc5abd4548629cc41d3951576f41ff2ddd7b5f7):

../python:  config.o $(MYLIBS) Makefile
$(CC) $(OPT) config.o $(LINKFORSHARED) \
  $(MYLIBS) $(MODLIBS) $(LIBS) $(SYSLIBS) -o python
mv python ../python


(*) The python-config script was created as a Python script by:

commit c90b17ec8233009e4745dd8f77401f52c5d4a8d5
Author: Martin v. Löwis 
Date:   Sat Apr 15 08:13:05 2006 +

Patch #1161914: Add python-config.


The following commit modified Misc/python-config.in to add LINKFORSHARED to 
python-config --ldflags:

commit a70f3496203cd68d88208a21d90f0ca3503aa2f6
Author: Collin Winter 
Date:   Fri Mar 19 00:08:44 2010 +

Make python-config support multiple option flags on the same command line, 
rather than requiring one invocation per flag.

Extract:

+elif opt in ('--libs', '--ldflags'):
+libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
+libs.append('-lpython'+pyver)
+# add the prefix/lib/pythonX.Y/config dir, but only if there is no
+# shared library in prefix/lib/.
+if opt == '--ldflags':
+if not getvar('Py_ENABLE_SHARED'):
+libs.insert(0, '-L' + getvar('LIBPL'))
+libs.extend(getvar('LINKFORSHARED').split())
+print ' '.join(libs)


The following commit modified Misc/python-config.in to not add LINKFORSHARED 
into "libs" when built on macOS (if PYTHONFRAMEWORK is defined):

commit ecd4e9de5afab6a5d75a6fa7ebfb62804ba69264
Author: Ned Deily 
Date:   Tue Jul 24 03:31:48 2012 -0700

Issue #14197: For OS X framework builds, ensure links to the shared
library are created with the proper ABI suffix.

diff --git a/Misc/python-config.in b/Misc/python-config.in
index 1d4a81d850..79f0bb14c1 100644
--- a/Misc/python-config.in
+++ b/Misc/python-config.in
@@ -52,7 +52,8 @@ for 

[issue36506] [security] CVE-2019-10268: An arbitrary execution vulnerability exists in the built-in function getattr

2019-04-02 Thread STINNER Victor


Change by STINNER Victor :


--
title: An arbitrary execution vulnerability exists in the built-in function 
getattr -> [security] CVE-2019-10268: An arbitrary execution vulnerability 
exists in the built-in function getattr

___
Python tracker 

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



[issue36507] frozenset type breaks ZFC

2019-04-02 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

The code in the minimal example isn't creating nested frozensets.  Instead, if 
is converting one frozenset into another (because frozenset takes an iterable 
as an argument).  This is no different than list(list(list())) producing a 
single list rather than a nested list.

Here's how to build nested frozensets:

>>> x = frozenset({})
>>> y = frozenset({x})
>>> z = frozenset({y})
>>> x
frozenset()
>>> y
frozenset({frozenset()})
>>> z
frozenset({frozenset({frozenset()})})
>>> x is y
False
>>> x == y
False

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue36493] Add math.midpoint(a,b) function

2019-04-02 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

I see this has been rejected for the math module, but I wonder whether it 
should be considered for Decimal? I recall Mark Dickinson demonstrating this 
lovely little bit of behaviour:

py> from decimal import getcontext, Decimal
py> getcontext().prec = 3
py> x = Decimal('0.516')
py> y = Decimal('0.518')
py> (x + y) / 2
Decimal('0.515')


To prove its not a fluke, or an artifact of tiny numbers:

py> getcontext().prec = 28
py> a = Decimal('0.1009267827205')
py> b = Decimal('0.1009267827207')
py> a <= (a + b)/2 <= b
False

py> a = Decimal('71009267827205')
py> b = Decimal('71009267827207')
py> a <= (a + b)/2 <= b
False


Thoughts?

--
nosy: +steven.daprano

___
Python tracker 

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



[issue36508] python-config --ldflags must not contain LINKFORSHARED

2019-04-02 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +doko, ned.deily, pitrou

___
Python tracker 

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



[issue36507] frozenset type breaks ZFC

2019-04-02 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Python is a programming language, and we're probably not going to care too much 
about compliance with ZFC set theory unless there is good *practical* and not 
theoretical reason to care. That's not to say that we want to break ZFC, only 
that if we do so, we won't lose any sleep over it.

And it certainly won't mean that 3 == 2 as you suggest.

But fortunately, we haven't violated ZFC and this is not a bug in Python.

You've made two serious errors in your code. The first is that your second line 
of code:

y = frozenset(frozenset())

doesn't do what you think it does. It doesn't create a [frozen]set of a 
[frozen]set, (a nested set). It creates a simple, non-nested set. Printing the 
value of y in the interactive interpreter would have shown you that it was a 
plain old non-nested empty set:

py> print(y)
frozenset()

The code you want is something like:

   y = frozenset([frozenset()])

for reasons which I hope will become clear. The code you are actually using is 
equivalent to:

temp = set()  # mutable (non-frozen)
for x in frozenset():  # loop over the contents of the inner frozenset
temp.add(x)  # since that inner set is empty, nothing gets added
y = frozenset(temp)  # an empty frozenset


Your second error is using the `is` operator when you are talking about 
equality. The `is` operator tests for object identity, not equality, and the 
Python interpreter reserves the right to re-use objects when appropriate. In 
this case, the interpreter sees that it has two empty frozensets, and since 
they are indistinguishable and immutable, it saves memory by using the same 
object for both.

(To put it another way: the interpreter caches certain immutable objects to 
save memory, and empty frozensets happen to be included.)

Of course had you used `==` rather than `is` you would have got the same 
result, since two empty sets are equal, but the point still stands that you 
shouldn't use object identity when you mean equality.

Once we fix the bugs in your code, we see that ZFC is saved:

py> x = frozenset()  # empty set
py> y = frozenset([frozenset()])  # non-empty set
py> print(len(x), len(y))
0 1
py> x == y
False

--
nosy: +steven.daprano

___
Python tracker 

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



[issue36507] frozenset type breaks ZFC

2019-04-02 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +rhettinger

___
Python tracker 

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



[issue36508] python-config --ldflags must not contain LINKFORSHARED ("-Xlinker -export-dynamic" on Linux)

2019-04-02 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-10112: "Use -Wl,--dynamic-list=x.list, not -Xlinker 
-export-dynamic".

--

___
Python tracker 

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



[issue36508] python-config --ldflags must not contain LINKFORSHARED ("-Xlinker -export-dynamic" on Linux)

2019-04-02 Thread STINNER Victor


Change by STINNER Victor :


--
title: python-config --ldflags must not contain LINKFORSHARED -> python-config 
--ldflags must not contain LINKFORSHARED ("-Xlinker -export-dynamic" on Linux)

___
Python tracker 

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



[issue36508] python-config --ldflags must not contain LINKFORSHARED

2019-04-02 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue36507] frozenset type breaks ZFC

2019-04-02 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

(Aside: that's interesting, normally if I try to post a comment to an issue, 
and somebody else edits it in the meantime, the message doesn't get posted and 
I get a error message saying that the page has been edited. This time I did 
not.)

--

___
Python tracker 

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



[issue36505] PYTHON-CAN with vector

2019-04-02 Thread tejesh


New submission from tejesh :

Hi team,

I am trying to send CAN message from python
I can able to send CAN message with the time period(Limited duration). But, I 
want to send particular number of times(example: I want to send only 2 CAN 
Messages).
How can I send??

Can please help me to resolve this issue ASAP..

--
components: Build
messages: 339332
nosy: tejesh
priority: normal
severity: normal
status: open
title: PYTHON-CAN with vector
type: resource usage
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



[issue33261] inspect.isgeneratorfunction fails on hand-created methods

2019-04-02 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset fcef60f59d04c63b3540b4c4886226098c1bacd1 by Petr Viktorin (Jeroen 
Demeyer) in branch 'master':
bpo-33261: guard access to __code__ attribute in inspect (GH-6448)
https://github.com/python/cpython/commit/fcef60f59d04c63b3540b4c4886226098c1bacd1


--

___
Python tracker 

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



[issue36506] An arbitrary execution vulnerability exists in the built-in function getattr

2019-04-02 Thread Christian Heimes


Change by Christian Heimes :


--
components: +Interpreter Core -2to3 (2.x to 3.x conversion tool)

___
Python tracker 

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



[issue21269] Provide args and kwargs attributes on mock call objects

2019-04-02 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks @kakshay for the patch.

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



[issue35866] concurrent.futures deadlock

2019-04-02 Thread STINNER Victor


STINNER Victor  added the comment:

Any update on this issue? I don't understand why the example hangs.

--
nosy: +vstinner

___
Python tracker 

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



[issue36506] An arbitrary execution vulnerability exists in the built-in function getattr

2019-04-02 Thread bigbigliang

New submission from bigbigliang :

Dear Python Community, 

We’ve found a bug in cpython Lib and already received a cve number 
(CVE-2019-10268).But to be honest, I'm not sure if it's a loophole.
Please tell me what to do next.

bigbigliang

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 339337
nosy: 18z, bigbigliang, christian.heimes, krnick, serhiy.storchaka, vstinner, 
xtreak
priority: normal
severity: normal
status: open
title: An arbitrary execution vulnerability exists in the built-in function 
getattr
type: security
versions: Python 2.7, Python 3.5, Python 3.6, 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



[issue36502] The behavior of str.isspace() for U+00A0 and U+202F is different from what is documented

2019-04-02 Thread SilentGhost


SilentGhost  added the comment:

According to comment for _PyUnicode_IsWhitespace it's supposed to include Zs 
category, plus documented BIDI properties. So, I'm not sure where "Other" came 
from.

--
versions: +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



[issue36506] An arbitrary execution vulnerability exists in the built-in function getattr

2019-04-02 Thread Christian Heimes


Christian Heimes  added the comment:

Hi,

this is a public bug tracker. Please don't report new security bugs here but 
follow the guidelines at https://www.python.org/news/security/. Also please 
don't acquire CVE numbers for issues yourself. The Python Security Response 
Team will request CVE numbers.

--

___
Python tracker 

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



[issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams

2019-04-02 Thread Владислав Ярмак

Владислав Ярмак  added the comment:

I have similar crash with Python 3.7.2 on Linux.

Steps to reproduce: send sigint when Python initializes.

I've built debug version of Python 3.7.2 and collected core dump:

(gdb) thread apply all bt

Thread 1 (Thread 0x7f8f5ee67e80 (LWP 13285)):
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x7f8f5dfe742a in __GI_abort () at abort.c:89
#2  0x559515870286 in fatal_error (prefix=prefix@entry=0x5595159837f0 
<__func__.14264> "init_sys_streams", msg=msg@entry=0x559515983480 "can't 
initialize sys standard streams", status=-1) at Python/pylifecycle.c:2179
#3  0x559515871062 in _Py_FatalInitError (err=...) at 
Python/pylifecycle.c:2198
#4  0x55951577d1f5 in pymain_init (pymain=pymain@entry=0x7ffe886aafc0) at 
Modules/main.c:3019
#5  0x55951577d215 in pymain_main (pymain=pymain@entry=0x7ffe886aafc0) at 
Modules/main.c:3032
#6  0x55951577d29a in _Py_UnixMain (argc=, argv=) at Modules/main.c:3072
#7  0x5595157763e9 in main (argc=, argv=) at 
./Programs/python.c:15

--
nosy: +Владислав Ярмак

___
Python tracker 

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



[issue36507] frozenset type breaks ZFC

2019-04-02 Thread George Shuklin


New submission from George Shuklin :

ZFC (https://en.wikipedia.org/wiki/Zermelo%E2%80%93Fraenkel_set_theory) defines 
numbers as nested empty sets.

0 is {}
1 is {{}}
2 is {{{}}}

Sets can not be nested in python (as they are mutable), so next best type is 
frozen set. Unfortunately, nested sets are equal to each other no matter how 
deep they are nested. This behavior means that 3==2, and it breaks all set 
operations for ZFC.

Minimal example:

frozenset({frozenset()})
>>> x=frozenset()
>>> y=frozenset(frozenset())
>>> x is y
True

--
components: Interpreter Core
messages: 339340
nosy: george-shuklin
priority: normal
severity: normal
status: open
title: frozenset type breaks ZFC
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue36506] An arbitrary execution vulnerability exists in the built-in function getattr

2019-04-02 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

The security vulnerability disclosure process can be found at 
https://www.python.org/news/security/ . Please contact secur...@python.org.

--

___
Python tracker 

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



[issue36508] python-config --ldflags must not contain LINKFORSHARED

2019-04-02 Thread STINNER Victor


STINNER Victor  added the comment:

I'm a little bit scared by the idea of backporting such change in Python 2.7 
and 3.7 stable branches, even if I think that it's a correct bugfix. I'm scared 
by the number of platforms, I don't know all these linker flags and I am not 
able to test all combinations:

AC_MSG_RESULT($CCSHARED)
# LINKFORSHARED are the flags passed to the $(CC) command that links
# the python executable -- this is only needed for a few systems
AC_MSG_CHECKING(LINKFORSHARED)
if test -z "$LINKFORSHARED"
then
case $ac_sys_system/$ac_sys_release in
AIX*)   LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
hp*|HP*)
LINKFORSHARED="-Wl,-E -Wl,+s";;
#   LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
# -u libsys_s pulls in all symbols in libsys
Darwin/*)
LINKFORSHARED="$extra_undefs -framework CoreFoundation"

# Issue #18075: the default maximum stack size (8MBytes) is too
# small for the default recursion limit. Increase the stack size
# to ensure that tests don't crash
LINKFORSHARED="-Wl,-stack_size,100 $LINKFORSHARED"

if test "$enable_framework"
then
LINKFORSHARED="$LINKFORSHARED 
"'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
fi
LINKFORSHARED="$LINKFORSHARED";;
OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
if [[ "`$CC -dM -E - &1 | grep export-dynamic >/dev/null
then
LINKFORSHARED="-Xlinker --export-dynamic"
fi;;
  esac;;
CYGWIN*)
if test $enable_shared = "no"
then
LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
fi;;
QNX*)
# -Wl,-E causes the symbols to be added to the dynamic
# symbol table so that they can be found when a module
# is loaded.  -N 2048K causes the stack size to be set
# to 2048 kilobytes so that the stack doesn't overflow
# when running test_compile.py.
LINKFORSHARED='-Wl,-E -N 2048K';;
VxWorks*)
LINKFORSHARED='--export-dynamic';;  
esac
fi
AC_MSG_RESULT($LINKFORSHARED)

--

___
Python tracker 

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



[issue32413] Document that locals() may return globals()

2019-04-02 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12592

___
Python tracker 

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



[issue36379] nb_inplace_pow is always called with an invalid argument

2019-04-02 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

skrah: Is there any reason your patch, as written, wouldn't work? If you need a 
test case to verify, gmpy2's xmpz type supports in place pow (but requires the 
modulus to be None, since there is no normal way to pass it anyway), so you can 
just test:

>>> xm = gmpy2.xmpz(2)
>>> xm.__ipow__(3, 5)

Right now, that code will raise a TypeError (from check_num_args in 
wrap_binary_func):

TypeError: expected 1 argument, got 2

while:

>>> xm.__ipow__(3)

typically results in:

SystemError: modulo not expected

because wrap_binaryfunc fails to pass the expected argument so the receiver 
sees garbage, and xmpz's ipow implementation checks the third argument raises 
an exception if anything but None is received; barring a coincidence of Py_None 
being on the stack there, it'll always fail the test.

Changing to wrap_ternaryfunc should make xm.__ipow__(3, 5) raise the 
SystemError currently raised by xm.__ipow__(3) (because it doesn't accept 
non-None), while xm.__ipow__(3) will work correctly.

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



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

2019-04-02 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
components: +Documentation
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



[issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-04-02 Thread Paul Monson


Change by Paul Monson :


--
pull_requests: +12593

___
Python tracker 

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



[issue36364] errors in multiprocessing.shared_memory examples

2019-04-02 Thread Brett Cannon


Brett Cannon  added the comment:

@Davin is there an issue for that and thus this issue can then be closed? Or 
did you want to re-purpose this issue to track that? Either way I'm assigning 
the issue to you to let you decide which way you want to go. :)

--
assignee: docs@python -> davin

___
Python tracker 

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



[issue36510] Regular Expression Dot-Star patter matching - re- text skipping

2019-04-02 Thread DJR


New submission from DJR :

#Python 3.7.2 Tk version 8.6.8
#IDLE version: 3.7.2
#Following code does not return ALL the partial matched patters within a string

import re
#_
#Normal Mode
#_

atRegex = re.compile(r'...at')
TextStr=(atRegex.findall(':at-at~at:  The Bigcat sat in the hat sat on the flat 
sat mat sat.'))
print('\nFull Text String:---> :at-at~at: The Bigcat sat in the hat sat on the 
flat sat mat sat\n')
print('\n Normal Mode: Returns\n' +  ':--->' + str(TextStr))


#_
#Greedy Mode
#_

atRegex = re.compile(r'...at*')
TextStr=(atRegex.findall(':at-at~at:  The Bigcat sat in the hat sat on the flat 
sat mat sat.'))
print('\nFull Text String:---> :at-at~at: The Bigcat sat in the hat sat on the 
flat sat mat sat mat\n')
print('\n Greedy Mode: Returns\n' +  ':---> ' + str(TextStr)+'\n')

"""
#===
# IDLE OutPut Normal Mode and Greedy Mode:  multiple 'sat' are missing 
#===
Full Text String:---> :at-at~at: The Bigcat sat in the hat sat on the flat sat 
mat sat.

 Normal Mode: Returns
:---> ['at-at', 'igcat', 'e hat', ' flat', 't mat']


Full Text String:---> :at-at~at: The Bigcat sat in the hat sat on the flat sat 
mat sat.


 Greedy Mode: Returns
:---> ['at-at', 'igcat', 'e hat', ' flat', 't mat']

"""

--
assignee: terry.reedy
components: IDLE, Library (Lib), Regular Expressions, Windows
messages: 339357
nosy: djr_python, ezio.melotti, mrabarnett, paul.moore, steve.dower, 
terry.reedy, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Regular Expression Dot-Star patter matching  - re- text skipping
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue32413] Document that locals() may return globals()

2019-04-02 Thread Brett Cannon


Change by Brett Cannon :


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



[issue36512] future_factory argument for Thread/ProcessPoolExecutor

2019-04-02 Thread Stefan Hölzl

Change by Stefan Hölzl :


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

___
Python tracker 

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



[issue36506] [security] CVE-2019-10268: An arbitrary execution vulnerability exists in the built-in function getattr

2019-04-02 Thread SilentGhost


SilentGhost  added the comment:

As another note, this seem to be a third "security" issue created in less then 
a week to the same template (others are 36260 and 36462). I hope it's some 
assignment due soon.

--
nosy: +SilentGhost

___
Python tracker 

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



[issue36084] Threading: add builtin TID attribute to Thread objects

2019-04-02 Thread Jake Tesler


Jake Tesler  added the comment:

*bump*

Could someone look into reviewing this bug/PR? Thanks!

--

___
Python tracker 

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



[issue36511] Add Windows ARM32 buildbot

2019-04-02 Thread Paul Monson

New submission from Paul Monson :

Zachary Ware suggested I create an issue to discuss this:

I've started a worker using the worker name monson-win-arm32 and the password 
provided.

I think it is waiting for a change, there were no errors, but it didn't print 
anything.

Also, I don’t see anything in the list of builders that looks like it would be 
windows arm32, and it's not showing in the list of workers.

I'm looking at tools/buildbot/test.bat and it seems like it might be a good 
place to use SSH to run the test on arm32 device, but I'm not clear on where it 
is called from or what the best way to detect that project is being 
cross-compiled.  

Should I add an "-arm32" switch here?

--
components: Build, Windows
messages: 339362
nosy: Paul Monson, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Add Windows ARM32 buildbot
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



[issue36511] Add Windows ARM32 buildbot

2019-04-02 Thread Paul Monson


Change by Paul Monson :


--
nosy: +vstinner

___
Python tracker 

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



[issue36158] Regex search behaves differently in list comprehension

2019-04-02 Thread Josh Rosenberg


Change by Josh Rosenberg :


--
resolution:  -> not a bug
stage:  -> resolved
status: pending -> closed

___
Python tracker 

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



[issue36509] Add iot layout for windows iot containers

2019-04-02 Thread Paul Monson


New submission from Paul Monson :

The layout should not contain tcl/tk, tkinter, distutils since ARM is 
cross-compiled and these features will not be useful on target ARM devices.

--
components: Build, Windows
messages: 339352
nosy: Paul Monson, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Add iot layout for windows iot containers
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



[issue36509] Add iot layout for windows iot containers

2019-04-02 Thread Paul Monson


Change by Paul Monson :


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

___
Python tracker 

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



[issue35866] concurrent.futures deadlock

2019-04-02 Thread cagney


cagney  added the comment:

I've attached a variation on cf-deadlock.py that, should nothing happen for 2 
minutes, will kill itself.  Useful with git bisect.

--
Added file: https://bugs.python.org/file48242/cf-deadlock-alarm.py

___
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-04-02 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


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

___
Python tracker 

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



[issue36475] PyEval_AcquireLock() and PyEval_AcquireThread() do not handle runtime finalization properly.

2019-04-02 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
keywords: +patch
pull_requests: +12595
stage: test needed -> patch review

___
Python tracker 

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



[issue36506] [security] CVE-2019-10268: An arbitrary execution vulnerability exists in the built-in function getattr

2019-04-02 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

I'll note that, based on the title, I'm skeptical of the claim of a 
vulnerability. getattr is effectively *designed* to execute arbitrary code if 
called on an appropriate object (one where the class defines __getattribute__; 
defines __getattr__ without defining the name in question; defines the name in 
question as a property, not an instance attribute; or does something 
complicated with metaclasses that achieves a similar result looking up the 
attribute on the class).

In all of those cases, the "vulnerability" only exists if:

1. The object in question defines a vulnerable handler for the attribute (that 
is, provides a code path for arbitrary execution that Python's attribute lookup 
machinery wasn't responsible for except insofar as it passed control to the 
unsafe handler in question)
2. Untrusted user input is passed as the name to look up on the vulnerable 
object

If it's something more subtle than that (e.g. something where a "plain" 
instance with no special execution path supports arbitrary execution), that's 
an issue, but if it requires a Python developer to both create the 
vulnerability and open a path to trigger it explicitly, that doesn't really 
count.

--
keywords: +security_issue
nosy: +josh.r

___
Python tracker 

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



[issue36510] Regular Expression Dot-Star patter matching - re- text skipping

2019-04-02 Thread SilentGhost


SilentGhost  added the comment:

re.findall returns non-overlapping matches (as is made clear in documentation). 
This is the behaviour you're observing.

--
assignee: terry.reedy -> 
components:  -IDLE, Library (Lib), Windows
nosy: +SilentGhost
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue32413] Document that locals() may return globals()

2019-04-02 Thread miss-islington


miss-islington  added the comment:


New changeset ef516d11c1a0f885dba0aba8cf5366502077cdd4 by Miss Islington (bot) 
in branch '3.7':
bpo-32413: Add documentation that at the module level, locals(), globals() are 
the  same dictionary (GH-5004)
https://github.com/python/cpython/commit/ef516d11c1a0f885dba0aba8cf5366502077cdd4


--
nosy: +miss-islington

___
Python tracker 

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



[issue20399] Comparison of memoryview

2019-04-02 Thread james stone


james stone  added the comment:

I encountered this issue as well when using python 3.6.7 and psycopg2. Postgres 
tries to sort rows by the primary key field and if the returned type is a 
memoryview an the error is thrown: "TypeError: '<' not supported between 
instances of 'memoryview' and 'memoryview'." It may be more on the postgres 
guys to use a proper type with full comparison support. But I wanted to mention 
it here as a datapoint for a valid use case in the wild. More details on the 
specific issue at https://github.com/modoboa/modoboa-amavis/issues/115

--
nosy: +james stone

___
Python tracker 

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



[issue36512] future_factory argument for Thread/ProcessPoolExecutor

2019-04-02 Thread Stefan Hölzl

New submission from Stefan Hölzl :

adding a future_factory argument to Thread/ProcessPoolExecutor to control which 
type of Future should be created by Executor.submit

--
components: Library (Lib)
messages: 339364
nosy: stefanhoelzl
priority: normal
severity: normal
status: open
title: future_factory argument for Thread/ProcessPoolExecutor
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



[issue36485] Establish a uniform way to clear all caches in a given module

2019-04-02 Thread Brett Cannon


Brett Cannon  added the comment:

Did you mean importlib.reload() instead of sys.reload()?

And technically it would *if* you're okay with the other side-effects of 
reloading, e.g. making sure no one has a reference to any objects from the 
module's namespace which won't change in-place (e.g. if you stored a reference 
to the cache in some code then the reload wouldn't clear it for the stored 
reference).

--

___
Python tracker 

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



[issue36513] Add support for building arm32 nuget package

2019-04-02 Thread Paul Monson


Change by Paul Monson :


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

___
Python tracker 

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



[issue6721] Locks in the standard library should be sanitized on fork

2019-04-02 Thread cagney


cagney  added the comment:

I suspect 3b699932e5ac3e7 is causing a hang in libreswan's kvmrunner.py on 
Fedora.

Looking at the Fedora RPMs:

python3-3.7.0-9.fc29.x86_64 didn't contain the fix and worked
python3-3.7.1-4.fc29.x86_64 reverted the fix (for anaconda) and worked
python3-3.7.2-4.fc29.x86_64 included the fix; eventually hangs

I believe the hang looks like:

Traceback (most recent call last):
  File "/home/build/libreswan-web/master/testing/utils/fab/runner.py", line 
389, in _process_test
test_domains = _boot_test_domains(logger, test, domain_prefix, 
boot_executor)
  File "/home/build/libreswan-web/master/testing/utils/fab/runner.py", line 
203, in _boot_test_domains
TestDomain.boot_and_login)
  File "/home/build/libreswan-web/master/testing/utils/fab/runner.py", line 
150, in submit_job_for_domain
logger.debug("scheduled %s on %s", job, domain)
  File "/usr/lib64/python3.7/logging/__init__.py", line 1724, in debug

  File "/usr/lib64/python3.7/logging/__init__.py", line 1768, in log
def __repr__(self):
  File "/usr/lib64/python3.7/logging/__init__.py", line 1449, in log
"""
  File "/usr/lib64/python3.7/logging/__init__.py", line 1519, in _log
break
  File "/usr/lib64/python3.7/logging/__init__.py", line 1529, in handle
logger hierarchy. If no handler was found, output a one-off error
  File "/usr/lib64/python3.7/logging/__init__.py", line 1591, in callHandlers

  File "/usr/lib64/python3.7/logging/__init__.py", line 905, in handle
try:
  File "/home/build/libreswan-web/master/testing/utils/fab/logutil.py", line 
163, in emit
stream_handler.emit(record)
  File "/usr/lib64/python3.7/logging/__init__.py", line 1038, in emit
Handler.__init__(self)
  File "/usr/lib64/python3.7/logging/__init__.py", line 1015, in flush
name += ' '
  File "/usr/lib64/python3.7/logging/__init__.py", line 854, in acquire
self.emit(record)
KeyboardInterrupt

--
nosy: +cagney

___
Python tracker 

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



[issue36506] [security] CVE-2019-10268: An arbitrary execution vulnerability exists in the built-in function getattr

2019-04-02 Thread bigbigliang

bigbigliang  added the comment:

Yes, as you said. I think this problem can be closed. My initial idea was
that if a user carefully constructs a vulnerability point, it may cause
some danger, such as 'getattr(os,"system")("/bin/sh")'. So I have some
ideas about whether it is necessary to filter it.
Thank you for your reply.

from:bigbigliang

Josh Rosenberg  于2019年4月3日周三 上午12:52写道:

>
> Josh Rosenberg  added the comment:
>
> I'll note that, based on the title, I'm skeptical of the claim of a
> vulnerability. getattr is effectively *designed* to execute arbitrary code
> if called on an appropriate object (one where the class defines
> __getattribute__; defines __getattr__ without defining the name in
> question; defines the name in question as a property, not an instance
> attribute; or does something complicated with metaclasses that achieves a
> similar result looking up the attribute on the class).
>
> In all of those cases, the "vulnerability" only exists if:
>
> 1. The object in question defines a vulnerable handler for the attribute
> (that is, provides a code path for arbitrary execution that Python's
> attribute lookup machinery wasn't responsible for except insofar as it
> passed control to the unsafe handler in question)
> 2. Untrusted user input is passed as the name to look up on the vulnerable
> object
>
> If it's something more subtle than that (e.g. something where a "plain"
> instance with no special execution path supports arbitrary execution),
> that's an issue, but if it requires a Python developer to both create the
> vulnerability and open a path to trigger it explicitly, that doesn't really
> count.
>
> --
> keywords: +security_issue
> nosy: +josh.r
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue36501] Remove POSIX.1e ACLs in tests that rely on default permissions behavior

2019-04-02 Thread Ivan Pozdeev


Ivan Pozdeev  added the comment:

Seeing during PR composition how basically every mode check and every 
`test.support.temp_umask` use is broken by ACLs, I'm starting to doubt that 
fixing individual test cases is the way to go.

Though we can simply not worry about supporting everything imaginable and solve 
problems as they come and declare highly unusual cases unsupported.

For the record, other potential problems:

* All open(O_CREAT) and umask uses anywhere in the tests are broken by default.
* Though only 4 test files were affected for now -- test_pathlib, 
test_tarfile, test_os, test_import .
* There are other overlay security frameworks that override POSIX permissions 
like NFSv4 and SELinux.

And possible solutions:

* Skip mode_t checks outright if overlay security is detected like it's already 
done in Windows
* Embed cleanup code into test.support's temp_* and such. In the POSIX.1e case, 
will have to create temporary dirs or change permissions for the current dir.
* I don't think regrtest's temporary dir is a good place for this 'cuz 
tests are supposed to be runnable directly with `unittest`, too.

--

___
Python tracker 

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



[issue36475] PyEval_AcquireLock() and PyEval_AcquireThread() do not handle runtime finalization properly.

2019-04-02 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:

@eric.snow , you can review the PR I submitted for this.

--
nosy: +nanjekyejoannah

___
Python tracker 

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



[issue36485] Establish a uniform way to clear all caches in a given module

2019-04-02 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> Did you mean importlib.reload() instead of sys.reload()?

Yes.

> And technically it would *if* you're okay with the other 
> side-effects of reloading,

If you want to go forward with this, go for it. I would like to be able to 
explain to another person why this is needed, but personally can't visualize a 
circumstance where a person is testing module, doesn't know how to use the 
existing cache clearing APIs, but needs to clear caches (not sure why), and 
doesn't either know or want what happens on import.  I've never seen this 
situation arise, but if it's something you want, I won't stand it the way.

BTW, if you're going to have some sort of clear_all(), perhaps it should cover 
the sys.intern() dictionary and string hashes as well.  AFAICT, there's nothing 
special about a regex cache that gives it a greater need to be cleared

--

___
Python tracker 

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



[issue36322] Argument typo in dbm.ndbm.open

2019-04-02 Thread Brett Cannon


Brett Cannon  added the comment:

So Terry is correct in so much as there is no parameter name. :) Both of the 
functions in question are positional-only, so the name actually doesn't matter 
beyond giving a way to reference the parameter in the documentation.

So thanks for the PR, Marco, but I'm going to reject this as there's nothing 
actually wrong with the gdbm or ndbm docs.

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

___
Python tracker 

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



[issue6721] Locks in the standard library should be sanitized on fork

2019-04-02 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

We need a small test case that can reproduce your problem.  I believe 
https://github.com/python/cpython/commit/3b699932e5ac3e76031bbb6d700fbea07492641d
 to be correct.

acquiring locks before fork in the thread doing the forking and releasing them 
afterwards is always the safe thing to do.

Example possibility: Does your code use any C code that forks on its own 
without properly calling the C Python PyOS_BeforeFork(), 
PyOS_AfterFork_Parent(), and PyOS_AfterFork_Child() APIs?

--

___
Python tracker 

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



[issue35866] concurrent.futures deadlock

2019-04-02 Thread cagney


cagney  added the comment:

I'm seeing cf-deadlock-alarm.py hangs on vanilla python 3.7.[0123] with:

Linux 5.0.5-100.fc28.x86_64 #1 SMP Wed Mar 27 22:16:29 UTC 2019 x86_64 x86_64 
x86_64 GNU/Linux
glibc-2.27-37.fc28.x86_64

can anyone reproduce this?

I also wonder if this is connected to bpo-6721 where a recent "fix" made things 
worse - the fedora versions that work for libreswan don't have the "fix".

--

___
Python tracker 

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



[issue36513] Add support for building arm32 nuget package

2019-04-02 Thread Paul Monson


Change by Paul Monson :


--
components: Build, Windows
nosy: Paul Monson, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Add support for building arm32 nuget package
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



[issue36322] Argument typo in dbm.ndbm.open

2019-04-02 Thread Brett Cannon


Brett Cannon  added the comment:

Actually, it's even more subtle as the arguments are positional-only.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue32941] mmap should expose madvise()

2019-04-02 Thread Giampaolo Rodola'


Change by Giampaolo Rodola' :


--
nosy: +giampaolo.rodola

___
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-04-02 Thread Yue Sun


Change by Yue Sun :


--
pull_requests: +12598

___
Python tracker 

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



[issue36440] more helpful diagnostics for parser module

2019-04-02 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +12599
stage:  -> patch review

___
Python tracker 

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



[issue32941] mmap should expose madvise()

2019-04-02 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

It might be nice to expose a more limited API to prefetch memory in bulk while 
we're at it. Windows 8 and higher offers PrefetchVirtualMemory ( 
https://docs.microsoft.com/en-us/windows/desktop/api/memoryapi/nf-memoryapi-prefetchvirtualmemory
 ) which fills roughly the same niche as madvise/posix_madvise with the 
WILLNEED hint.

I kept meaning to file an issue to suggest this, but kept getting hung up on 
how to make it as portable as possible and as powerful as possible, and where 
to implement it.

It could go on mmap, but it's also useful for just about any contiguous 
buffer-supporting object, so it almost seems like adding an os.madvise (and/or 
os.prefetch) would make more sense than specifically tying it to the mmap 
module.

--
nosy: +josh.r

___
Python tracker 

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



[issue36501] Remove POSIX.1e ACLs in tests that rely on default permissions behavior

2019-04-02 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +steve.dower

___
Python tracker 

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



[issue36505] PYTHON-CAN with vector

2019-04-02 Thread tejesh


tejesh  added the comment:

THANKS for your response

i have tried checking in Stackoverflow i did not get any help from the list 
Q's in Stackoverflow 

i sent out mail to python help also still i did not got any help

i need help ASAP 

Thanks again

--
status: closed -> open

___
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-04-02 Thread Fred L. Drake, Jr.


Fred L. Drake, Jr.  added the comment:

Updated target to Python 3.8, since this has aged a bit.

--
versions: +Python 3.8 -Python 3.5

___
Python tracker 

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



[issue36440] more helpful diagnostics for parser module

2019-04-02 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset cb0748d3939c31168ab5d3b80e3677494497d5e3 by Pablo Galindo 
(tyomitch) in branch 'master':
bpo-36440: include node names in ParserError messages, instead of numeric IDs 
(GH-12565)
https://github.com/python/cpython/commit/cb0748d3939c31168ab5d3b80e3677494497d5e3


--

___
Python tracker 

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



[issue36515] unaligned memory access in the _sha3 extension

2019-04-02 Thread Matthias Klose


New submission from Matthias Klose :

This was seen when running an armhf binary on a 64bit kernel. The problem is 
that the implementation uses unaligned memory accesses, and even is well aware 
of that. The module allows misaligned memory accesses by default. The 
NO_MISALIGNED_ACCESSES macro is never defined.  Now you can define it only on 
architectures where unaligned memory accesses are not allowed (ARM32 on 64bit 
kernels), or where there are performance penalties (AArch64), or just don't try 
to outsmart modern compilers and always define this macro.

The attached patch only fixes the issue on ARM32 and AArch64, however the safe 
fix should be to always define the macro.

--
components: Extension Modules
files: arm-alignment.diff
keywords: patch
messages: 339379
nosy: christian.heimes, doko
priority: high
severity: normal
status: open
title: unaligned memory access in the _sha3 extension
type: crash
versions: Python 3.6, Python 3.7, Python 3.8
Added file: https://bugs.python.org/file48243/arm-alignment.diff

___
Python tracker 

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



[issue36514] -m switch revisited

2019-04-02 Thread Colin Dick


New submission from Colin Dick :

-m switch revisited - see issue 27487
Win 10 64bit
python 3.6.3 & 3.7.3

initially running code using py 3.6.3 with this command
python -m vixsd.py
produced
C:\Python36\python.exe: Error while finding module specification for 'vixsd.py' 
(AttributeError: module 'vixsd' has no attribute '__path__')

updated python from 3.6.3 to 3.7.3

searched & read web
retried the 4 options with & without "-m" & ".py"
results reproduced below

c:\shared\python\vmw>python vixsd
python: can't open file 'vixsd': [Errno 2] No such file or directory

c:\shared\python\vmw>python vixsd.py
A

c:\shared\python\vmw>python -m vixsd
A

c:\shared\python\vmw>python -m vixsd.py
A
C:\Python3\python.exe: Error while finding module specification for 'vixsd.py' 
(ModuleNotFoundError: __path__ attribute not found on 'vixsd' while trying to 
find 'vixsd.py')

while this was initially produced thru my ignorance,
handling all 4 options still does not work correctly
appears to have been a problem at least since
issue 27487

cheers team, keep up the great work
ColinDNZ

--
messages: 339374
nosy: Colin Dick
priority: normal
severity: normal
status: open
title: -m switch revisited
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue36512] future_factory argument for Thread/ProcessPoolExecutor

2019-04-02 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +bquinlan, pitrou

___
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-04-02 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +scoder, serhiy.storchaka

___
Python tracker 

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