[issue31772] SourceLoader uses stale bytecode in case of equal mtime seconds

2017-10-12 Thread Devin Bayer
Devin Bayer added the comment: That wouldn't always work either. If the source file is imported, then edited, then not reimported until the next second (or far in the future) the stale bytecode would still be used. -- ___ Python tracker

[issue31772] SourceLoader uses stale bytecode in case of equal mtime seconds

2017-10-12 Thread Nick Coghlan
Nick Coghlan added the comment: The problem with changing the bytecode format is that code other than the import machinery reads the bytecode headers, so when we change the format, we need to consider the impact on that code. (Even my multiplication proposal above suffers from that problem)

[issue31772] SourceLoader uses stale bytecode in case of equal mtime seconds

2017-10-12 Thread Devin Bayer
Devin Bayer added the comment: Thanks for the support Nick. I think your proposed idea would still result in rare but confusing behavior, which is the type of surprise Python should avoid. The hash-based pyc files doesn't seem like a solution to me, because it won't be enabled by default. And

[issue31742] Default to emitting FutureWarning for provisional APIs

2017-10-12 Thread Nick Coghlan
Nick Coghlan added the comment: Keep in mind that I'm not proposing that we retroactively change our approach to managing any currently provisional APIs that were proposed and implemented under the current version of PEP 411. Instead I'm merely suggesting that the policy for any *future* prov

[issue31732] Add TRACE level to the logging module

2017-10-12 Thread pmpp
pmpp added the comment: Sorry, i didn't mean to be rude. Just wanted to pick your attention because i think you miss the point: logging as is it with its levels is perfect for *log messages*. Review the typical usage shown and you'll see that tracing level is for logging tracebacks : the deb

[issue30744] Local variable assignment is broken when combined with threads + tracing + closures

2017-10-12 Thread Nick Coghlan
Nick Coghlan added the comment: Aye, what's in PEP 558 is the least invasive implementation change I've been able to come up that fixes the reported bug, but Nathaniel's right that it would break debuggers (and probably some other things) as currently written. So the above design comes from a

[issue31509] test_subprocess hangs randomly on AMD64 Windows10 3.x

2017-10-12 Thread Ned Deily
Ned Deily added the comment: I also have seen test_subprocess hangs on both macOS and on Debian Linux on both 3.6 and master, as recently as 3.6.3 and 3.7.0a1 but not with current heads. After some experimenting and bisecting, I tracked the fix down to the mock os.waitpid fixes for bpo-31178

[issue31772] SourceLoader uses stale bytecode in case of equal mtime seconds

2017-10-12 Thread Nick Coghlan
Nick Coghlan added the comment: Increasing the number of stat calls required for a successful import is a good reason to close the submitted PR, but I'm not sure it's a good reason to close the *issue*, as there may be other ways to solve it that don't result in an extra stat call for every s

[issue30632] IDLE: add unittests to test_autocomplete

2017-10-12 Thread Berker Peksag
Change by Berker Peksag : -- superseder: -> IDLE: Add test_autocomplete unittest ___ Python tracker ___ ___ Python-bugs-list mailing

[issue31732] Add TRACE level to the logging module

2017-10-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: No need to be brusque with me. Vinay is the decision maker on this. Overall, this seems rehash and second guess the discussions and decisions made 15 years ago when PEP 282 was accepted. At that time, it was decided that five levels had advantages for le

[issue31742] Default to emitting FutureWarning for provisional APIs

2017-10-12 Thread Guido van Rossum
Guido van Rossum added the comment: I am at a loss for words. On Oct 12, 2017 6:27 PM, "Nick Coghlan" wrote: > > Nick Coghlan added the comment: > > If a proposed standard library API is sufficiently stable that the folks > proposing it are reluctant to emit a runtime warning about any remai

[issue31742] Default to emitting FutureWarning for provisional APIs

2017-10-12 Thread Nick Coghlan
Nick Coghlan added the comment: If a proposed standard library API is sufficiently stable that the folks proposing it are reluctant to emit a runtime warning about any remaining stability risks, then I think it's reasonable to expect them to propose it as non-provisional and accept the relate

[issue31742] Default to emitting FutureWarning for provisional APIs

