[issue31171] multiprocessing.BoundedSemaphore of 32-bit python could not work while cross compiling on linux platform

2018-11-15 Thread Hongxu Jia


Change by Hongxu Jia :


--
pull_requests: +9812

___
Python tracker 

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



[issue31171] multiprocessing.BoundedSemaphore of 32-bit python could not work while cross compiling on linux platform

2018-11-15 Thread Hongxu Jia


Change by Hongxu Jia :


--
pull_requests:  -9808

___
Python tracker 

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



[issue31171] multiprocessing.BoundedSemaphore of 32-bit python could not work while cross compiling on linux platform

2018-11-15 Thread Hongxu Jia


Change by Hongxu Jia :


--
pull_requests:  -9809

___
Python tracker 

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



[issue31171] multiprocessing.BoundedSemaphore of 32-bit python could not work while cross compiling on linux platform

2018-11-15 Thread Hongxu Jia


Change by Hongxu Jia :


--
pull_requests: +9810

___
Python tracker 

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



[issue31171] multiprocessing.BoundedSemaphore of 32-bit python could not work while cross compiling on linux platform

2018-11-15 Thread Hongxu Jia


Change by Hongxu Jia :


--
pull_requests: +9809

___
Python tracker 

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



[issue31171] multiprocessing.BoundedSemaphore of 32-bit python could not work while cross compiling on linux platform

2018-11-15 Thread Hongxu Jia


Change by Hongxu Jia :


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

___
Python tracker 

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



[issue31171] multiprocessing.BoundedSemaphore of 32-bit python could not work while cross compiling on linux platform

2018-11-15 Thread Hongxu Jia


Change by Hongxu Jia :


--
pull_requests:  -3087

___
Python tracker 

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



[issue35263] Add None handling for get_saved() in IDLE

2018-11-15 Thread Raymond Hettinger


New submission from Raymond Hettinger :

Exception in Tkinter callback
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tkinter/__init__.py",
 line 1705, in __call__
return self.func(*args)
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/idlelib/multicall.py",
 line 176, in handler
r = l[i](event)
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/idlelib/filelist.py",
 line 54, in close_all_callback
reply = edit.close()
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/idlelib/pyshell.py",
 line 1014, in close
return EditorWindow.close(self)
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/idlelib/editor.py",
 line 1015, in close
reply = self.maybesave()
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/idlelib/outwin.py",
 line 93, in maybesave
return 'yes' if self.get_saved() else 'no'
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/idlelib/editor.py",
 line 948, in get_saved
return self.undo.get_saved()
AttributeError: 'NoneType' object has no attribute 'get_saved'

--
assignee: terry.reedy
components: IDLE
messages: 329982
nosy: rhettinger, terry.reedy
priority: normal
severity: normal
status: open
title: Add None handling for get_saved() in IDLE
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



[issue35262] There should be a list.get just like dict.get

2018-11-15 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

This idea has been discussed before and was rejected.  While get() makes sense 
and has valid use cases for dictionaries which use key based lookups, there 
isn't a parallel for lists.  In general, we do just fine without list.get().   
Also, it seems that other languages have mostly made the same decision in this 
regard.

Thank you for the suggestion though.

--
nosy: +rhettinger
resolution:  -> rejected
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



[issue35202] Remove unused imports in standard library

2018-11-15 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

Change by Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
:


--
pull_requests: +9807

___
Python tracker 

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



[issue35250] Minor parameter documentation mismatch for turtle

2018-11-15 Thread Windson Yang


Windson Yang  added the comment:

Yes, you are right. A quick fix would change 'num' to 'btn' in parameters in
 
https://docs.python.org/3.3/library/turtle.html?highlight=turtle#turtle.onclick.
 I think they are the same thing. Do you want to create a patch?

--
nosy: +Windson Yang

___
Python tracker 

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



[issue30082] hide command prompt when using subprocess.Popen with shell=False on Windows

2018-11-15 Thread neel patel


neel patel  added the comment:

Can I work on this? I'm not sure of it's status, though.

--
nosy: +ohno

