[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2017-12-06 Thread Nick Coghlan
Nick Coghlan added the comment: The approach I've taken in my PR is similar to the one that Arfrever proposed (albeit different in the details due to other changes in the startup code since that patch was written). For the embedding case, I've simply noted in the What's

[issue32222] pygettext doesn't extract docstrings for functions with type annotated params

2017-12-06 Thread Toby Harradine
Toby Harradine added the comment: Another correction; I said that this is occurring for return type annotations; this is not true. This is only occurring for functions with annotated *arguments*. The cause of this issue is in pygettext's TokenEater.__suiteseen

[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2017-12-06 Thread Nick Coghlan
Change by Nick Coghlan : -- pull_requests: +4647 stage: needs patch -> patch review ___ Python tracker ___

[issue32098] Hardcoded value in Lib/test/test_os.py:L1324:URandomTests.get_urandom_subprocess()

2017-12-06 Thread STINNER Victor
STINNER Victor added the comment: https://github.com/python/cpython/commit/fb77e0d855e841f42c3fa504efe79eefca9efafb -- ___ Python tracker

[issue32098] Hardcoded value in Lib/test/test_os.py:L1324:URandomTests.get_urandom_subprocess()

2017-12-06 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue32212] few discrepancy between source and docs in logging

2017-12-06 Thread R. David Murray
R. David Murray added the comment: It does matter, though, because in Python you can specify a positional argument as if it were a keyword argument if you use the name from the source rather than the documented name. We have made other doc corrections along these

[issue30862] parent logger should also check the level

2017-12-06 Thread TaoQingyun
TaoQingyun <845767...@qq.com> added the comment: Sorry to disturb. When calling `logging.basicConfig(level=logging.ERROR)`, I expect only the ERROR or above level will be logged. so the level argument if set should also pass to the handler. -- ___

[issue32239] decimal module exception args incorrect for c module

2017-12-06 Thread Joshua Ringer
New submission from Joshua Ringer : Exception instance args for decimal errors are supposed to be a descriptive string. However, in the c module, they are currently a list of one containing the underlying exception class. The pure python module is correct. See the

[issue32098] Hardcoded value in Lib/test/test_os.py:L1324:URandomTests.get_urandom_subprocess()

2017-12-06 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +4646 stage: needs patch -> patch review ___ Python tracker

[issue31972] Inherited docstrings for pathlib classes are confusing

2017-12-06 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +4645 ___ Python tracker ___ ___

[issue31972] Inherited docstrings for pathlib classes are confusing

2017-12-06 Thread Éric Araujo
Change by Éric Araujo : -- pull_requests: -4644 ___ Python tracker ___ ___

[issue31972] Inherited docstrings for pathlib classes are confusing

2017-12-06 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +4644 stage: needs patch -> patch review ___ Python tracker

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2017-12-06 Thread paul j3
paul j3 added the comment: In the recently pushed, https://bugs.python.org/issue14191, "argparse doesn't allow optionals within positionals" we added new parsing functionality by defining a new parser method: parse_intermixed_args It added functionality without requiring

[issue32002] test_c_locale_coercion fails when the default LC_CTYPE != "C"

2017-12-06 Thread Nick Coghlan
Nick Coghlan added the comment: For the POSIX case, we're going to fix the implementation to always handle that the same way as it does the "C" locale: https://bugs.python.org/issue30672#msg307784 So the main question to address with the refactoring here will be capturing

[issue30672] PEP 538: Unexpected locale behaviour on *BSD (including Mac OS X)

2017-12-06 Thread Nick Coghlan
Nick Coghlan added the comment: As discussed in https://bugs.python.org/issue32238 and https://mail.python.org/pipermail/python-dev/2017-December/151105.html, I now think the right answer for the POSIX case is to ensure the legacy locale detection logic always treats that

[issue32238] Handle "POSIX" in the legacy locale detection

2017-12-06 Thread Nick Coghlan
Nick Coghlan added the comment: Oops, I forgot I already had an open issue for this discrepancy - I just hadn't decided how to resolve it yet. Marking as a duplicate of https://bugs.python.org/issue30672 -- superseder: -> PEP 538: Unexpected locale behaviour on

[issue32238] Handle "POSIX" in the legacy locale detection

2017-12-06 Thread Nick Coghlan
Nick Coghlan added the comment: Added a dependency on https://bugs.python.org/issue32002, as we should finish the test case refactoring proposed there before adjusting the `POSIX` locale handling on macOS and other *BSD systems. -- dependencies:

[issue32238] Handle "POSIX" in the legacy locale detection

2017-12-06 Thread Nick Coghlan
New submission from Nick Coghlan : Right now, the legacy locale detection introduced in PEP 538 doesn't trigger for "LANG=POSIX" and "LC_CTYPE=POSIX" on macOS and other *BSD systems. This is because we're looking specifically for "C" as the response from

[issue32234] Add context management to mailbox.Mailbox

2017-12-06 Thread Nick Coghlan
Nick Coghlan added the comment: I don't know the mailbox API particularly well, but the fact the object offers all three of lock(), unlock() and close() as methods does imply a fair bit of inherent ambiguity. One option would be to offer a module level "mailbox.locked()"

[issue30718] open builtin function: specifying the size of buffer has no effect for text files

2017-12-06 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Yes, clarifying buffering for text mode in open() would be nice. @direprobs: just in case you didn't know, you can achieve what you want with something like the following in pre-3.7: with open("/dev/null", "wb", buffering=10) as outb, \

[issue32237] test_xml_etree leaked [1, 1, 1] references, sum=3

2017-12-06 Thread STINNER Victor
STINNER Victor added the comment: Oh, more tests are failing: test_ensurepip leaked [1, 1, 1] references, sum=3 test_hashlib leaked [1, 1, 1] references, sum=3 test_importlib leaked [5, 5, 5] references, sum=15 -- ___

[issue32237] test_xml_etree leaked [1, 1, 1] references, sum=3

2017-12-06 Thread STINNER Victor
New submission from STINNER Victor : The commit eea3cc1ef0dec0af193eedb4c1164263fbdfd8cc introduced the following regression: vstinner@apu$ make && ./python -m test -R 3:3 test_xml_etree (...) test_xml_etree leaked [1, 1, 1] references, sum=3 -- messages:

[issue32224] socket.create_connection needs to support full IPv6 argument

2017-12-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think we still want the full tuple passed to connect(). We may want to truncate the tuple when used for other purposes. Le 07/12/2017 à 00:41, Matthew Stoltenberg a écrit : > > Matthew Stoltenberg added the comment: > >

[issue32236] open() shouldn't silently ignore buffering=1 in binary mode

2017-12-06 Thread Alexey Izbyshev
New submission from Alexey Izbyshev : The fact that "buffering=1" is usable only in text mode is documented for open(). In binary mode, setting buffering to 1 is silently ignored and equivalent to using default buffer size. I argue that such behavior is: 1. Inconsistent

[issue32224] socket.create_connection needs to support full IPv6 argument

2017-12-06 Thread Matthew Stoltenberg
Matthew Stoltenberg added the comment: The naive change is to have the host, port tuple assignment use only the first two values from address. I can open a PR with that change (and update the docstring for the function) if that's the right change. For reference, the python

[issue13322] buffered read() and write() does not raise BlockingIOError

2017-12-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Yes, I think adding a note in the docs is reasonable. -- ___ Python tracker ___

[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-12-06 Thread STINNER Victor
STINNER Victor added the comment: N! I loved Subversion so much! ... just kidding. Thanks for getting rid of Subversion. It became much easier to build CPython on Windows nowadays! -- ___ Python tracker

[issue32224] socket.create_connection needs to support full IPv6 argument

2017-12-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Also note that a regular socket.connect() call supports the full form address: >>> sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM) >>> sock.connect(('::1', 12345, 0, 0)) Matthew, are you interested in submitting a Github PR for this

[issue13322] buffered read() and write() does not raise BlockingIOError

2017-12-06 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Yes, your claim is confirmed by the fact that there have been little interest in this issue since 2011. Still, non-blocking behavior is incorrectly specified in the docs and is inconsistent (as investigated by Martin). And obscure errors

[issue30450] Pull Windows dependencies from GitHub rather than svn.python.org

2017-12-06 Thread Zachary Ware
Zachary Ware added the comment: This has been backported and working for nearly 3 months now; closing. As for whether to continue operating svn.python.org now that we're officially away from it: that can be determined elsewhere, probably by the box dying and deciding

[issue31430] [Windows][2.7] Python 2.7 compilation fails on mt.exe crashing with error code C0000005

2017-12-06 Thread STINNER Victor
STINNER Victor added the comment: Thank you! -- ___ Python tracker ___ ___

[issue31430] [Windows][2.7] Python 2.7 compilation fails on mt.exe crashing with error code C0000005

2017-12-06 Thread Zachary Ware
Zachary Ware added the comment: The worker is happy, closing the issue. -- keywords: +buildbot resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue32212] few discrepancy between source and docs in logging

