[issue35967] Better platform.processor support

2019-03-08 Thread Jason R. Coombs
Jason R. Coombs added the comment: Reading further, the 'sysctl' call seems to only be for BSD (https://www.freebsd.org/cgi/man.cgi?sysctl(3)). I could find the man page for sysctl for BSD but not Linux. There is a _sysctl in Linux (http://man7.org/linux/man-pages/man2/sysctl.2.html), but

[issue36239] gettext: GNUTranslations doesn't parse properly comments in description

2019-03-08 Thread Julien Palard
Julien Palard added the comment: After some research I found a few comments around comments being marked as starting by #-#-#-#-# and ending with #-#-#-#-#, not just starting with #. In gettext-0.19.8.1 sources for example: $ grep -r '#-#-#-#-' | head gettext-tools/misc/po-mode.el:#-#-#-#-#

[issue35967] Better platform.processor support

2019-03-08 Thread Jason R. Coombs
Jason R. Coombs added the comment: Best I can tell, neither sysinfo nor sysctl are exposed in any way to Python, so it may not be possible to accurately load the processor information from those system calls without writing a wrapper in C. What I might try is to experiment with ctypes to

[issue35435] Discourage external links to old docs.

2019-03-08 Thread Julien Palard
Julien Palard added the comment: Let's not have duplicate issues, so I'm closing this in favor of https://github.com/python/python-docs-theme/issues/24. Thanks Terry for noticing. -- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed

[issue35967] Better platform.processor support

2019-03-08 Thread Jason R. Coombs
Jason R. Coombs added the comment: Aha! It seems the 'sysinfo' call is for Solaris: https://docs.oracle.com/cd/E23823_01/html/816-5167/sysinfo-2.html -- ___ Python tracker

[issue36240] Definitions of time

2019-03-08 Thread Robert Billing
New submission from Robert Billing : https://docs.python.org/3.7/library/time.html contains the text "UTC is Coordinated Universal Time (formerly known as Greenwich Mean Time, or GMT)". This is not strictly true. Referring to https://en.wikipedia.org/wiki/Coordinated_Universal_Time the

[issue35967] Better platform.processor support

2019-03-08 Thread Jason R. Coombs
Jason R. Coombs added the comment: The first call I see in that routine is to "sysinfo", but the signature of that function doesn't match what I find in the [man pages for that function](http://man7.org/linux/man-pages/man2/sysinfo.2.html). So that function must be coming from elsewhere.

[issue35967] Better platform.processor support

2019-03-08 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Thanks. It would be good to do some before/after tests on popular platforms, e.g. a few Linuxes, MacOS, Windows. -- ___ Python tracker

[issue31256] xml.etree.ElementTree: add support for doctype in tostring method

2019-03-08 Thread Bernt Røskar Brenna
Bernt Røskar Brenna added the comment: See also: https://bugs.python.org/issue36227 PR: https://github.com/python/cpython/pull/12225 -- nosy: +Bernt.Røskar.Brenna ___ Python tracker

[issue31256] xml.etree.ElementTree: add support for doctype in tostring method

2019-03-08 Thread Bernt Røskar Brenna
Change by Bernt Røskar Brenna : -- keywords: +patch pull_requests: +12225 stage: -> patch review ___ Python tracker ___ ___

[issue36227] Add default_namespace argument to xml.etree.ElementTree.tostring()

2019-03-08 Thread Bernt Røskar Brenna
Bernt Røskar Brenna added the comment: I pushed changes to the PR. I also added xml_declaration and default_namespace to the tostringlist() method. -- ___ Python tracker ___

[issue36239] gettext: GNUTranslations doesn't parse properly comments in description

2019-03-08 Thread STINNER Victor
STINNER Victor added the comment: Attached files: * comments.po: PO file with a comment in headers * messages.mo: comments.po compiled with msgfmt * parse.py: Python script to parse messages.mo -- ___ Python tracker

[issue36239] gettext: GNUTranslations doesn't parse properly comments in description

2019-03-08 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file48197/messages.mo ___ Python tracker ___ ___ Python-bugs-list mailing

[issue36239] gettext: GNUTranslations doesn't parse properly comments in description

2019-03-08 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file48196/comments.po ___ Python tracker ___ ___ Python-bugs-list mailing

[issue36239] gettext: GNUTranslations doesn't parse properly comments in description

2019-03-08 Thread STINNER Victor
Change by STINNER Victor : Added file: https://bugs.python.org/file48195/parse.py ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue36239] gettext: GNUTranslations doesn't parse properly comments in description

2019-03-08 Thread STINNER Victor
New submission from STINNER Victor : When a translation .po file contains a comment in headers, it's kept when compiled as .mo by msgfmt. Example with test.po: --- msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "#-#-#-#-# plo.po

[issue35967] Better platform.processor support

2019-03-08 Thread Jason R. Coombs
Jason R. Coombs added the comment: It won't be possible in general to emit what the function returned before, as `uname` is a symbolic reference to an arbitrary executable, which can vary by platform and release and local environment. What I might be able to do is find the implementation of

[issue36237] data_files / Install Additional Files written unclearly such that it's not obvious what parameter is what

2019-03-08 Thread jt
jt added the comment: Ok I am now realizing after more tests I actually read the docs correctly, and in that sense they're not ambiguous. It's just that I tried to use data_files for something that it's not for: I did look at package_data first and I get that's what I SHOULD be using,

[issue36227] Add default_namespace argument to xml.etree.ElementTree.tostring()

2019-03-08 Thread Bernt Røskar Brenna
Bernt Røskar Brenna added the comment: I will add xml_declaration and push to the existing PR. -- ___ Python tracker ___ ___

[issue36233] xml ElementTree quotation marks of xml version string

2019-03-08 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +eli.bendersky, scoder, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list

[issue36238] distutils complains "package init file 'xxx/__init__.py' not found (or not a regular file)" when using Cythonized __init__.pyx

2019-03-08 Thread jt
New submission from jt : distutils spits out a warning: package init file 'xxx/__init__.py' not found (or not a regular file) ... when using Cythonized __init__.pyx instead. However, the installed package works absolutely fine, it can be imported & used perfectly, so this warning seems

[issue36237] data_files / Install Additional Files written unclearly such that it's not obvious what parameter is what

2019-03-08 Thread jt
New submission from jt : I find the following doc section found at https://docs.python.org/3.7/distutils/setupscript.html#installing-additional-files about data_files somewhat unclear: ``` setup(..., data_files=[('bitmaps', ['bm/b1.gif', 'bm/b2.gif']), ('config',

[issue36236] Python crash on macOS when CWD is invalid

2019-03-08 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +12224 stage: -> patch review ___ Python tracker ___ ___

[issue36236] Python crash on macOS when CWD is invalid

2019-03-08 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This is happening because _Py_wgetcwd returns NULL (although the underliying getcwd system call populates the `fullpath` variable correctly) but its caller, _PyPathConfig_ComputeArgv0, does not check the return value:

[issue36235] distutils.sysconfig.customize_compiler() overrides CFLAGS var with OPT var if CFLAGS env var is set

2019-03-08 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +12223 stage: -> patch review ___ Python tracker ___ ___

[issue36236] Python crash on macOS when CWD is invalid

2019-03-08 Thread László Kiss Kollár
New submission from László Kiss Kollár : CPython crashes with "pymain_compute_path0: memory allocation failed" when attempting to execute it with a library module from a previously deleted directory. To reproduce: cd ~/tmp/python_crash rm -rf ~/tmp/python_crash python3.7 -m pdb Fatal

[issue36235] distutils.sysconfig.customize_compiler() overrides CFLAGS var with OPT var if CFLAGS env var is set

2019-03-08 Thread STINNER Victor
New submission from STINNER Victor : When a C extension is built by distutils, distutils.sysconfig.customize_compiler() is used to configure compiler flags. Extract of the code: (cc, cxx, opt, cflags, ccshared, ldshared, shlib_suffix, ar, ar_flags) = \ get_config_vars('CC',

[issue36234] test_os: add tests for invalid uid type

2019-03-08 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36230] Please sort assertSetEqual's output

2019-03-08 Thread Windson Yang
Windson Yang added the comment: My point is careful about the non-sortable object. My mistake, this should be an enhancement, not a bug. -- versions: -Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker

[issue36228] Support coercion of complex to float/int

2019-03-08 Thread Mark Dickinson
Mark Dickinson added the comment: > So I suggest: > 1. Methods __floor__ and __ceil__ for complex object. What's the use-case for these? It's not a particularly natural operation, and I've never had a need for a complex "floor" operation, either as a mathematician or as a developer. Do you

[issue36234] test_os: add tests for invalid uid type

2019-03-08 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +12221 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing

[issue36234] test_os: add tests for invalid uid type

2019-03-08 Thread STINNER Victor
STINNER Victor added the comment: See _Py_Uid_Converter() and _Py_Gid_Converter() of Modules/posixmodule.c. -- ___ Python tracker ___

[issue36234] test_os: add tests for invalid uid type

2019-03-08 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch Added file: https://bugs.python.org/file48194/00157-uid-gid-overflows.patch ___ Python tracker ___

[issue36234] test_os: add tests for invalid uid type

2019-03-08 Thread STINNER Victor
New submission from STINNER Victor : The Fedora package of python contains a downstream patch to add more tests for invalid uid types: https://src.fedoraproject.org/rpms/python2/blob/master/f/00157-uid-gid-overflows.patch I propose to make this patch upstream. More tests never hurts :-)

[issue36233] xml ElementTree quotation marks of xml version string

2019-03-08 Thread Johann Krauter
New submission from Johann Krauter : I have the problem, that a xml file is save with the following xml declaration: instead of I would propose to change the line number 769 in the ElementTree.py to: write("\n" % ( declared_encoding,)) -- components: XML

[issue36232] Improve error message on dbm.open

2019-03-08 Thread Marco Rougeth
New submission from Marco Rougeth : If dbm.open is used with the flags 'r' or 'w' (read-only) to open a file that doesn't exist, it raises an exception with the message "need 'c' or 'n' flag to open new db". It'd be better to have a more explicit error message like "db file doesn't exist,

[issue36231] no "proper" header files on macOS 10.14 Mojave

2019-03-08 Thread Dmitrii Pasechnik
New submission from Dmitrii Pasechnik : Neither Xcode nor its command-line tools on macOS 10.14 Mojave come with header files installed in /usr/ and other "normal" directories. This is not documented in https://devguide.python.org/setup/#macos-and-os-x While an extra step to handle this,

[issue36227] Add default_namespace argument to xml.etree.ElementTree.tostring()

2019-03-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Okay. Bernt, do you mind to add also the xml_declaration option in PR 12225 or create a separate PR for issue31256? -- ___ Python tracker

[issue36228] Support coercion of complex to float/int

2019-03-08 Thread Марат Нагаев
Марат Нагаев added the comment: Oh, __floor__ can return anything. So I suggest: 1. Methods __floor__ and __ceil__ for complex object. 2. Don't change __float__ and __int__ methods. 3. So I think it isn't nessesary to add methods floor and ceil to complex module. Example: from math import *

[issue36227] Add default_namespace argument to xml.etree.ElementTree.tostring()

2019-03-08 Thread Stefan Behnel
Stefan Behnel added the comment: lxml does not support the "default_namespace" option specifically (because its tree model preserves namespace prefixes), but it generally makes all (justifiable) serialisation options available to both tostring() and ET.write(). I think the same should apply

[issue36230] Please sort assertSetEqual's output

2019-03-08 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: @rhettinger > It's possible to have non-sortable elements in the set, so you'll either need > to sort on the repr of the elements or have a fallback Yes, it is the repr that is used in the loop and that what's the sorting needs to be done against. @Windson

[issue36227] Add default_namespace argument to xml.etree.ElementTree.tostring()

2019-03-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue31256. I do not know what is better: make tostring() to accept all options of write(), or keep it simpler. What strategy lxml supports? -- ___ Python tracker

[issue36227] Add default_namespace argument to xml.etree.ElementTree.tostring()

2019-03-08 Thread Stefan Behnel
Stefan Behnel added the comment: The feature seems reasonable to me and the patch looks good. -- ___ Python tracker ___ ___

[issue35967] Better platform.processor support

2019-03-08 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: As the documentation says, the API is intended as fairly portable implementation of the Unix uname helper across platforms. It's fine to redirect this directly to e.g. /proc output instead of using the executable, but in whatever you do here, the output

[issue34162] idlelib/NEWS.txt for 3.8.0 (and backports)

2019-03-08 Thread miss-islington
miss-islington added the comment: New changeset 02351ed1ba601445735c6a6eae6f9b1d37fae8cd by Miss Islington (bot) in branch '3.7': bpo-34162: Add entries for idlelib/NEWS.txt (GH-12232) https://github.com/python/cpython/commit/02351ed1ba601445735c6a6eae6f9b1d37fae8cd --

[issue34162] idlelib/NEWS.txt for 3.8.0 (and backports)

2019-03-08 Thread miss-islington
Change by miss-islington : -- pull_requests: +12219 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34162] idlelib/NEWS.txt for 3.8.0 (and backports)

2019-03-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: New changeset 8a1bab92915dd5c88832706c56af2f5611181d50 by Terry Jan Reedy in branch 'master': bpo-34162: Add entries for idlelib/NEWS.txt (#12232) https://github.com/python/cpython/commit/8a1bab92915dd5c88832706c56af2f5611181d50 --

<    1   2