2017-10-12 Thread Ned Deily
Ned Deily added the comment: Besides making the provisional warning more noticeable in module doc pages, perhaps we should have a "Provisional Package / API" section somewhere in the release's docset: a liat of all provisionals and perhaps a list of formerly provisional, now stable items that

[issue31761] regrtest: faulthandler.enable() fails with io.UnsupportedOperation: fileno when run from IDLE

2017-10-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: When I import autotest in IDLE's shell, test_code_module fails, test_importlib and test_warnings fail, as without IDLE, and test_gc and test_logging are new failures. (Results are easy to see because SystemExit is caught and ignored.) test test_gc failed --

[issue31742] Default to emitting FutureWarning for provisional APIs

2017-10-12 Thread Guido van Rossum
Guido van Rossum added the comment: OK, so the Django and Twisted developers had to resist some pressure from their users. These are mature projects and if they can't resist pressure from users something is wrong with those projects, and just pointing users to PEP 411 would have been a suffic

[issue31761] regrtest: faulthandler.enable() fails with io.UnsupportedOperation: fileno when run from IDLE

2017-10-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: The Python console exits because test.libregrtest.main.Regrtest._main calls sys.exit. test.autotest consists of from test.libregrtest import main main() The main call should be wrapped with try:...except sys.exit: pass The output also has this variance from

[issue30744] Local variable assignment is broken when combined with threads + tracing + closures

2017-10-12 Thread Guido van Rossum
Guido van Rossum added the comment: Wow, nothing here is simple. :-( Even though the examples show that there's obviously a bug, I would caution against fixing it rashly without understanding how the current behavior may be useful in other circumstances. I've lost what I recall from reading P

[issue29696] Use namedtuple in string.Formatter.parse iterator response

2017-10-12 Thread Pablo
Change by Pablo : -- keywords: +patch pull_requests: +3956 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailin

[issue31761] regrtest: faulthandler.enable() fails with io.UnsupportedOperation: fileno when run from IDLE

2017-10-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: 0:00:28 [ 25/407] test_asyncio F:\dev\3x\lib\asyncio\sslproto.py:330: ResourceWarning: unclosed transport source=self) test_code_module - multiple errors test test_importlib failed -- Traceback (most recent call last): File "F:\dev\3x\lib\test\test_impor

[issue31761] regrtest: faulthandler.enable() fails with io.UnsupportedOperation: fileno when run from IDLE

2017-10-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: Victor, what is your opinion of running 'from test import autotest' in a standard python shell window, opened from an icon, as opposed to IDLE's shell? > many tests fail just because of IDLE. We cannot know what to blame on IDLE without a proper control expe

[issue31778] ast.literal_eval supports non-literals in Python 3

2017-10-12 Thread David Bieber
Change by David Bieber : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue31778] ast.literal_eval supports non-literals in Python 3

2017-10-12 Thread David Bieber
New submission from David Bieber : # Overview ast.literal_eval supports some non-literals in Python 3. The behavior of this function runs contrary to the documented behavior. # The Issue The [documentation](https://docs.python.org/3/library/ast.html#ast.literal_eval) says of the function "It

[issue13802] IDLE font settings: use multiple character sets in examples

2017-10-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: I pushed new commits to the PR that changed the Korean, Japanese, and Indian samples and the help message. Korea: The line is now the first 10 chars of Dong-hee Na's suggestion. Thank you for helping (and Louie for the cc). Japan: The line is now the hiraga

[issue31777] IDLE: Let users add to font selection

2017-10-12 Thread Terry J. Reedy
New submission from Terry J. Reedy : Config dialog Font tab has a sample box. It currently only contains Ascii chars. #13802 will add characters from extended latin1 and several other character sets. But we cannot show everything. Hence a spinoff proposal: let users augment the sample with

[issue31767] Windows Installer fails with error 0x80091007 when trying to install debugging symbols

2017-10-12 Thread Steve Dower
Steve Dower added the comment: FWIW, all your assumptions about how it should work are correct. If you don't know how the files got there instead of a randomly generated temporary path, then I don't know either. /layout is the only time we download anything to a non-temp directory. -

[issue22674] strsignal() missing from signal module

2017-10-12 Thread Antoine Pietri
Antoine Pietri added the comment: Hey everyone, We would like to have that feature for a project where we have to use ctypes to achieve that. I don't know the answers to vajrasky's questions but I just wanted to chime in to say having this feature would be greatly appreciated. I can also wor

