[issue33053] Avoid adding an empty directory to sys.path when running a module with `-m`

2018-03-17 Thread Nick Coghlan
Nick Coghlan added the comment: I've also separated out https://bugs.python.org/issue33095 (a docs issue about making isolated mode more discoverable) based on the jwilk's comment that it wasn't clear how to disable the default "add the current directory to sys.path"

[issue33095] Cross-reference isolated mode from relevant locations

2018-03-17 Thread Nick Coghlan
New submission from Nick Coghlan : In https://bugs.python.org/issue33053#msg313966, jwilk noted that it isn't obvious from https://docs.python.org/3/using/cmdline.html#cmdoption-m how to keep the current directory from being added to `sys.path` when using the -m switch.

[issue33053] Avoid adding an empty directory to sys.path when running a module with `-m`

2018-03-17 Thread Nick Coghlan
Nick Coghlan added the comment: Also, a small upstream community interaction tip: if you want people to seriously consider your requests for changes in default behaviour (which inevitably risk backwards compatibility breaks), don't start out by insulting them. Python's

[issue33053] Avoid adding an empty directory to sys.path when running a module with `-m`

2018-03-17 Thread Nick Coghlan
Nick Coghlan added the comment: This isn't considered a security issue, as running "python3" interactively behaves in exactly the same way (i.e. tracking changes to the current working directory for the duration of the session), and running "python3 script.py" adds the

[issue33094] dataclasses: ClassVar attributes are not working properly

2018-03-17 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> eric.smith nosy: +eric.smith ___ Python tracker ___

[issue33014] Clarify str.isidentifier docstring; fix keyword.iskeyword docstring

2018-03-17 Thread R. David Murray
R. David Murray added the comment: For the original report that this issue was opened for: Use keyword.iskeyword() to test for reserved identifiers such as "def" and "class". The obvious replacement is: Use the iskeyword() function from the keyword module to

[issue27645] Supporting native backup facility of SQLite

2018-03-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +5895 ___ Python tracker ___

[issue27645] Supporting native backup facility of SQLite

2018-03-17 Thread Berker Peksag
Berker Peksag added the comment: New changeset bbf7bb7a636b3112ef6f6b31df385606d52517ce by Berker Peksag (Aviv Palivoda) in branch 'master': bpo-27645: Fix version number in 'database in transaction' fallback (GH-6131)

[issue33094] dataclasses: ClassVar attributes are not working properly

2018-03-17 Thread Adrian Stachlewski
New submission from Adrian Stachlewski : Class variables should behave in the same way whether with or without ClassVar annotation. Unfortunately there are not. class A: __slots__ = () x: ClassVar = set() A() # it's ok @dataclass class B: __slots__

[issue21018] [patch] added missing documentation about escaping characters for configparser

2018-03-17 Thread Arun Persaud
Arun Persaud added the comment: created github PR #6137. Hope everything is in the correct format. Arun -- ___ Python tracker

[issue21018] [patch] added missing documentation about escaping characters for configparser

2018-03-17 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +5894 ___ Python tracker ___

[issue27069] webbrowser creates zombi processes in the background mode

2018-03-17 Thread Martin Panter
Martin Panter added the comment: It does look similar. They probably could be merged. The main difference is in Issue 5993 Eivind suggested to somehow use a “wait” system call, while here Victor suggested “fork” (perhaps to orphan a grandchild process?). --

[issue33081] multiprocessing Queue leaks a file descriptor associated with the pipe writer

2018-03-17 Thread Henrique Andrade
Henrique Andrade added the comment: Here is the repro (I am running this on Ubuntu 16 with the stock Python version 2.7.12): #!/usr/bin/env python import os

[issue32949] Simplify "with"-related opcodes

2018-03-17 Thread Mark Shannon
Mark Shannon added the comment: We have two competing PRs for this issue. Again. For comparison, using the same micro-benchmark, PR 5112 has these timings: Master branch: Mean +- std dev: 252 ns +- 4 ns PR 5112: Mean +- std dev: 216 ns +- 4 ns --

[issue33057] logging.Manager.logRecordFactory is never used

2018-03-17 Thread Vinay Sajip
Vinay Sajip added the comment: > However, it seems that someone already thought about it before and started > implementing this mechanism That someone was me. I decided that a single module-level factory was good enough but failed to delete the things you noticed.