___
Python tracker 

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



[issue35262] There should be a list.get just like dict.get

2018-11-15 Thread Abram Clark


New submission from Abram Clark :

Just like with dictionaries, it is convenient to index lists without catching 
exceptions. Adding an import for this most basic functionality is slightly 
tedious, and I can't imagine it would break anything to add a list.get method.

--
messages: 329978
nosy: Abram Clark
priority: normal
severity: normal
status: open
title: There should be a list.get just like dict.get
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



[issue22121] IDLE should start with HOME as the initial working directory

2018-11-15 Thread Eryk Sun


Eryk Sun  added the comment:

> I am not sure what a 'post-installation script' means in practice.

IIRC, there's no way to prevent environment-variable expansion when shortcuts 
are created by an MSI, so the shortcuts need to be created or modified after 
installing IDLE. Perhaps this can be implemented in the MSI with a custom 
action. Or perhaps this can be implemented after installing the package via the 
OnExecutePackageComplete hook method in 
Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp.

> On the 'most recent' and alphabetical listings, one must right click,
> select 'more', and then 'open file location'.  One then gets a 
> directory of shortcuts, 

They're probably hiding the action to modify shortcuts since generally they're 
installed for all users in %ProgramData%, and modifying them requires 
administrator access.

> such as C:\Users\Terry\AppData\Roaming\Microsoft\Windows\Start 
> Menu\Programs\Python 3.7, which can be copied and edited.  

You shouldn't need to copy a shortcut in your own AppData. You can modify it 
directly.

--

___
Python tracker 

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



[issue22121] IDLE should start with HOME as the initial working directory

2018-11-15 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

On Windows 10, Start Menu entries are no longer shortcuts, but are titles of 
shortcuts.  On the 'most recent' and alphabetical listings, one must right 
click, select 'more', and then 'open file location'.  One then gets a directory 
of shortcuts, such as C:\Users\Terry\AppData\Roaming\Microsoft\Windows\Start 
Menu\Programs\Python 3.7, which can be copied and edited.  If one used 'Type 
here to search', right clicking immediately displays 'open file location'.

--

___
Python tracker 

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



[issue22121] IDLE should start with HOME as the initial working directory

2018-11-15 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

#28775 is about a user configuration setting.

I need to try out %HOMEDRIVE%%HOMEPATH%.

I am not sure what a 'post-installation script' means in practice.  What 
language, when run, by whom?

--
versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue28775] Option to set startup directory in IDLE

2018-11-15 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This is partially a duplicate of #22121, but that focused most on the default 
startup directory on Windows.

--

___
Python tracker 

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



[issue35261] readline.c: PyOS_InputHook not protected against SIGWINCH

2018-11-15 Thread STINNER Victor


STINNER Victor  added the comment:

You don't use properly ctypes. This issue is unrelated to signals. The fix is: 
HOOKFUNC = CFUNCTYPE(c_char_p,).

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



[issue35260] 2to3 Parse Error on Python 3 print() with arguments

2018-11-15 Thread batterystaple456


Change by batterystaple456 :


--
type: compile error -> behavior

___
Python tracker 

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



[issue35261] readline.c: PyOS_InputHook not protected against SIGWINCH

2018-11-15 Thread pmpp


pmpp  added the comment:

expected result would look like:

python3.6 -i -u -B pih.py
>>> Segmentation fault (core dumped)

--

___
Python tracker 

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



[issue35261] readline.c: PyOS_InputHook not protected against SIGWINCH

2018-11-15 Thread pmpp


pmpp  added the comment:

oops
 
use: python3 -i -u -B pih.py 
to run crash test

--

___
Python tracker 

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



[issue9056] Adding additional level of bookmarks and section numbers in python pdf documents.

2018-11-15 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
nosy: +cheryl.sabella, mdk
versions: +Python 3.8 -Python 3.3

___
Python tracker 

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



[issue35261] readline.c: PyOS_InputHook not protected against SIGWINCH

2018-11-15 Thread STINNER Victor


STINNER Victor  added the comment:

Can you please describe what happens and what is the expected behavior?