[issue31742] Default to emitting FutureWarning for provisional APIs

2017-10-12 Thread Ned Deily
Change by Ned Deily : -- nosy: +ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue30058] Buffer overflow in kqueue.control()

2017-10-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ _

[issue30058] Buffer overflow in kqueue.control()

2017-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 9aa60245a0ff929e528b4521da7af20dacd4145b by Serhiy Storchaka in branch '2.7': [2.7] bpo-30058: Fixed buffer overflow in select.kqueue.control(). (GH-1095). (#3976) https://github.com/python/cpython/commit/9aa60245a0ff929e528b4521da7af20dacd414

[issue29762] Use "raise from None"

2017-10-12 Thread Pablo
Change by Pablo : -- pull_requests: +3954 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue31776] Missing "raise from None" in /Lib/xml/etree/ElementPath.py

2017-10-12 Thread Pablo
Change by Pablo : -- keywords: +patch pull_requests: +3953 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailin

[issue31776] Missing "raise from None" in /Lib/xml/etree/ElementPath.py

2017-10-12 Thread Pablo
Change by Pablo : -- title: Inconsistent exception chaining in /Lib/xml/etree/ElementPath.py -> Missing "raise from None" in /Lib/xml/etree/ElementPath.py ___ Python tracker __

[issue31776] Inconsistent exception chaining in /Lib/xml/etree/ElementPath.py

2017-10-12 Thread Pablo
New submission from Pablo : Based on bpo-29762 (https://github.com/python/cpython/commit/5affd23e6f42125998724787025080a24839266e), there is an inconsistency on one exception chain in /Lib/xml/etree/ElementPath.py: try: selector.append(ops[token[0]](next, token))

[issue31768] argparse drops '|'s when the arguments are too long

2017-10-12 Thread paul j3
paul j3 added the comment: I've changed your example a bit to clarify some points. parser.add_argument('n', type=int) group = parser.add_mutually_exclusive_group() group.add_argument("-v", "--verbose", action="store_true") group.add_argument("-q", "--quiet", action="store_true")

[issue30058] Buffer overflow in kqueue.control()

2017-10-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +3952 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue30058] Buffer overflow in kqueue.control()

2017-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset c923da188bc055e4f3001a6daf1caf54f2b10e40 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': [3.6] bpo-30058: Fixed buffer overflow in select.kqueue.control(). (GH-1095) (#3973) https://github.com/python/cpython/commit/c923da188bc055e4

[issue31772] SourceLoader uses stale bytecode in case of equal mtime seconds

2017-10-12 Thread Devin Bayer
Devin Bayer added the comment: Hello Brett, it would be nice if you would discuss this before closing. The referenced PEP will not solve my use case, because hash-based checking will not become the default. The issue is that by default the source file loader will be returning stale bytecode

[issue31768] argparse drops '|'s when the arguments are too long

2017-10-12 Thread paul j3
paul j3 added the comment: As documented in many other issues, the usage formatter is brittle. It formats the individual usages, joins them into a string. Then if too long to fit on one line it tries t split into actions, etc. This split produces an assertion error if there are 'wierd' char

[issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks

2017-10-12 Thread Catalin Patulea
Change by Catalin Patulea : -- nosy: +Catalin Patulea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue31640] Document exit() from parse_args

2017-10-12 Thread paul j3
paul j3 added the comment: And the actual exit is via `parse.error` and `parse.exit`, which are documented in 16.4.5.9. When run interactively in Ipython, exits (including the help) are captured and displayed with: In [896]: parser.parse_args() usage: ipython3 [-h] [--one | --two | --six] ip

[issue30058] Buffer overflow in kqueue.control()

2017-10-12 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +3951 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue30058] Buffer overflow in kqueue.control()

2017-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset de072100775cc29e6cd93a75466cecbd1086f258 by Serhiy Storchaka in branch 'master': bpo-30058: Fixed buffer overflow in select.kqueue.control(). (#1095) https://github.com/python/cpython/commit/de072100775cc29e6cd93a75466cecbd1086f258 --

[issue30767] logging must check exc_info correctly

2017-10-12 Thread Matthew Patton
Change by Matthew Patton : -- pull_requests: +3950 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue30058] Buffer overflow in kqueue.control()