[issue3692] improper scope in list comprehension, when used in class declaration

2018-03-17 Thread Simon Charette
Simon Charette added the comment: I stumble upon this bug when porting a Python 2 codebase to 3 and suddenly got a NameError for the following code. class Foo: a = [1,2,3] b = [4,5,6] c = [x * y for x in a for y in b] NameError: name 'b'

[issue32958] socket module calls with long host names can fail with idna codec error

2018-03-17 Thread R. David Murray
Change by R. David Murray : -- nosy: +r.david.murray ___ Python tracker ___ ___

[issue33047] "RuntimeError: dictionary changed size during iteration" using trace.py module

2018-03-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thank you for the improved example. From Command Prompt, I now see f:\dev\37>python -m trace -c f:/python/a/tem2.py Running Debug|Win32 interpreter... Traceback (most recent call last): File "f:\dev\37\lib\runpy.py", line 193, in

[issue32829] Lib/ be more pythonic

2018-03-17 Thread R. David Murray
R. David Murray added the comment: The risk of introducing a bug is higher than the minimal benefit of making the changes. Thus we do not typically accept changes like this. We'll clean up such code when we touching it for other reasons. -- nosy:

[issue33093] Fatal error on SSL transport

2018-03-17 Thread Eric Toombs
New submission from Eric Toombs : I'm not exactly sure what caused this error, but I was a client receiving messages on a websocket for a while (about 12 hours). Suddenly all incoming data stopped, then nothing happened for about 5 hours. Finally, I received a

[issue33069] Maintainer information discarded when writing PKG-INFO

2018-03-17 Thread Paul Ganssle
Paul Ganssle added the comment: I've fixed this in setuptools ( PR here: https://github.com/pypa/setuptools/pull/1294 ). Should we leave this open to track distutils upgrading to support all of PEP 345, or close this with "distutils will never support > 1.1". If the

[issue33042] New 3.7 startup sequence crashes PyInstaller

2018-03-17 Thread Nick Coghlan
Nick Coghlan added the comment: This shouldn't affect the public ABI, so I don't think it's a blocker for the ABI freeze, but it's a regression that effectively makes PySys_AddWarnOption (and related APIs) unusable, so we should definitely fix it before shipping 3.7. For

[issue33034] urllib.parse.urlparse and urlsplit not raising ValueError for bad port

2018-03-17 Thread Matt Eaton
Matt Eaton added the comment: Yes, my goal for the patch was to provide a more explicit error message for this situation and to provide a low surface area change to the overall source, knowing that there are future development goals and backward compatibility to keep

[issue33092] The bytecode for f-string formatting is inefficient.

2018-03-17 Thread Mark Shannon
Mark Shannon added the comment: Even if doesn't speed things up by a significant amount, I would suggest that a simper interpreter with smaller, simpler bytecodes is a worthy goal in itself. -- ___ Python tracker

[issue33092] The bytecode for f-string formatting is inefficient.

2018-03-17 Thread Mark Shannon
Change by Mark Shannon : -- keywords: +patch pull_requests: +5893 stage: -> patch review ___ Python tracker ___

[issue33047] "RuntimeError: dictionary changed size during iteration" using trace.py module

2018-03-17 Thread Adrien
Adrien added the comment: Thanks for your attention to this issue. I am not surprised that you was not able to reproduce it as it seems deeply related to multiprocessing and threads. I tested it on 3 others completely different computers, and I was able to reproduce

[issue33034] urllib.parse.urlparse and urlsplit not raising ValueError for bad port

2018-03-17 Thread Jonathan
Jonathan added the comment: Thanks for the thoughts. If only the exception message changes, that doesn't really address the issue that caused me to raise this - namely that it seems to be inconsistent with how almost every other Python builtin function I've used

[issue33092] The bytecode for f-string formatting is inefficient.

2018-03-17 Thread Eric V. Smith
Eric V. Smith added the comment: Would this change really have a performance impact? Not saying it wouldn't, but if we're going to add bytecodes we should know the answer in advance. -- nosy: +eric.smith ___ Python tracker

[issue33092] The bytecode for f-string formatting is inefficient.