2017-12-06 Thread Vinay Sajip
Vinay Sajip added the comment: I don't have a problem with tweaking the documentation where discrepancies are found between source and doc for keyword arguments, but in both the examples you give, the arguments are positional, not keyword. Therefore in my opinion

[issue30862] parent logger should also check the level

2017-12-06 Thread Vinay Sajip
Vinay Sajip added the comment: > Maybe I misunderstand. I think you do misunderstand. The level of the handler created by basicConfig doesn't have any level set, so it will process any message it is asked to handle. This is working as designed. --

[issue13322] buffered read() and write() does not raise BlockingIOError

2017-12-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Generally I doubt anyone is using the non-blocking semantics of the Python 3 I/O stack. People doing non-blocking I/O generally do it with sockets instead, which tend to reproduce quite literally the POSIX behaviour and error codes.

[issue31506] Improve the error message logic for object_new & object_init

2017-12-06 Thread Sanyam Khurana
Change by Sanyam Khurana : -- pull_requests: +4643 stage: needs patch -> patch review ___ Python tracker ___

[issue13322] buffered read() and write() does not raise BlockingIOError

2017-12-06 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: For added fun: at least one part of the standard library doesn't expect None returns from read() in the buffering layer. >>> import os >>> r, w = os.pipe2(os.O_NONBLOCK) >>> f = os.fdopen(r, 'r') >>> f.read() Traceback (most recent call

