[RELEASE] Python 2.7.18 release candidate 1

2020-04-06 Thread Benjamin Peterson
Greetings, 2.7.18 release candidate 1, a testing release for the last release of the Python 2.7 series, is now available for download. The CPython core developers stopped applying routine bugfixes to the 2.7 branch on January 1. 2.7.18 will includes fixes that were Downloads are at:

[issue40166] UNICODE HOWTO: Change the total number of code points in the introduction section

2020-04-06 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +18767 pull_request: https://github.com/python/cpython/pull/19406 ___ Python tracker

[issue40166] UNICODE HOWTO: Change the total number of code points in the introduction section

2020-04-06 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset 8ea10a94463f1ea217bcaef86f2ebd9d43240b4e by amaajemyfren in branch 'master': closes bpo-40166: Change Unicode Howto so that it does not have a specific number of assigned code points. (GH-19328)

[issue39943] Meta: Clean up various issues in C internals

2020-04-06 Thread Andy Lester
Change by Andy Lester : -- pull_requests: +18766 pull_request: https://github.com/python/cpython/pull/19405 ___ Python tracker ___

[issue40214] test_ctypes.test_load_dll_with_flags Windows failure

2020-04-06 Thread Kyle Stanley
New submission from Kyle Stanley : In several recent PRs, test_ctypes.test_load_dll_with_flags is failing for the Azure Pipelines "Windows PR tests win32" and "Windows PR tests win64" with the following error message: ``` ==

Re: print small DataFrame to STDOUT and read it back into dataframe

2020-04-06 Thread Luca
On 4/6/2020 8:51 PM, Reto wrote: out = df.to_csv(None) new = pd.read_csv(io.StringIO(out), index_col=0) Thank you, brother. It works -- https://mail.python.org/mailman/listinfo/python-list

[issue26903] ProcessPoolExecutor(max_workers=64) crashes on Windows

2020-04-06 Thread Mike Hommey
Mike Hommey added the comment: This is still a problem in python 3.7 (and, I guess 3.8). When not even giving a max_workers, it fails with a ValueError exception on _winapi.WaitForMultipleObjects, with the message "need at most 63 handles, got a sequence of length 63" That happens with

[issue40213] contextlib.aclosing()

2020-04-06 Thread Nathaniel Smith
Change by Nathaniel Smith : -- nosy: +ncoghlan, yselivanov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40213] contextlib.aclosing()

2020-04-06 Thread John Belmonte
New submission from John Belmonte : Please add aclosing() to contextlib, the async equivalent of closing(). It's needed to ensure deterministic call of aclose() on the resource object at block exit. It's been available in the async_generator module for some time. However that module is

[issue40212] Re-enable posix_fallocate and posix_fadvise on AIX

2020-04-06 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- nosy: +Michael.Felt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40212] Re-enable posix_fallocate and posix_fadvise on AIX

2020-04-06 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- keywords: +patch pull_requests: +18765 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19403 ___ Python tracker ___

[issue40212] Re-enable posix_fallocate and posix_fadvise on AIX

2020-04-06 Thread Batuhan Taskaya
New submission from Batuhan Taskaya : fallocate and fadvise was problematic in AIX because of a bug that presents at the time of 2014, which looks like resolved in 2016. I think we can safely re-enable those functions back. I've tested this patch on AIX 7.2 and it works, this patch will also

[issue40060] socket.TCP_NOTSENT_LOWAT is missing in official macOS builds

2020-04-06 Thread Dima Tisnek
Change by Dima Tisnek : -- keywords: +patch pull_requests: +18764 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19402 ___ Python tracker ___

Re: print small DataFrame to STDOUT and read it back into dataframe

2020-04-06 Thread Reto
On Mon, Apr 06, 2020 at 06:29:01PM -0400, Luca wrote: > so, given a dataframe, how do I make it print itself out as CSV? read the docs of to_csv... > And given CSV data in my clipboard, how do I paste it into a Jupiter cell > (possibly along with a line or two of code) that will create a

[issue40060] socket.TCP_NOTSENT_LOWAT is missing in official macOS builds

2020-04-06 Thread Dima Tisnek
Dima Tisnek added the comment: Thank you for the explanation, Ronald. `socket.TCP_NOTSENT_LOWAT` is just a constant though, to be passed to `setsockopt`. What do you think of `ifndef ... define ...` work-around, akin to a few other constants in socket module?

[issue34951] cookielib/cookiejar cookies' Expires date parse fails with long month names

2020-04-06 Thread Liubomyr Popil
Liubomyr Popil added the comment: Hello, I found this issue as most related to problem I was discovered: a long name of day doesn't parsed. According to https://tools.ietf.org/html/rfc2616#section-3.3.1: Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123 Sunday,

Re: Multiprocessing queue sharing and python3.8

2020-04-06 Thread Israel Brewster
> On Apr 6, 2020, at 12:19 PM, David Raymond wrote: > > Attempting reply as much for my own understanding. > > Are you on Mac? I think this is the pertinent bit for you: > Changed in version 3.8: On macOS, the spawn start method is now the default. > The fork start method should be considered

[issue39562] Asynchronous comprehensions don't work in asyncio REPL

2020-04-06 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: #define IS_COMPILER_FLAG_ENABLED(c, flag) printf("%s: %d\n", #flag, c->c_flags->cf_flags & flag) > If CO_FUTURE_DIVISION conflicts with PyCF_ALLOW_TOP_LEVEL_AWAIT, does not > CO_ITERABLE_COROUTINE conflict with PyCF_SOURCE_IS_UTF8 and > CO_ASYNC_GENERATOR

Re: print small DataFrame to STDOUT and read it back into dataframe

2020-04-06 Thread Luca
On 4/6/2020 3:03 PM, Christian Gollwitzer wrote: CSV is the most sensible option here. It is widely supported by spreadsheets etc. and easily copy/pasteable. Thank you Christian. so, given a dataframe, how do I make it print itself out as CSV? And given CSV data in my clipboard, how do

[issue40211] Clarify preadv and pwritev is supported AIX 7.1 and newer.

2020-04-06 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- keywords: +patch pull_requests: +18762 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19401 ___ Python tracker ___

[issue40211] Clarify preadv and pwritev is supported AIX 7.1 and newer.

2020-04-06 Thread Batuhan Taskaya
New submission from Batuhan Taskaya : preadv and pwritev are supported on AIX 7.1 and newer, it would be good to clarify this in the documentation. -- assignee: docs@python components: Documentation messages: 365880 nosy: BTaskaya, docs@python, pablogsal priority: normal severity:

[issue36753] Python modules not linking to libpython causes issues for RTLD_LOCAL system-wide

2020-04-06 Thread Joshua Merchant
Change by Joshua Merchant : -- nosy: +Joshua Merchant ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: Multiprocessing queue sharing and python3.8

2020-04-06 Thread Israel Brewster
> On Apr 6, 2020, at 12:27 PM, David Raymond wrote: > > Looks like this will get what you need. > > > def some_complex_function(x): >global q >#stuff using q > > def pool_init(q2): >global q >q = q2 > > def main(): >#initalize the Queue >mp_comm_queue = mp.Queue() >

[issue40082] Assertion failure in trip_signal

2020-04-06 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40082] Assertion failure in trip_signal

2020-04-06 Thread neonene
neonene added the comment: On Windows, PyGILState_GetThisThreadState() returns NULL when ^C-interrupt occurs. It is from TlsGetValue() winAPI and I don't think the os's behevior is wrong. In trip_signal(), crash can be avoided by skipping PyEval_SignalReceived() if tstate is invalid. But

RE: Multiprocessing queue sharing and python3.8

2020-04-06 Thread David Raymond
Looks like this will get what you need. def some_complex_function(x): global q #stuff using q def pool_init(q2): global q q = q2 def main(): #initalize the Queue mp_comm_queue = mp.Queue() #Set up a pool to process a bunch of stuff in parallel pool =

RE: Multiprocessing queue sharing and python3.8

2020-04-06 Thread David Raymond
Attempting reply as much for my own understanding. Are you on Mac? I think this is the pertinent bit for you: Changed in version 3.8: On macOS, the spawn start method is now the default. The fork start method should be considered unsafe as it can lead to crashes of the subprocess. See

[issue40210] ttk.Combobox focus-out event inheritage

2020-04-06 Thread Nikolai Ehrhardt
New submission from Nikolai Ehrhardt : Hi Guys, I'm spawning entry fields in a treeview to make values editable while runtime, my codepiece: the edit method is bind to left click: def edit(self, event): region = self.identify_region(event.x, event.y) if region == 'cell':

[issue40209] read_pyfile function refactor in Lib/test/test_unparse.py

2020-04-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You can just use open() in binary mode. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration

2020-04-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Maybe copy the code for deprecated and removed features to Doc/tools/extensions? -- nosy: +serhiy.storchaka ___ Python tracker ___

Re: print small DataFrame to STDOUT and read it back into dataframe

2020-04-06 Thread Christian Gollwitzer
Am 06.04.20 um 17:17 schrieb Luca: On 4/6/2020 4:08 AM, Reto wrote: Does this help? Thank you, but not really. What I am trying to achieve is to have a way to copy and paste small yet complete dataframes (which may be the result of previous calculations) between a document (TXT, Word,

Introduction to PyLiveUpdate: A runtime python code manipulation framework

2020-04-06 Thread 0xcc
Hi everyone, I would like to introduce PyLiveUpdate (https://github.com/devopspp/pyliveupdate), a tool that helps you modify your running python code without stopping and restarting it. This is helpful when you want to add some code (like print for debug) or modify a function definition

[issue40209] read_pyfile function refactor in Lib/test/test_unparse.py

2020-04-06 Thread Hakan
Change by Hakan : -- keywords: +patch pull_requests: +18761 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19399 ___ Python tracker ___

[issue40209] read_pyfile function refactor in Lib/test/test_unparse.py

2020-04-06 Thread Hakan
New submission from Hakan : The read_pyfile function can be written more effectively with the open function in the tokenize module. -- components: Tests messages: 365875 nosy: hakancelik priority: normal severity: normal status: open title: read_pyfile function refactor in

[issue35212] Expressions with format specifiers in f-strings give wrong code position in AST

2020-04-06 Thread yang
Change by yang : -- keywords: +patch nosy: +fhsxfhsx nosy_count: 2.0 -> 3.0 pull_requests: +18760 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19398 ___ Python tracker

[issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration

2020-04-06 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 8.0 -> 9.0 pull_requests: +18759 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19397 ___ Python tracker

Multiprocessing queue sharing and python3.8

2020-04-06 Thread Israel Brewster
Under python 3.7 (and all previous versions I have used), the following code works properly, and produces the expected output: import multiprocessing as mp mp_comm_queue = None #Will be initalized in the main function mp_comm_queue2=mp.Queue() #Test pre-initalized as well def

[issue40208] Remove deprecated SymbolTable.has_exec

2020-04-06 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- keywords: +patch pull_requests: +18758 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19396 ___ Python tracker ___

[issue40208] Remove deprecated SymbolTable.has_exec

2020-04-06 Thread Batuhan Taskaya
New submission from Batuhan Taskaya : SymbolTable's has_exec method deprecated 14 years ago (2006) with 2def557aba1aaa42b638f9bf95624b7e6929191c, it can be safely removed since there is no user of it. -- components: Library (Lib) messages: 365874 nosy: BTaskaya priority: normal

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2020-04-06 Thread STINNER Victor
STINNER Victor added the comment: > Just checked - seems to be SPECIFIC to xlc-v16 as neither xlv-v11 nor xlc-v13 > have any issues building. That sounds like an AIX specific issue. Please open a separated issue. -- ___ Python tracker

[issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration

2020-04-06 Thread STINNER Victor
STINNER Victor added the comment: It sounds dangerous to not pin the Sphinx version in our CI :-/ Another issue caused by CI configuration stored at the same place than the code: https://mail.python.org/archives/list/python-committ...@python.org/thread/WEU5CQKIA4LIHWHT53YA7HHNUY5H2FUT/

[issue40196] symtable.Symbol.is_local() can be True for global symbols

2020-04-06 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue40196] symtable.Symbol.is_local() can be True for global symbols

2020-04-06 Thread miss-islington
miss-islington added the comment: New changeset 717f1668b3455b498424577e194719f9beae13a1 by Miss Islington (bot) in branch '3.7': bpo-40196: Fix a bug in the symtable when reporting inspecting global variables (GH-19391)

[issue40196] symtable.Symbol.is_local() can be True for global symbols

2020-04-06 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 8bd84e7f79a6cc7670a89a92edba3015aa781758 by Miss Islington (bot) in branch '3.8': bpo-40196: Fix a bug in the symtable when reporting inspecting global variables (GH-19391) (GH-19394)

[issue40206] Multiplying 4.6*100 will result in 459.99999999999994

2020-04-06 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: @Steven Yes that's true, I only meant that in the context of the issue where only the multiplication is used. FWIW Fraction also would have issues with e.g. trigonometric functions right? @ahmad, that's because you did Decimal(4.6) which first parse 4.6 as a

[issue40196] symtable.Symbol.is_local() can be True for global symbols

2020-04-06 Thread miss-islington
Change by miss-islington : -- pull_requests: +18757 pull_request: https://github.com/python/cpython/pull/19395 ___ Python tracker ___

[issue40196] symtable.Symbol.is_local() can be True for global symbols

2020-04-06 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +18756 pull_request: https://github.com/python/cpython/pull/19394 ___ Python tracker

[issue40196] symtable.Symbol.is_local() can be True for global symbols

2020-04-06 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 799d7d61a91eb0ad3256ef9a45a90029cef93b7c by Pablo Galindo in branch 'master': bpo-40196: Fix a bug in the symtable when reporting inspecting global variables (GH-19391)

[issue40206] Multiplying 4.6*100 will result in 459.99999999999994

2020-04-06 Thread ahmad dana
ahmad dana added the comment: Regarding the comment about the decimal point precision , and solving the issue with the decimal library, the following attachment shows you that the decimal Library did exactly the same behaviour -- Added file: https://bugs.python.org/file49040/Screen

[issue40207] Expose NCURSES_EXT_FUNCS under curses

2020-04-06 Thread Batuhan Taskaya
Change by Batuhan Taskaya : -- keywords: +patch pull_requests: +18755 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19392 ___ Python tracker ___

[issue40207] Expose NCURSES_EXT_FUNCS under curses

2020-04-06 Thread Batuhan Taskaya
New submission from Batuhan Taskaya : NCURSES_EXT_FUNCS defines the extension version number which is needed to determine if certain functions exist or not. -- components: Library (Lib) messages: 365866 nosy: BTaskaya priority: normal severity: normal status: open title: Expose

[issue40206] Multiplying 4.6*100 will result in 459.99999999999994

2020-04-06 Thread Steven D'Aprano
Steven D'Aprano added the comment: Rémi, it is not true that the Decimal module won't lose precision. It will. Decimal is not exact either, it is still a floating point format similar to float. py> Decimal(1)/3*3 Decimal('0.') The two major advantages of Decimal

[issue40206] Multiplying 4.6*100 will result in 459.99999999999994

2020-04-06 Thread Eric V. Smith
Eric V. Smith added the comment: See https://docs.python.org/3.8/tutorial/floatingpoint.html -- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2020-04-06 Thread STINNER Victor
STINNER Victor added the comment: > It should use PyType_GetSlot() Oh. It seems like currently, PyType_GetSlot() can only be used on a heap allocated types :-( The function starts with: if (!PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE) || slot < 0) { PyErr_BadInternalCall();

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2020-04-06 Thread STINNER Victor
STINNER Victor added the comment: Py_TRASHCAN_BEGIN() access directly PyTypeObject.tp_dealloc: #define Py_TRASHCAN_BEGIN(op, dealloc) \ Py_TRASHCAN_BEGIN_CONDITION(op, \ Py_TYPE(op)->tp_dealloc == (destructor)(dealloc)) It should use PyType_GetSlot() or a new getter function (to

[issue40206] Multiplying 4.6*100 will result in 459.99999999999994

2020-04-06 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi ahmad, calculation with floating points in Python uses the IEE 754 (https://fr.wikipedia.org/wiki/IEEE_754) standard and will result in such quirks. If you want to not loose precision you can use the decimal module: >>> from decimal import Decimal >>>

Re: print small DataFrame to STDOUT and read it back into dataframe

2020-04-06 Thread Luca
On 4/6/2020 4:08 AM, Reto wrote: Does this help? Thank you, but not really. What I am trying to achieve is to have a way to copy and paste small yet complete dataframes (which may be the result of previous calculations) between a document (TXT, Word, GoogleDoc) and Jupiter/IPython. Did I

[issue40206] Multiplying 4.6*100 will result in 459.99999999999994

2020-04-06 Thread ahmad dana
New submission from ahmad dana : While we using python3.7 to do some number multiplication, we faced an issue with multiplying 4.6*100 which lead to strange output, the result was 459.94, while it should be something like 460.00 -- messages: 365860 nosy: ahmad dana

[RELEASE] Python 2.7.18 release candidate 1

2020-04-06 Thread Benjamin Peterson
Greetings, 2.7.18 release candidate 1, a testing release for the last release of the Python 2.7 series, is now available for download. The CPython core developers stopped applying routine bugfixes to the 2.7 branch on January 1. 2.7.18 will includes fixes that were made between the release of

[RELEASE] Python 2.7.18 release candidate 1

2020-04-06 Thread Benjamin Peterson
Greetings, 2.7.18 release candidate 1, a testing release for the last release of the Python 2.7 series, is now available for download. The CPython core developers stopped applying routine bugfixes to the 2.7 branch on January 1. 2.7.18 will includes fixes that were made between the release of

[issue40205] Profile 'builtins' parameter documentation missing

2020-04-06 Thread Bar Harel
New submission from Bar Harel : Profile and cProfile's documentation does not say anything about the builtins parameter. Also, it exists only on cProfile, which means Profile is not a drop-in replacement. Lastly, enable() method, that exists on cProfile, also accepts params, and are

[issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration

2020-04-06 Thread Karthikeyan Singaravelan
New submission from Karthikeyan Singaravelan : The following error is caused in Docs build for a 3.8 backport since sphinx is ran with warnings. Sphinx released 3.0 on April 6. The last successful build on master uses Sphinx 2.2.0 [0]. My guess is sphinx new version possibly breaking the

[issue40203] Warn about invalid PYTHONUSERBASE

2020-04-06 Thread Volker Weißmann
Volker Weißmann added the comment: Forget the thing I said about "invalid//path", but my argument still stands for non existing paths or paths to something else than a directory. -- ___ Python tracker

[issue40188] Azure Pipelines jobs failing randomly with: Unable to connect to azure.archive.ubuntu.com

2020-04-06 Thread Steve Dower
Steve Dower added the comment: I wonder why the "install wamerican" didn't go into the script? It should at least get the same options as in the script to make sure it doesn't break the install. Maybe we should make our own mirror of Ubuntu so that we don't have to depend on a massive

[issue40188] Azure Pipelines jobs failing randomly with: Unable to connect to azure.archive.ubuntu.com

2020-04-06 Thread Steve Dower
Change by Steve Dower : -- pull_requests: -18743 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue40196] symtable.Symbol.is_local() can be True for global symbols

2020-04-06 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > In symtable.Function.get_locals() symbols with scopes in (LOCAL, CELL) are > selected. Thanks for pointing that out. I will simplify PR 19391. -- ___ Python tracker

[issue40196] symtable.Symbol.is_local() can be True for global symbols

2020-04-06 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- Removed message: https://bugs.python.org/msg365854 ___ Python tracker ___ ___ Python-bugs-list

[issue40196] symtable.Symbol.is_local() can be True for global symbols

2020-04-06 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I prefer to explicitly check for absence of the global scope as in PR 19391 -- ___ Python tracker ___

Roundup issue tracker 2.0.0beta0 release

2020-04-06 Thread John P. Rouillard
Hello All: I'm proud to release version 2.0.0beta0 of the Roundup issue tracker which has been possible due to the help of several contributors. This release contains some major changes, so make sure to read `docs/upgrading.txt `_ to bring

[issue40196] symtable.Symbol.is_local() can be True for global symbols

2020-04-06 Thread Wolfgang Stöcher
Wolfgang Stöcher added the comment: In symtable.Function.get_locals() symbols with scopes in (LOCAL, CELL) are selected. Also >>> code = """\ ... def foo(): ...x = 42 ...def bar(): ... return x ... """ >>> import symtable >>> top = symtable.symtable(code, "?", "exec") >>>

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2020-04-06 Thread Michael Felt
Michael Felt added the comment: Just checked - seems to be SPECIFIC to xlc-v16 as neither xlv-v11 nor xlc-v13 have any issues building. -- ___ Python tracker ___

[issue40203] Warn about invalid PYTHONUSERBASE

2020-04-06 Thread Volker Weißmann
New submission from Volker Weißmann : https://docs.python.org/2/using/cmdline.html says that PYTHONUSERBASE defines the user base directory. If I understand this correctly, this implies that PYTHONUSERBASE should be a path a directory. I therefore think that python should print a warning if

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2020-04-06 Thread Michael Felt
Michael Felt added the comment: Just manually verified that PR19377, when compiled against xlc - crashes during make: rm -f libpython3.9d.a ar rcs libpython3.9d.a Modules/getbuildinfo.o Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o Parser/parser.o

[issue40060] socket.TCP_NOTSENT_LOWAT is missing in official macOS builds

2020-04-06 Thread Ronald Oussoren
Ronald Oussoren added the comment: AFAIK the macOS builds are still build on the oldest macOS release supported by the installer (that is, a macOS 10.9 system). This means the build won't use macOS APIs introduced in macOS 10.10 or later. It would be nice to build the installer using

[issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API

2020-04-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset 38aefc585f60a77d66f4fbe5a37594a488b53474 by Victor Stinner in branch 'master': bpo-40170: PyObject_GET_WEAKREFS_LISTPTR() becomes a function (GH-19377) https://github.com/python/cpython/commit/38aefc585f60a77d66f4fbe5a37594a488b53474

[issue40060] socket.TCP_NOTSENT_LOWAT is missing in official macOS builds

2020-04-06 Thread Dima Tisnek
Dima Tisnek added the comment: +macos team, because I can't for the life of me figure out how official builds are made ☹️ In short: my local build has socket.TCP_NOTSENT_LOWAT but the official build does not. -- nosy: +ned.deily, ronaldoussoren

[issue40173] test.support.import_fresh_module fails to correctly block submodules when fresh is specified

2020-04-06 Thread hai shi
hai shi added the comment: > I *think* the problem is that in the step where _save_and_remove_module is > called on fresh_name (see here: > https://github.com/python/cpython/blob/76db37b1d37a9daadd9e5b320f2d5a53cd1352ec/Lib/test/support/__init__.py#L328-L329) Looks like deleting a module

[issue40173] test.support.import_fresh_module fails to correctly block submodules when fresh is specified

2020-04-06 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +18754 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19390 ___ Python tracker ___

[issue40196] symtable.Symbol.is_local() can be True for global symbols

2020-04-06 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- Removed message: https://bugs.python.org/msg365843 ___ Python tracker ___ ___ Python-bugs-list

[issue40196] symtable.Symbol.is_local() can be True for global symbols

2020-04-06 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: That fix is not correct. For instance consider: >>> code2 = """\ ... def foo(): ...x = 42 ...def bar(): ... return -1 ... """ >>> top.get_children()[0] >>> top = symtable.symtable(code2, "?", "exec") >>>

[issue40196] symtable.Symbol.is_local() can be True for global symbols

2020-04-06 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +18753 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19391 ___ Python tracker

[issue40202] Misleading grammatically of ValueError Message?

2020-04-06 Thread Steven D'Aprano
Steven D'Aprano added the comment: I think the error messages could be improved. In the first example: `f,x, a, b = [1,2,3]` you are unpacking three values, but you need to unpack 4. The error message is not very helpful: 5 values is "more than 3" but it would be too many, you need not

[issue40196] symtable.Symbol.is_local() can be True for global symbols

2020-04-06 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: >>> code2 = """\ ... def foo(): ...x = 42 ...def bar(): ... return -1 ... """ >>> top.get_children()[0] >>> top = symtable.symtable(code2, "?", "exec") >>> top.get_children()[0].lookup('x')._Symbol__scope == symtable.LOCAL True but if we

Re: Exceptions versus Windows ERRORLEVEL

2020-04-06 Thread Stephen Tucker
Thanks, Eryk - this is very helpful. Stephen. On Mon, Apr 6, 2020 at 6:43 AM Eryk Sun wrote: > On 4/3/20, Stephen Tucker wrote: > > > > Does an exception raised by a Python 3.x program on a Windows machine set > > ERRORLEVEL? > > ERRORLEVEL is an internal state of the CMD shell. It has

Re: Decorator with parameters

2020-04-06 Thread Chris Angelico
On Mon, Apr 6, 2020 at 6:36 PM ast wrote: > > Hello > > I wrote a decorator to add a cache to functions. > I realized that cache dictionnary could be defined > as an object attribute or as a local variable in > method __call__. > Both seems to work properly. > Can you see any differences between

Decorator with parameters

2020-04-06 Thread ast
Hello I wrote a decorator to add a cache to functions. I realized that cache dictionnary could be defined as an object attribute or as a local variable in method __call__. Both seems to work properly. Can you see any differences between the two variants ? from collection import OrderedDict

[issue40196] symtable.Symbol.is_local() can be True for global symbols

2020-04-06 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- assignee: -> pablogsal nosy: +pablogsal ___ Python tracker ___ ___ Python-bugs-list mailing

Re: print small DataFrame to STDOUT and read it back into dataframe

2020-04-06 Thread Reto
On Sat, Apr 04, 2020 at 07:00:23PM -0400, Luca wrote: > dframe.to_string > > gives: > > 0 a0 b0 c0 d0 > 1 a1 b1 c1 d1 > 2 a2 b2 c2 d2 > 3 a3 b3 c3 d3> That's not the output of to_string. to_string is a method, not an attribute which is apparent by the > comment in your

[issue40202] Misleading grammatically of ValueError Message?

2020-04-06 Thread Jacob RR
New submission from Jacob RR : hi, so I *think* that ValueError shows an error grammatically incorrect? In python 2.7 >>> x = [1,2,3] >>> f,x, a, b = [1,2,3] Traceback (most recent call last): File "", line 1, in ValueError: need more than 3 values to unpack Should have said: Received 3

[issue40147] Move checking for duplicated keywords to the compiler

2020-04-06 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 08050e959e6c40839cd2c9e5f6a4fd1513e3d605 by Zackery Spytz in branch 'master': bpo-40147: Fix a compiler warning on Windows in Python/compile.c (GH-19389) https://github.com/python/cpython/commit/08050e959e6c40839cd2c9e5f6a4fd1513e3d605

Re: Is there a difference between python

2020-04-06 Thread Eryk Sun
On 4/5/20, Malcolm Greene wrote: > Is there a difference between the following 2 ways to launch a console-less > script under Windows? > > python

[issue34972] json dump silently converts int keys to string

2020-04-06 Thread Stuart Bishop
Stuart Bishop added the comment: (sorry, my example is normal Python behavior. {1:1, 1.0:2} == {1:2} , {1.0:1} == {1:1} ) -- nosy: +stub ___ Python tracker ___

[issue40197] Add nanoseconds to timing table in What's new python 3.8

2020-04-06 Thread Morten Hels
Morten Hels added the comment: It turns out I was wrong about microseconds. The output in https://bugs.python.org/issue35884 does show microseconds, but the output is before this commit https://github.com/python/cpython/commit/9da3583e78603a81b1839e17a420079f734a75b0 that fixes a typo

[issue34972] json dump silently converts int keys to string

2020-04-06 Thread Stub
Stub added the comment: Similarly, keys can be lost entirely: >>> json.dumps({1:2, 1.0:3}) '{"1": 3}' -- nosy: +Stub2 ___ Python tracker ___