When I run "python3 pih.py", the script exits immediately and then a get many 
"kill: (5441) - No such process" errors in bash.

--
nosy: +vstinner

___
Python tracker 

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



[issue35261] readline.c: PyOS_InputHook not protected against SIGWINCH

2018-11-15 Thread pmpp


New submission from pmpp :

when using PyOS_InputHook from within readline module
two signals are to be handled SIGINT and SIGWINCH
SIGINT is really usefull in case hook has a problem though in some case it 
should be nice to prevent it too (async loop in repl background) 

but SIGWINCH is an annoyance and often lead to interpreter crash.

sample file:
 linux crash test under ubuntu bionic python 3.7.1 gcc7

more elaborated test case https://github.com/pmp-p/aioprompt

--
components: Extension Modules
files: pih.py
messages: 329969
nosy: pmpp
priority: normal
severity: normal
status: open
title: readline.c: PyOS_InputHook not protected against SIGWINCH
type: crash
versions: Python 3.7
Added file: https://bugs.python.org/file47935/pih.py

___
Python tracker 

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



[issue35256] The Console of Python 3.7.0.

2018-11-15 Thread Eric V. Smith


Eric V. Smith  added the comment:

Yes, this is as expected.

As I said, since this isn't a bug in Python, this is not the appropriate place 
to discuss your problem. I suggest python-tutors list, but there are many other 
places to learn about python global and local variables.

--
components:  -Tests

___
Python tracker 

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



[issue35256] The Console of Python 3.7.0.

2018-11-15 Thread Iuliana Netoi

Iuliana Netoi  added the comment:

Now I wrote the same list named my_list inside the function. And I deleted the 
function argument.When running again and again, the function remains as I 
defined it.
So the console behavior depends on the list placing: before or inside the 
function.
When the list is placed before the function and the function is called again 
and again, the console adds each time the element "z", enlarging the initial 
list.When the list is placed inside the function and the function is called 
again and again, the console does not add elements at all and the list remains 
as I defined it, so the initial one.

#%%def problem2_2():      my_list = ["this","is","my","very","first","list"]    
  my_list.append("z")      print(my_list)      #%%;;;
 Here is the output, with no change in my list:
In [1]: def problem2_2():   ...:       my_list = 
["this","is","my","very","first","list"]   ...:       my_list.append("z")   
...:       print(my_list)
In [2]: problem2_2()['this', 'is', 'my', 'very', 'first', 'list', 'z']
In [3]: problem2_2()['this', 'is', 'my', 'very', 'first', 'list', 'z']
In [4]: problem2_2()['this', 'is', 'my', 'very', 'first', 'list', 'z']
In [5]: problem2_2()['this', 'is', 'my', 'very', 'first', 'list', 'z']
In [6]:

On Thursday, November 15, 2018, 4:50:53 PM GMT+2, Steven D'Aprano 
 wrote:  

Steven D'Aprano  added the comment:

I don't understand what you think is the bug. You keep repeatedly appending 'z' 
to the same list. Why are you surprised that it appends 'z' more than once? If 
you don't want to append it twice, don't call the function twice.

Every time you call the function, it adds another 'z'. That's what the function 
does. It is working correctly.

Can you explain what you think is the bug, because it looks to me like it is 
working as intended.

--
nosy: +steven.daprano

___
Python tracker 

___

--

___
Python tracker 

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



[issue35260] 2to3 Parse Error on Python 3 print() with arguments

2018-11-15 Thread batterystaple456


New submission from batterystaple456 :

File a.py:


print("foo", end='bar') # ParseError


I think the error is caused by arguments in the Python 3 print() function (e.g. 
end, sep) that are not ignored by 2to3, and (possibly) treated like Python 2 
code.

Console stuff:

---
$ pip install 2to3
Requirement already satisfied: 2to3 in .\python37\lib\site-packages (1.0)

$ 2to3 .\a.py
...
RefactoringTool: Can't parse .\a.py: ParseError: bad input: type=22, value='=', 
context=('', (1, 16))
...
---

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 329966
nosy: batterystaple456
priority: normal
severity: normal
status: open
title: 2to3 Parse Error on Python 3 print() with arguments
type: compile error
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