2017-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I have tested it on FreeBSD, found and fixed one bug. -- assignee: -> serhiy.storchaka versions: -Python 3.5 ___ Python tracker ___ __

[issue31767] Windows Installer fails with error 0x80091007 when trying to install debugging symbols

2017-10-12 Thread Igor Skochinsky
Igor Skochinsky added the comment: Hi Steve, Thanks for the suggestion! I tried that and while it did not succeed it gave me an idea of what went wrong last time since it complained about lack of disk space. I have *not* run the /layout but now that I checked I indeed had core_d.msi and core_p

[issue31772] SourceLoader uses stale bytecode in case of equal mtime seconds

2017-10-12 Thread Brett Cannon
Brett Cannon added the comment: The problem with that is it will increase the number of stat calls which we have always tried to minimize due to performance worries. https://www.python.org/dev/peps/pep-0552/ has also been accepted which will take care of this specific case. So while I appreci

[issue31766] Python 3.5 missing from documentation

2017-10-12 Thread Ned Deily
Ned Deily added the comment: > Isn't Python 2.7 in Security Fix only as well ? No, 2.7 is still being actively maintained (until 2020). (https://devguide.python.org/#status-of-python-branches) But, bowing to popular demand, I've restored 3.5 to the switchers for 3.7, 3.6, and 2.7. It should

[issue31766] Python 3.5 missing from documentation

2017-10-12 Thread Ned Deily
Ned Deily added the comment: New changeset 356b68023d6fee5e30d25a4a680ac5b9e4f8dd65 by Ned Deily in branch '2.7': bpo-31766: restore 3.5 to docs version switchers (#3971) https://github.com/python/cpython/commit/356b68023d6fee5e30d25a4a680ac5b9e4f8dd65 -- ___

[issue31766] Python 3.5 missing from documentation

2017-10-12 Thread Ned Deily
Change by Ned Deily : -- pull_requests: +3949 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue31766] Python 3.5 missing from documentation

2017-10-12 Thread Ned Deily
Ned Deily added the comment: New changeset f8d42ea0e4341b270f1de71b4ff40cfa18420eed by Ned Deily in branch '3.6': bpo-31766: restore 3.5 to docs version switchers (#3970) https://github.com/python/cpython/commit/f8d42ea0e4341b270f1de71b4ff40cfa18420eed -- ___

[issue31766] Python 3.5 missing from documentation

2017-10-12 Thread Ned Deily
Change by Ned Deily : -- pull_requests: +3948 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue31766] Python 3.5 missing from documentation

2017-10-12 Thread Ned Deily
Ned Deily added the comment: New changeset b7cbfe49e39a7bbd7da20b937735a8a60bbf1872 by Ned Deily in branch 'master': bpo-31766: restore 3.5 to docs version switchers (#3969) https://github.com/python/cpython/commit/b7cbfe49e39a7bbd7da20b937735a8a60bbf1872 --

[issue31763] Add NOTICE level to the logging module

2017-10-12 Thread Matthew Patton
Matthew Patton added the comment: syslog(3) is cited in the code as inspiration and has been the goto definition for logging levels for 40 years across many, many projects. NOTICE is incredibly useful especially to those of us who are sysadmins. Why would Python not implement the full suite o

[issue31766] Python 3.5 missing from documentation

2017-10-12 Thread Ned Deily
Change by Ned Deily : -- keywords: +patch pull_requests: +3947 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list ma

[issue31761] regrtest: faulthandler.enable() fails with io.UnsupportedOperation: fileno when run from IDLE

2017-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See issue25588. Currently running tests from IDLE doesn't work, but it worked in the past and maybe we can make it working again. -- nosy: +serhiy.storchaka ___ Python tracker

[issue31766] Python 3.5 missing from documentation

2017-10-12 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. added the comment: The 3.5 docs should really remain in the main docs UI via the pulldown as long as it's so widely used. The fact that it won't be changing much just means it can be served efficiently. -- nosy: +fdrake ___ Pyth

[issue31766] Python 3.5 missing from documentation

2017-10-12 Thread Anthony Flury
Anthony Flury added the comment: Isn't Python 2.7 in Security Fix only as well ? It seems strange; Python 3.5 probably the most heavily installed Python 3 release (every Ubuntu installation has Python 3.5 installed by default - and neither Python 3.6 or 3.7 are available from the standard ubu

[issue31761] regrtest: faulthandler.enable() fails with io.UnsupportedOperation: fileno when run from IDLE

2017-10-12 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Closing this issue, I opened https://github.com/python/devguide/issues/280 so that Dev Guide can be updated. Thanks! -- nosy: +Mariatta resolution: -> not a bug stage: -> resolved status: open -> closed ___ Pyth

[issue31567] Inconsistent documentation around decorators

2017-10-12 Thread Éric Araujo
Éric Araujo added the comment: Cheers! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue31567] Inconsistent documentation around decorators