[issue18943] argparse: default args in mutually exclusive groups

2017-12-06 Thread paul j3
paul j3 added the comment: That's not how flagged (optionals) arguments work. The default value is used if the flag is not provided at all. One of your arguments is a 'store_true'. Its default value if False, which is changed to True if the '--device-get-capabilities'

[issue32123] Make the API of argparse.HelpFormatter public

2017-12-06 Thread paul j3
paul j3 added the comment: A difficulty with writing a public API is that useful changes can occur at almost any level of the class. The existing subclasses modify small, but deep methods, ones that handle things like line wrapping. On the other hand, most of the issues

[issue18943] argparse: default args in mutually exclusive groups

2017-12-06 Thread Vincas Dargis
Vincas Dargis added the comment: On 2017-12-06 19:43, paul j3 wrote: > With one flag but not its argument, I get the error that you display. That > has nothing to do with the grouping. > > 0932:~/mypy/argdev$ python3 issue18943.py --ptz-get-status > usage: issue18943.py

[issue32234] Add context management to mailbox.Mailbox

2017-12-06 Thread sblondon
sblondon added the comment: Currently, the implementation of .close() methods call flush() and unlock() if it's needed. About the ambiguity for the enter call, I think the context manager should provide access to Mailbox, not a lock. If a lock is needed, we could

[issue18943] argparse: default args in mutually exclusive groups

2017-12-06 Thread paul j3
paul j3 added the comment: Did you copy the output right? Testing your parser: Without any arguments, I get the exclusive group error - the group is required: 0930:~/mypy/argdev$ python3 issue18943.py usage: issue18943.py [-h]

[issue32233] [3.7 Regression] build with --with-system-libmpdec is broken