[issue35253] Linker warning LNK4281

2018-11-15 Thread Jorge Ramos


Jorge Ramos  added the comment:

Ok, thanks! If it helps, here are all the modules that gave me that suggestion:

pythoncore.vcxproj
_testbuffer.vcxproj
_testcapi.vcxproj
_testimportmultiple.vcxproj
select.vcxproj
_overlapped.vcxproj
_elementtree.vcxproj
_decimal.vcxproj
unicodedata.vcxproj
_msi.vcxproj
_multiprocessing.vcxproj
_socket.vcxproj
_bz2.vcxproj
_ctypes.vcxproj
_sqlite3.vcxproj
python.vcxproj
pythonw.vcxproj

and it seems that the suggestions were repeated more than once for all of them.

--

___
Python tracker 

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



[issue35256] The Console of Python 3.7.0.

2018-11-15 Thread Eric V. Smith


Eric V. Smith  added the comment:

Agreed that this is a misunderstanding and not a bug.

iuliananet: you're modifying the same list each time you're calling 
problem2_2(). You might look for help on the python-tutors mailing list: 
https://mail.python.org/mailman/listinfo/tutor

--
nosy: +eric.smith
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



[issue35244] Allow to setup Clang as default compiler for modules build

2018-11-15 Thread Brett Cannon


Change by Brett Cannon :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue35253] Linker warning LNK4281

2018-11-15 Thread Brett Cannon


Brett Cannon  added the comment:

No, it's not a problem, just a potential enhancement.

--
nosy: +brett.cannon, paul.moore, steve.dower, tim.golden, zach.ware
type: compile error -> enhancement

___
Python tracker 

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



[issue35213] IDLE: use 'macOS' where appropriate.

2018-11-15 Thread miss-islington


miss-islington  added the comment:


New changeset be657c1fac3ce436976541cf2680a977217be813 by Miss Islington (bot) 
in branch '3.6':
bpo-35213: Where appropriate, use 'macOS' in idlelib. (GH-10478)
https://github.com/python/cpython/commit/be657c1fac3ce436976541cf2680a977217be813


--

___
Python tracker 

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



[issue35213] IDLE: use 'macOS' where appropriate.

2018-11-15 Thread miss-islington


miss-islington  added the comment:


New changeset 579c4175648f667d59954d48ada757621ff6d433 by Miss Islington (bot) 
in branch '3.7':
bpo-35213: Where appropriate, use 'macOS' in idlelib. (GH-10478)
https://github.com/python/cpython/commit/579c4175648f667d59954d48ada757621ff6d433


--
nosy: +miss-islington

___
Python tracker 

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



[issue12657] Cannot override JSON encoding of basic type subclasses

2018-11-15 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I'm working on a large patch which will include also the fix for this issue. 
This is a significant change and it can affect behavior and performance of 
existing code, so it can be made only in new version.

--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka
versions: +Python 3.8 -Python 2.7, Python 3.4

___
Python tracker 

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



[issue35259] Py_FinalizeEx unconditionally exists in Py_LIMITED_API

2018-11-15 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +martin.panter

___
Python tracker 

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



[issue12657] Cannot override JSON encoding of basic type subclasses

2018-11-15 Thread Éric Araujo

Éric Araujo  added the comment:

A modern solution for this is to define a singledispatch function (with 
implementations for your custom types) and pass it as the `default` parameter 
to the dump functions.

(That won’t avoid the custom → dict copy, but that’s how the module works)

--

___
Python tracker 

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



[issue35259] Py_FinalizeEx unconditionally exists in Py_LIMITED_API

2018-11-15 Thread Arthur Neufeld


New submission from Arthur Neufeld :

In application compiled with
  #define Py_LIMITED_API 0x0304
this method was used
  Py_FinalizeEx()

Tested application with:
  SET PATH=...;C:\Program Files\Python35
  APPLICATION.EXE