2017-10-12 Thread Éric Araujo
Éric Araujo added the comment: New changeset 205dd4e14de77f9c8ed2903ddebbcf9968bbb6a9 by Éric Araujo (Miss Islington (bot)) in branch '3.6': [3.6] bpo-31567: add or fix decorator markup in docs (GH-3959) (GH-3966) https://github.com/python/cpython/commit/205dd4e14de77f9c8ed2903ddebbcf9968bbb6a

[issue31567] Inconsistent documentation around decorators

2017-10-12 Thread Éric Araujo
Éric Araujo added the comment: New changeset 03b9537dc515d10528f83c920d38910b95755aff by Éric Araujo in branch 'master': bpo-31567: more decorator markup fixes in docs (GH-3959) (#3966) https://github.com/python/cpython/commit/03b9537dc515d10528f83c920d38910b95755aff --

[issue31770] crash and refleaks when calling sqlite3.Cursor.__init__() more than once

2017-10-12 Thread Oren Milman
Change by Oren Milman : -- keywords: +patch pull_requests: +3946 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue31775] Support unbuffered TextIOWrapper

2017-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What methods still require read1()? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue30767] logging must check exc_info correctly

2017-10-12 Thread Matthew Patton
Matthew Patton added the comment: I believe this diff addresses the failure of formatException() to check it's parameter's datatype. I still maintain this should be re-opened since it's guaranteed to raise an exception when someone sets 'exc_info=TruthyValue' in kwargs. albeit with a more foc

[issue31415] Add -X option to show import time

2017-10-12 Thread STINNER Victor
STINNER Victor added the comment: Ok, the feature was implemented, the Windows clock resolution was fixed as well. It's time to close this issue. If you still have concerns about import time, see open discussions on the python-dev mailing list, or open new issues ;-) Thanks again Naoki INADA

[issue31773] Rewrite _PyTime_GetWinPerfCounter() for _PyTime_t

2017-10-12 Thread STINNER Victor
STINNER Victor added the comment: New changeset cba9a0c6def70549046f1afa6a80e38fe706520e by Victor Stinner in branch 'master': bpo-31773: time.perf_counter() uses again double (GH-3964) https://github.com/python/cpython/commit/cba9a0c6def70549046f1afa6a80e38fe706520e --

[issue31773] Rewrite _PyTime_GetWinPerfCounter() for _PyTime_t

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

[issue31775] Support unbuffered TextIOWrapper

2017-10-12 Thread STINNER Victor
STINNER Victor added the comment: Context: I created this issue as a follow-up of the discussion on the -u command line option, bpo-28647, which still leaves sys.stdin *buffered* in the current master branch. -- ___ Python tracker

[issue31567] Inconsistent documentation around decorators

2017-10-12 Thread Berker Peksag
Berker Peksag added the comment: > That said, staticmethod as a non-decorator has an important use case for > function injection in tests (using self.func in TestCase classes that work > with > a C module and an equivalent Python version). Maybe this deserves an extra > example? Yes, that wou

[issue31775] Support unbuffered TextIOWrapper

2017-10-12 Thread STINNER Victor
STINNER Victor added the comment: > The falling back to read() was implemented in issue12591. What methods still > require read1()? I read the Python implementation of TextIOWrapper in _pyio: * seek() calls buffer.read() "if chars_to_skip:"... not sure that it can happen if buffer is a FileI

[issue28647] python --help: -u is misdocumented as binary mode