2018-03-17 Thread Mark Shannon
New submission from Mark Shannon : f-string expressions can be formatted in four ways: with or without a conversion and with or without a format specifier Rather than have one bytecode that parses the opcode argument at runtime it would be more efficient and produce a

[issue33034] urllib.parse.urlparse and urlsplit not raising ValueError for bad port

2018-03-17 Thread Matt Eaton
Matt Eaton added the comment: This is a very good point, Eric. For backwards compatibility we would have to set the default parameter to false, so we be in the same state we are today by default. Knowing this my vote would be to go with the improvements to the

[issue33034] urllib.parse.urlparse and urlsplit not raising ValueError for bad port

2018-03-17 Thread Eric V. Smith
Eric V. Smith added the comment: For backward comparability, option C would have to default to not raising an exception. Which would limit it's usefulness, but that's the way it goes. -- ___ Python tracker

[issue32911] Doc strings no longer stored in body of AST

2018-03-17 Thread Mark Shannon
Mark Shannon added the comment: I still think that option 2 would be best, but given that it is late in the release cycle, I will accept the status quo. A couple of comments for the record: Constant folding occurs after AST creation, so doesn't make the AST worse. The parse

[issue33034] urllib.parse.urlparse and urlsplit not raising ValueError for bad port

2018-03-17 Thread Matt Eaton
Matt Eaton added the comment: One more question I would raise based upon a point made earlier by Eric is if option C would be too large of a change for 3.8? Any thoughts on this? -- ___ Python tracker

[issue27645] Supporting native backup facility of SQLite

2018-03-17 Thread Lele Gaifax
Lele Gaifax added the comment: Thank you Berker, I'm sorry I could not find the time to investigate the problem by myself. -- ___ Python tracker

[issue27645] Supporting native backup facility of SQLite

2018-03-17 Thread Aviv Palivoda
Aviv Palivoda added the comment: The problem is that change https://www.sqlite.org/src/info/169b5505498c0a7e was part of sqlite version 3.8.8 I opened a PR with a fix. -- ___ Python tracker

[issue27645] Supporting native backup facility of SQLite

2018-03-17 Thread Aviv Palivoda
Change by Aviv Palivoda : -- pull_requests: +5892 ___ Python tracker ___ ___

[issue33091] ssl.SSLError: Invalid error code (_ssl.c:2217)

2018-03-17 Thread Christian Heimes
Christian Heimes added the comment: Steve, this sounds like a duplicate of #32533. -- assignee: christian.heimes -> steve.dower nosy: +steve.dower ___ Python tracker

[issue33086] pip: IndexError

2018-03-17 Thread Berker Peksag
Berker Peksag added the comment: The OP has also asked this on Stack Overflow: https://stackoverflow.com/questions/49329079/distutils-indexerror-tuple-index-out-of-range The problem was that they were passing a tuple to the url field. -- nosy: +berker.peksag

[issue27645] Supporting native backup facility of SQLite

2018-03-17 Thread Berker Peksag
Berker Peksag added the comment: FYI, I will have some time to debug the test failure this weekend. If I (or Lele or someone else) can't find the problem by Monday, I'm going to revert the patch from 3.7 branch (and probably from master too) --

[issue32421] Keeping an exception in cache can segfault the interpreter

2018-03-17 Thread Yonatan Zunger
Yonatan Zunger added the comment: Apologies -- I've been completely swamped and haven't had time to build a repro case. I don't think I have enough state on the way I found this to reconstruct it easily right now, so I'll close it and re-open if I find it again. --

[issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL

2018-03-17 Thread miss-islington
miss-islington added the comment: New changeset 1da0479f687613a43620430616f4db87e2ed4423 by Miss Islington (bot) in branch '3.6': bpo-32374: m_traverse may be called with m_state=NULL (GH-5140)

[issue32374] Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL

2018-03-17 Thread miss-islington
miss-islington added the comment: New changeset 136905fffd5f77395f80e3409630c11756b5469c by Miss Islington (bot) in branch '3.7': bpo-32374: m_traverse may be called with m_state=NULL (GH-5140)

[issue33047] "RuntimeError: dictionary changed size during iteration" using trace.py module

2018-03-17 Thread pmpp
Change by pmpp : -- nosy: +pmpp ___ Python tracker ___ ___ Python-bugs-list mailing list