Result:
  Entry Point Not Found

  (X)  The procedure entry point Py_FinalizeEx could not be located
   in the dynamic link library
   C:\PATH\TO\APPLICATION.EXE


Expected Result:
  Application runs


Rebuilding, after replacing Py_FinalizeEx(void) with Py_Finalize(void):
  Application runs when pointing to 3.5 DLLs.


Suggested resolution:
  Declaration should be restricted to ABI 3.6+:

#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x0306
PyAPI_FUNC(int) Py_FinalizeEx(void);
#endif

--
components: Interpreter Core
messages: 329959
nosy: AJNeufeld
priority: normal
severity: normal
status: open
title: Py_FinalizeEx unconditionally exists in Py_LIMITED_API
type: crash
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



[issue35213] IDLE: use 'macOS' where appropriate.

2018-11-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9806

___
Python tracker 

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



[issue35213] IDLE: use 'macOS' where appropriate.

2018-11-15 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9805
stage: needs patch -> patch review

___
Python tracker 

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



[issue35213] IDLE: use 'macOS' where appropriate.

2018-11-15 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset b65413b497a07f521d835b799be7dd0afcedbd65 by Terry Jan Reedy in 
branch 'master':
bpo-35213: Where appropriate, use 'macOS' in idlelib. (#10478)
https://github.com/python/cpython/commit/b65413b497a07f521d835b799be7dd0afcedbd65


--

___
Python tracker 

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



[issue12657] Cannot override JSON encoding of basic type subclasses

2018-11-15 Thread Tom Brown


Tom Brown  added the comment:

I found this work-around useful https://stackoverflow.com/a/32782927

--
nosy: +Tom.Brown

___
Python tracker 

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



[issue35081] Move internal headers to Include/internal/

2018-11-15 Thread Alexey Izbyshev


Alexey Izbyshev  added the comment:

> Oh, I never saw this warning before. It seems to not be included in -Wall. 
> Would you mind to open a new issue to discuss it?

Victor, I've opened #35258 as you suggested.

--

___
Python tracker 

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



[issue35258] Consider enabling -Wmissing-prototypes

2018-11-15 Thread Alexey Izbyshev


New submission from Alexey Izbyshev :

This issue is a follow-up of msg329608 of #35081.

GCC and Clang have -Wmissing-prototypes[1] diagnostic that is reported if a 
global function is defined without a previous declaration containing a 
prototype. The reasons may be the following:

1) The header where it is declared is not included before the definition.
2) There is a declaration before the definition, but it doesn't contain a 
prototype (e.g., "int foo()").
3) There is no separate declaration of the function in the project at all.

(1) is undesirable because the compiler can't check that signatures of the 
declaration and the definition match. If they don't, subtle issues may occur 
when such function is called using a wrong declaration.

(2) is undesirable too because there is usually no reason to use declarations 
without prototypes. Often "int foo()" was meant to be "int foo(void)" -- these 
two have different meaning in C.

(3) may mean that either the function is unused (which is probably undesirable) 
or it was intentionally defined without a declaration. One case when the latter 
makes sense is plugin-like files which define initialization functions or 
similar external entry points. Those may be called via pointers obtained with 
dlsym() or have calls generated at compile time, like Modules/config.c in 
CPython.

It would be good to enable -Wmissing-prototypes to catch (1) and (2) -- such 
issues exist as of time of this report. However, (3) is a problem because of 
module initialization functions which would cause unwanted diagnostics.