2017-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Hum, I propose to mention stdin in -u documentation as: "The option has no > effect on stdin." What do you think? This LGTM too. More precise, it has no effect on stdin buffering. It has effect on the line_buffering attribute, but this attribute has no ef

[issue28647] python --help: -u is misdocumented as binary mode

2017-10-12 Thread STINNER Victor
STINNER Victor added the comment: Serhiy: "I think there is no need to mention stdin in the context of the -u option at all. -u doesn't affect stdin buffering, whatever that would mean. Period." Hum, I propose to mention stdin in -u documentation as: "The option has no effect on stdin." What

[issue31775] Support unbuffered TextIOWrapper

2017-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The falling back to read() was implemented in issue12591. What methods still require read1()? -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue31767] Windows Installer fails with error 0x80091007 when trying to install debugging symbols

2017-10-12 Thread Steve Dower
Steve Dower added the comment: Can you try moving the installer exe to its own (empty) directory before running it? The correct file is on the server (I just redownloaded and verified), so the most likely cause is that you ran a /layout at some point in the past and are getting that file loc

[issue31775] Support unbuffered TextIOWrapper

2017-10-12 Thread STINNER Victor
STINNER Victor added the comment: Oh, currently it's not possible to create an unbuffered read-only TextIOWrapper object: haypo@selma$ python3 Python 3.6.2 (default, Oct 2 2017, 16:51:32) >>> open("/etc/issue", "r", 0) Traceback (most recent call last): File "", line 1, in ValueError: can

[issue31567] Inconsistent documentation around decorators

2017-10-12 Thread Éric Araujo
Éric Araujo added the comment: I think existing uses of the decorator markup rely on the reader’s understanding that it’s syntactic sugar for a call and an assignment, and they don’t have decorator+function markup. The PRs for this ticket follow that. That said, staticmethod as a non-decorat

[issue28647] python --help: -u is misdocumented as binary mode

2017-10-12 Thread STINNER Victor
STINNER Victor added the comment: > I think we need to document behavior of stdin somewhere, because current the > sys.stdin documentation states: > >> When interactive, standard streams are line-buffered. Otherwise, they >> are block-buffered like regular text files. You can override this valu

[issue31775] Support unbuffered TextIOWrapper