2017-12-06 Thread Stefan Krah
Change by Stefan Krah : -- assignee: -> skrah resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> compile error ___ Python tracker

[issue32233] [3.7 Regression] build with --with-system-libmpdec is broken

2017-12-06 Thread Stefan Krah
Stefan Krah added the comment: New changeset bd4ed77f73d37df325fc8f1e193b3ce6bc08094d by Stefan Krah in branch 'master': bpo-32233: Fix build with --with-system-libmpdec. (#4739) https://github.com/python/cpython/commit/bd4ed77f73d37df325fc8f1e193b3ce6bc08094d

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset 92a3c6f493ad411e4cf0acdf305ef4876aa90669 by Victor Stinner in branch 'master': bpo-32030: Add _PyImport_Fini2() (#4737) https://github.com/python/cpython/commit/92a3c6f493ad411e4cf0acdf305ef4876aa90669 --

[issue25910] Fixing links in documentation

2017-12-06 Thread Jim Fulton
Change by Jim Fulton : -- nosy: -j1m ___ Python tracker ___ ___ Python-bugs-list

[issue32233] [3.7 Regression] build with --with-system-libmpdec is broken

2017-12-06 Thread Stefan Krah
Change by Stefan Krah : -- pull_requests: +4642 stage: -> patch review ___ Python tracker ___

[issue32235] [2.7 regression] test_xml_etree test_xml_etree_c failures with 2.7 and 3.6 branches 20171205

2017-12-06 Thread STINNER Victor
STINNER Victor added the comment: See bpo-31170 for expat 2.2.3 bug (and maybe also bpo-30947). -- nosy: +vstinner ___ Python tracker

[issue32233] [3.7 Regression] build with --with-system-libmpdec is broken

2017-12-06 Thread Stefan Krah
Stefan Krah added the comment: I suggest to restore the logic from 75c0d4f6bb97e723adc3a03c0ff6aaaee0c6981a . -- ___ Python tracker

[issue32235] [2.7 regression] test_xml_etree test_xml_etree_c failures with 2.7 and 3.6 branches 20171205

2017-12-06 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> third party ___ Python tracker ___

[issue32235] [2.7 regression] test_xml_etree test_xml_etree_c failures with 2.7 and 3.6 branches 20171205

2017-12-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This means that you need to update the expat library. Expat version 2.2.3 contains a bug, it affects not only Python, but all depending applications. -- nosy: +serhiy.storchaka ___

[issue32234] Add context management to mailbox.Mailbox

2017-12-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is an ambiguity. What should the context manager do? Should it call a close() on exit (as the OP implies)? Or call lock() on enter and unlock() on exit as in Barry's example? Both behaviors look reasonable. "In the face

[issue32233] [3.7 Regression] build with --with-system-libmpdec is broken

2017-12-06 Thread Stefan Krah
Stefan Krah added the comment: At some point linking explicitly against libm was added. The build still worked until 8acaa31eec removed detect_math_libs(). -- nosy: +skrah ___ Python tracker

[issue32235] [2.7 regression] test_xml_etree test_xml_etree_c failures with 2.7 and 3.6 branches 20171205

2017-12-06 Thread Matthias Klose
New submission from Matthias Klose : Seen with recent Debian and Ubuntu builds, builds configured with --with-system-expat, expat version 2.2.3. == ERROR: test_expat224_utf8_bug (test.test_xml_etree.BugsTest)

[issue25910] Fixing links in documentation

2017-12-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset 1b4587a2462fc05a14be87123083322103a1f55b by Victor Stinner (Sanyam Khurana) in branch 'master': bpo-25910: Fixes redirection from http to https (#4674)

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset 6bf992a1ac6f3f4d0f83ead9c6403a76afdbe6eb by Victor Stinner in branch 'master': bpo-32030: Add pymain_get_global_config() (#4735) https://github.com/python/cpython/commit/6bf992a1ac6f3f4d0f83ead9c6403a76afdbe6eb

[issue32233] [3.7 Regression] build with --with-system-libmpdec is broken

2017-12-06 Thread Ned Deily
Change by Ned Deily : -- nosy: +ned.deily priority: normal -> release blocker ___ Python tracker ___

[issue13959] Re-implement parts of imp in pure Python

2017-12-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset 672b6baa71010f236ee8c8ce912e98cb542385c6 by Victor Stinner in branch 'master': bpo-32030: pass interp to _PyImport_Init() (#4736) https://github.com/python/cpython/commit/672b6baa71010f236ee8c8ce912e98cb542385c6

[issue32232] building extensions as builtins is broken in 3.7

2017-12-06 Thread Ned Deily
Change by Ned Deily : -- nosy: +ned.deily priority: normal -> release blocker ___ Python tracker ___

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-06 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4641 ___ Python tracker ___ ___

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset 672b6baa71010f236ee8c8ce912e98cb542385c6 by Victor Stinner in branch 'master': bpo-32030: pass interp to _PyImport_Init() (#4736) https://github.com/python/cpython/commit/672b6baa71010f236ee8c8ce912e98cb542385c6

[issue13959] Re-implement parts of imp in pure Python

2017-12-06 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4640 ___ Python tracker ___ ___

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-06 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4639 ___ Python tracker ___ ___

[issue32234] Add context management to mailbox.Mailbox

2017-12-06 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Yes, I think this is a good idea. Would you like to submit a PR for it? FWIW, we have this code in Mailman 3: class Mailbox(MMDF): """A mailbox that interoperates with the 'with' statement.""" def __enter__(self):

[issue32030] PEP 432: Rewrite Py_Main()

2017-12-06 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4638 ___ Python tracker ___ ___

[issue32234] Add context management to mailbox.Mailbox

2017-12-06 Thread sblondon
New submission from sblondon : mailbox.Mailbox has a .close() method that should be called at the end of Mailbox use. I think it would be nice to use Mailbox instances with a 'with' statement so .close() will be called it automatically. So there is no need to check

[issue32199] uuid.getnode() should return the MAC address on Android

2017-12-06 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: > Maybe we should just close this issue as 'wont fix' then. I would be okay with any of these resolutions: * Close as `wont fix` * Just call `ip link` (without list) * Add a new getter such that both `ip link` and `ip link list` are called.

[issue32199] uuid.getnode() should return the MAC address on Android

2017-12-06 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Dec 6, 2017, at 02:06, Xavier de Gaye wrote: > > Whatever the change made to fix this issue, it is not possible to add a test > case for this change. Even with say, exception raising mocks for the getters? > So

[issue32232] building extensions as builtins is broken in 3.7

2017-12-06 Thread Matthias Klose
Matthias Klose added the comment: that patch lets the build succeed. two additional includes and a little bit of shuffling -- keywords: +patch Added file: https://bugs.python.org/file47325/ext-as-builtins.diff ___ Python tracker

[issue32229] Simplify hiding developer warnings in user facing applications

2017-12-06 Thread R. David Murray
R. David Murray added the comment: Ah, OK, that makes more sense. I don't run into warnings other than DeprecationWarnings in practice, so I tend to forget about them :) I think specifying warnings filters is pretty inscrutable, in general. --

[issue32233] [3.7 Regression] build with --with-system-libmpdec is broken

2017-12-06 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___

[issue32233] [3.7 Regression] build with --with-system-libmpdec is broken

2017-12-06 Thread Matthias Klose
Matthias Klose added the comment: proposed patch, however I don't know the rationale for that change compared to 3.7alpha2. -- keywords: +patch Added file: https://bugs.python.org/file47324/issue32233.diff ___ Python tracker

[issue32233] [3.7 Regression] build with --with-system-libmpdec is broken

2017-12-06 Thread Matthias Klose
New submission from Matthias Klose : in setup.py, for the _decimal module the libararies are now set exclusively to ['m'], without checking if this is really needed, and overriding the external mpdec library, breaking the build. Is there any reason to override that?

[issue32229] Simplify hiding developer warnings in user facing applications

2017-12-06 Thread Nick Coghlan
Nick Coghlan added the comment: Note: for consistency with the underlying action names, the API should probably be called "warnings.ignore_warnings". I'd still keep the proposed parameter name as "show" though (and we may want to consider introducing that as a more

[issue32229] Simplify hiding developer warnings in user facing applications

2017-12-06 Thread Nick Coghlan
Nick Coghlan added the comment: Warnings aren't off by default in general - we just add implicit "ignore" filters for a few specific types. So the primary functionality is to opt in to hiding *all* warnings, but to do it in a way that can be overridden by PYTHONWARNINGS,

[issue32232] building extensions as builtins is broken in 3.7

2017-12-06 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +eric.snow, ncoghlan ___ Python tracker ___

[issue32232] building extensions as builtins is broken in 3.7

2017-12-06 Thread Matthias Klose
New submission from Matthias Klose : building extensions statically in linking these into the python binary is currently broken on 3.7. I'm attaching the change that worked for me in 3.7alpha2, but doesn't work anymore with alpha3. Currently investigating. When building

[issue32229] Simplify hiding developer warnings in user facing applications

2017-12-06 Thread R. David Murray
R. David Murray added the comment: I haven't been following that discussion, and isolated from that that discussion the title of this issue and this proposal make no sense to me. Warnings are off by default, so you don't need to hide them. In what context does this

[issue32220] multiprocessing: passing file descriptor using reduction breaks duplex pipes on darwin

2017-12-06 Thread Ronald Oussoren
Ronald Oussoren added the comment: I don't know if the issue has been fixed on macOS, and I'd be surprised if Ned would know this without testing. Anyways, I think it is worthwhile to perform the testing that Antoine mentioned on a recent version of macOS (I'd start

[issue32230] -X dev doesn't set sys.warnoptions

2017-12-06 Thread STINNER Victor
STINNER Victor added the comment: "-W options > PYTHONWARNINGS > BytesWarning > -X dev > default filters" Hum, sorry, according to bpo-20361 (and bpo-32231 which has been marked as a duplicate of bpo-20361), -b and -bb options must have the priority over

[issue32230] -X dev doesn't set sys.warnoptions

2017-12-06 Thread Nick Coghlan
Nick Coghlan added the comment: If we wanted to go that way, then I'd go back to my original code order for - putting the '-X dev' setting first in sys.warnoptions, so both PYTHONWARNINGS and -W options override it. Then https://bugs.python.org/issue32231 would determine

[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2017-12-06 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +ncoghlan, vstinner ___ Python tracker ___ ___

[issue32230] -X dev doesn't set sys.warnoptions

2017-12-06 Thread STINNER Victor
STINNER Victor added the comment: I prefer to not talk about sys.warnoptions since, as you wrote, the order is reversed. IMHO the priority should be (high priority > low priority): -W options > PYTHONWARNINGS > BytesWarning > -X dev > default filters With: *

[issue32231] -bb option should override -W options

2017-12-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This looks like a duplicate of issue20361. -- nosy: +serhiy.storchaka resolution: -> duplicate superseder: -> -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line

[issue32231] -bb option should override -W options

2017-12-06 Thread Nick Coghlan
Nick Coghlan added the comment: One potential complication here is that embedding applications would inherit the requirement to do both: Py_BytesWarningFlag = 2; and PySys_AddWarnOption(L"error::BytesWarning"); to request errors. That's probably OK though, since

[issue32230] -X dev doesn't set sys.warnoptions

2017-12-06 Thread Nick Coghlan
Nick Coghlan added the comment: Right, I hit some of those corner cases myself before I realised that pymain_add_warnings_options was the right place to inject "default" into sys.warnoptions after your refactoring improvements. It provides a nice pivot point where the

[issue32231] -bb option should override -W options

2017-12-06 Thread Nick Coghlan
Nick Coghlan added the comment: I'm hesitant to put the *true* default filters in sys.warnoptions, as folks use "bool(sys.warnoptions)" as a check for "Were any warning options set via the environment or the command line?", and we don't want to invalidate that use case.

[issue32231] -bb option should override -W options

2017-12-06 Thread STINNER Victor
STINNER Victor added the comment: IMHO the root issue is that there are different options which set warnings filters: - PYTHONWARNINGS/-W will fill sys.warnoptions - sys.flags.bytes_warning (-b, -bb) and sys.flags.dev_mode (-X dev, PYTHONDEVMODE=1) which change the

[issue32230] -X dev doesn't set sys.warnoptions

2017-12-06 Thread STINNER Victor
STINNER Victor added the comment: > It isn't good to have "-X dev" do magical things that can't already be > replicated with other options. While it might be nice to be able to replicate -X dev "manually", I didn't try to implement that. The current implementation

[issue32230] -X dev doesn't set sys.warnoptions

2017-12-06 Thread Nick Coghlan
Nick Coghlan added the comment: In relation to the utility of sys.warnoptions: it also lets other modules (like the unittest module) inspect the warnings that have been specified on the command line. If it wasn't for that use case, I wouldn't be concerned about the fact

[issue32231] -bb option should override -W options

2017-12-06 Thread Nick Coghlan
Nick Coghlan added the comment: (From the discussion at https://bugs.python.org/issue32230#msg307721) Another benefit we'd gain from this approach is that we could easily omit the filter entirely in the case where neither -b nor -bb is set: in those situations,

[issue32230] -X dev doesn't set sys.warnoptions

2017-12-06 Thread Nick Coghlan
Nick Coghlan added the comment: No, we don't need to worry about BytesWarning if neither -b nor -bb are set, as the interpreter doesn't even emit the warning in that case. The only thing the warnings machinery gets used for is to print the messages and/or raise the

[issue32230] -X dev doesn't set sys.warnoptions

2017-12-06 Thread STINNER Victor
STINNER Victor added the comment: First I proposed that -X dev behaves as -Wd -b, but Antoine Pitrou and Serhiy Storchaka asked to remove -b: https://mail.python.org/pipermail/python-dev/2017-November/150517.html

[issue32230] -X dev doesn't set sys.warnoptions

2017-12-06 Thread Nick Coghlan
Nick Coghlan added the comment: I filed https://bugs.python.org/issue32231 to cover having -bb always override other warnings settings when it comes to handling BytesWarning. Writing that issue made me realise another quirk with `-X dev` though: as a command line option,

[issue32230] -X dev doesn't set sys.warnoptions

2017-12-06 Thread STINNER Victor
STINNER Victor added the comment: > If we want "-bb" to take precedence over the passed in "-W" settings It's not only that. Without -b nor -bb, the default::Warning filter should still come after ignore::BytesWarning, since these warnings must be ignored by

[issue32231] -bb option should override -W options

2017-12-06 Thread Nick Coghlan
New submission from Nick Coghlan : When implementing the "-X dev" mode, Victor was asked to make it behave differently from "-Wd", such that "python -bb -X dev" would still raise errors for bytes comparisons. I don't think making "-X dev" and "-Wd" inconsistent with each

[issue32230] -X dev doesn't set sys.warnoptions

2017-12-06 Thread Nick Coghlan
Nick Coghlan added the comment: It isn't good to have "-X dev" do magical things that can't already be replicated with other options. If we want "-bb" to take precedence over the passed in "-W" settings (which I agree would be a reasonable change), we should make that

[issue32230] -X dev doesn't set sys.warnoptions

2017-12-06 Thread Nick Coghlan
Change by Nick Coghlan : -- keywords: +patch pull_requests: +4637 stage: test needed -> patch review ___ Python tracker ___

[issue32199] uuid.getnode() should return the MAC address on Android

2017-12-06 Thread Xavier de Gaye
Xavier de Gaye added the comment: Attached ip_link.strace and ip_link_list.strace, the output of strace for the 'ip link' and 'ip link list' commands. At the end of the process, both commands create an PF_NETLINK socket to receive from the kernel link information through

[issue32220] multiprocessing: passing file descriptor using reduction breaks duplex pipes on darwin

2017-12-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 06/12/2017 à 05:08, Nate a écrit : > > This is a hard case to test for, as timing matters. The duplex pipe doesn't > get confused/corrupted unless one process is sending/receiving a message over > the pipe at the same moment that another

  1   2   >