There is no function attribute that could be put in PyMODINIT_FUNC macro to 
suppress the diagnostic for a single function. The general diagnostic 
suppression machinery (#pragma GCC diagnostic[2]) affects everything on the 
following lines, and while the state can be saved and restored via "#pragma GCC 
diagnostic push/pop", we'd either need another macro to restore the state after 
the end of module initializer definitions or require that initializers always 
come last in the file.

A workaround is to declare the initializer inside PyMODINIT_FUNC (or a new 
macro). For example (omitting platform-specific parts of PyMODINIT_FUNC):

#define PyMODINIT_FUNC(name) \
extern PyObject *name(void); \
PyObject *name(void)

PyMODINIT_FUNC(PyInit_time)
{
  ...
}

I've also noticed that PyMODINIT_FUNC is used for functions with a different 
signature in Modules/_testmultiphase.c, so either another macro would be needed 
for that, or a general macro accepting a prototype as its variadic parameter 
could be added.

Even if it's deemed infeasible to enable -Wmissing-prototypes by default,
developers may find it useful to ensure that the diagnostic is reported only 
for files in Modules directory.

[1] https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
[2] https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html

--
components: Build
messages: 329954
nosy: izbyshev, vstinner
priority: normal
severity: normal
status: open
title: Consider enabling -Wmissing-prototypes
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



[issue35256] The Console of Python 3.7.0.

2018-11-15 Thread Shane


Shane  added the comment:

I suspect the author simply does not realize lists are mutable in Python.

--
nosy: +Shane Smith

___
Python tracker 

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



[issue35257] Add LDFLAGS_NODIST for the LDFLAGS not intended for propagation to C extensions.

2018-11-15 Thread Charalampos Stratakis


Charalampos Stratakis  added the comment:

Correction: The second commit is referring to 
https://github.com/python/cpython/pull/9908/

--

___
Python tracker 

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



[issue35257] Add LDFLAGS_NODIST for the LDFLAGS not intended for propagation to C extensions.

2018-11-15 Thread Charalampos Stratakis


New submission from Charalampos Stratakis :

Through acb8c5234302f8057b331abaafb2cc8697daf58f the CFLAGS_NODIST variable was 
created, in order to place there compiler flags used by the interpreter, but 
not intended to be propagated to C extensions.

I saw a similar issue when working on backporting 
67e997bcfdac55191033d57a16d1408aL1313 on python 3.6, where the -flto flag 
should be passed to CFLAGS_NODIST instead of BASECFLAGS, however even if that 
is fixed, the LDFLAGS will still be propagated to C extensions.

Thus in order to provide more flexibility in that regard, I propose to add the 
LDFLAGS_NODIST variable, which in a similar vein as CFLAGS_NODIST, will hold 
the LDFLAGS intended to be used only by the interpreter.

Thoughts or comments on this approach?

--
components: Build, Distutils, Extension Modules
messages: 329951
nosy: cstratak, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: Add LDFLAGS_NODIST for the LDFLAGS not intended for propagation to C 
extensions.
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



[issue35256] The Console of Python 3.7.0.

2018-11-15 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

I don't understand what you think is the bug. You keep repeatedly appending 'z' 
to the same list. Why are you surprised that it appends 'z' more than once? If 
you don't want to append it twice, don't call the function twice.

Every time you call the function, it adds another 'z'. That's what the function 
does. It is working correctly.

Can you explain what you think is the bug, because it looks to me like it is 
working as intended.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue35214] Get the test suite passing with clang Memory Sanitizer enabled

2018-11-15 Thread Alexey Izbyshev


Change by Alexey Izbyshev :


--
nosy: +izbyshev

___
Python tracker 

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



[issue31146] Docs: On non-public translations, language picker fallback to "English"

2018-11-15 Thread Julien Palard


Change by Julien Palard :


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

___
Python tracker 

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



[issue35256] The Console of Python 3.7.0.

2018-11-15 Thread Iuliana Netoi


Change by Iuliana Netoi :


--
type:  -> behavior
Added file: 
https://bugs.python.org/file47934/tema_2-2-PT-PYTHON--TRACKER-text.txt

___
Python tracker 

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



[issue35256] The Console of Python 3.7.0.

2018-11-15 Thread Iuliana Netoi


New submission from Iuliana Netoi :

While running a function that uses a list to which I append the element "z", 
the Console modifies my code by adding "z" to the list each time I consequently 
run the function. 

Is that a bug?

My function written in the Editor of Python 3.7.0. is the following:

#%%
my_list = ["this","is","my","very","first","list"]
def problem2_2(my_list):
  my_list.append("z")
  print(my_list)  
#%%