2017-10-12 Thread STINNER Victor
STINNER Victor added the comment: I created this issue because of this comment in create_stdio() of Python/pylifecycle.c: --- /* stdin is always opened in buffered mode, first because it shouldn't make a difference in common use cases, second because TextIOWrapper depends on t

[issue31567] Inconsistent documentation around decorators

2017-10-12 Thread Éric Araujo
Change by Éric Araujo : -- pull_requests: +3945 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue31775] Support unbuffered TextIOWrapper

2017-10-12 Thread STINNER Victor
New submission from STINNER Victor : It seems like that some methods of the io.TextIOWrapper class requires that its buffer object has the read1() method, whereas the constructor checks if the buffer has a read1() method and the TextIOWrapper _read_chunk() method is able to call buffer.read()

[issue28647] python --help: -u is misdocumented as binary mode

2017-10-12 Thread STINNER Victor
STINNER Victor added the comment: Interesting comment in create_stdio() of Python/pylifecycle.c: --- /* stdin is always opened in buffered mode, first because it shouldn't make a difference in common use cases, second because TextIOWrapper depends on the presence of a read1() m

[issue31490] assertion failure in ctypes in case an _anonymous_ attr appears outside _fields_

2017-10-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list ma

[issue24084] pstats: sub-millisecond display

2017-10-12 Thread STINNER Victor
STINNER Victor added the comment: > I concur with Victor. This change likely breaks graphical viewers of pstat > data. I propose to *do* break the format by always displaying percall timings with a precision of 6 digits. -- ___ Python tracker

[issue24084] pstats: sub-millisecond display

2017-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Victor. This change likely breaks graphical viewers of pstat data. How gprof and similar tools solve the problem of outputting sub-millisecond timings? -- ___ Python tracker

[issue24084] pstats: sub-millisecond display

2017-10-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- Removed message: https://bugs.python.org/msg304247 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue24084] pstats: sub-millisecond display

2017-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Victor. This change likely breaks graphical viewers of pstat data. How gprof and similar tools solve the problem of outputting sub-microsecond timings? -- nosy: +serhiy.storchaka ___ Python tracker

[issue31567] Inconsistent documentation around decorators

2017-10-12 Thread Berker Peksag
Berker Peksag added the comment: Use of classmethod and staticmethod decorators as functions is still a valid use case. I think the old signatures should be kept. It should be possible to document both uses in same place: .. function:: classmethod(function) .. decorator:: classmethod

[issue31761] regrtest: faulthandler.enable() fails with io.UnsupportedOperation: fileno when run from IDLE

2017-10-12 Thread Denis Osipov
Denis Osipov added the comment: Got it. Thank you for your help. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue31567] Inconsistent documentation around decorators

2017-10-12 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +3944 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue31490] assertion failure in ctypes in case an _anonymous_ attr appears outside _fields_

2017-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset fb3bb8d5d5d70acaaa0fdec15c137544fdd4463f by Serhiy Storchaka (Oren Milman) in branch '2.7': [2.7] bpo-31490: Fix an assertion failure in ctypes in case an _anonymous_ attr is defined only outside _fields_. (GH-3615) (#3952) https://github.com/

[issue31567] Inconsistent documentation around decorators

2017-10-12 Thread Éric Araujo
Éric Araujo added the comment: New changeset 0e61e67a57deb4abc677808201d7cf3c38138e02 by Éric Araujo (Daisuke Miyakawa) in branch 'master': bpo-31567: add or fix decorator markup in docs (#3959) https://github.com/python/cpython/commit/0e61e67a57deb4abc677808201d7cf3c38138e02 -- ___

[issue31773] Rewrite _PyTime_GetWinPerfCounter() for _PyTime_t

2017-10-12 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +3943 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue28647] python --help: -u is misdocumented as binary mode

2017-10-12 Thread Berker Peksag
Berker Peksag added the comment: > -u doesn't affect stdin buffering, whatever that would mean. I think we need to document behavior of stdin somewhere, because current the sys.stdin documentation states: > When interactive, standard streams are line-buffered. Otherwise, they > are block-buff

[issue31774] tarfile.open ignores custom bufsize value when creating a new archive

2017-10-12 Thread Charalampos Stratakis
New submission from Charalampos Stratakis : Trying to create an archive with the tarfile module, by specifying a different blocking factor, doesn't seem to work as only the default value is being used. The issue is reproducible on all the active python branches. Attaching a script to reproduce

[issue28647] python --help: -u is misdocumented as binary mode

2017-10-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: stdin is mentioned in the documentation of the -u option only due to weird internal buffering in Python 2, because user can expect that -u disables it. It is documented what methods use internal buffering and how get rid of it. No other buffering is mention

[issue31773] Rewrite _PyTime_GetWinPerfCounter() for _PyTime_t

2017-10-12 Thread STINNER Victor
New submission from STINNER Victor : The commit a997c7b434631f51e00191acea2ba6097691e859 of bpo-31415 moved the implementation of time.perf_counter() from Modules/timemodule.c to Python/pytime.c. The change not only moved the code, but also changed the internal type storing time from floatting

[issue30767] logging must check exc_info correctly

2017-10-12 Thread Matthew Patton
Matthew Patton added the comment: And the reason to stomp on the "Level " is because by not doing so the message that is a single field (regex/awk) has been converted non-deterministically into two. This is very bad behavior. If emitting the string/int as-is looks wrong then "Level(value)" or

[issue31772] SourceLoader uses stale bytecode in case of equal mtime seconds

2017-10-12 Thread Devin Bayer
Change by Devin Bayer : -- keywords: +patch pull_requests: +3941 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue28647] python --help: -u is misdocumented as binary mode

2017-10-12 Thread STINNER Victor
STINNER Victor added the comment: Serhiy Storchaka: https://github.com/python/cpython/pull/3961#issuecomment-336136160 "I suggest to continue the discussion on the tracker." Ok, let's continue here. "We are fixing the outdated documentation inherited from Python 2. First than keep some state

[issue31772] SourceLoader uses stale bytecode in case of equal mtime seconds

2017-10-12 Thread Devin Bayer
New submission from Devin Bayer : The current import machinery will use stale cached bytecode if the source is modified more than once per second and with equal size. A straightforward fix is to require the bytecode mtime to be greater than the source file mtime. In the unusual case where the

  1   2   >