I click the "Run" icon in the Menu. Then I type problem2_2(my_list) in the 
CONSOLE.

At the first execution it is ok. 
But when executing right again, the console adds another element "z" to my 
list. And so on, for each next execution - as if the Console modifies my code. 

(Anyway when reverting to the Editor, click inside the cell, and then "Run" 
icon in the Menu, only after the first execution it is printed the right number 
of elements)

There is the Console executions:

mmy_list = ["this","is","my","very","first","list"]
def problem2_2(my_list):
  my_list.append("z")
  print(my_list)

problem2_2(my_list)
['this', 'is', 'my', 'very', 'first', 'list', 'z']

problem2_2(my_list)
['this', 'is', 'my', 'very', 'first', 'list', 'z', 'z']

problem2_2(my_list)
['this', 'is', 'my', 'very', 'first', 'list', 'z', 'z', 'z']

problem2_2(my_list)
['this', 'is', 'my', 'very', 'first', 'list', 'z', 'z', 'z', 'z']

--
components: Tests
messages: 329949
nosy: iuliananet
priority: normal
severity: normal
status: open
title: The Console of Python 3.7.0.
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



[issue35255] delete "How do I extract the downloaded documentation" section in Windows FAQ

2018-11-15 Thread Mathieu Dupuy


Change by Mathieu Dupuy :


--
pull_requests: +9802

___
Python tracker 

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



[issue35242] multiprocessing.Queue in an inconsistent state and a traceback silently suppressed if put an unpickable object and process's target function is finished

2018-11-15 Thread Sergei Zobov


Change by Sergei Zobov :


--
nosy: +pitrou

___
Python tracker 

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



[issue35255] delete "How do I extract the downloaded documentation" section in Windows FAQ

2018-11-15 Thread Mathieu Dupuy


Change by Mathieu Dupuy :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
type:  -> enhancement

___
Python tracker 

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



[issue35255] delete "How do I extract the downloaded documentation" section in Windows FAQ

2018-11-15 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue35255] delete "How do I extract the downloaded documentation" section in Windows FAQ

2018-11-15 Thread Mathieu Dupuy


New submission from Mathieu Dupuy :

I think it's been a long time since Windows/IE no longer mess up with file 
extensions, so long I can't recall anymore. I just tried on a Windows 7 + IE 11 
(released in 2013) to download the .tar.bz2 archive from docs.python.org and it 
worked alright.


To me, that entry makes Python looks bad ("the archive format we use does not 
work correctly on the most common, main desktop platform"), the problem seems 
to not exist anymore, and IMHO, is not really Python related.

I think that entry should be removed.

--
messages: 329947
nosy: deronnax
priority: normal
severity: normal
status: open
title: delete "How do I extract the downloaded documentation" section in 
Windows FAQ

___
Python tracker 

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



[issue35242] multiprocessing.Queue in an inconsistent state and a traceback silently suppressed if put an unpickable object and process's target function is finished

2018-11-15 Thread Sergei Zobov


Sergei Zobov  added the comment:

I've decided to make the test more clean, so I added `time.sleep` and now we 
can be sure that here is enough time for queue's underlying process to 
synchronize all variables:
https://github.com/szobov/cpython/compare/master...regression-test-on-multiprocessing-queue-feeder-ignore-exception

It shows that sometimes `Queue._sem` will never be decreased.
https://github.com/szobov/cpython/blob/master/Lib/multiprocessing/queues.py#L266
If it's undesirable behavior, would it be better to ignore this lines: 
https://github.com/szobov/cpython/blob/master/Lib/multiprocessing/queues.py#L257-L259
 ?

But in my thoughts the problem is in the functions `util._exit_function` and 
`util.is_exiting`. It's look like that `Queue._thread` share the same variable 
`util._exiting` with the process that started this thread. If you'll try to 
print it you see that when function `util._exit_function` executed for process 
it changes the value of `util._exiting` flag to `True` and after, from 
`Queue._thread`, the value for this flag stay `True`. But it's the daemon 
process and it should still work, isn't it? Or I'm missing something important 
here.

--

___
Python tracker 

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