[issue29062] hashlib documentation link error

2016-12-30 Thread INADA Naoki
INADA Naoki added the comment: May I commit merge-hashlib-blake2.patch to 3.6 branch? -- ___ Python tracker ___

[issue29119] Unintentional hard reference assignment in Python version of OrderedDict.move_to_end

2016-12-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'm leaving this for Andra Bogildea to work through and comment on. Testing is likely to be awkward at best. It would involve white box implementation specific steps like accessing the name managed variables and rotating through the doubly linked list

[issue29102] Add an id field to PyInterpreterState.

2016-12-30 Thread Nick Coghlan
Nick Coghlan added the comment: Yeah, I'm also fine with using int_fast64_t for the subinterpreter count. The only thing I'm really advocating for strongly on that front is that I think it makes sense to sacrifice the sign bit in the ID field as an error indicator that provides a more

[issue29119] Unintentional hard reference assignment in Python version of OrderedDict.move_to_end

2016-12-30 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file46099/od_proxy2a.diff ___ Python tracker ___

[issue28518] execute("begin immediate") throwing OperationalError

2016-12-30 Thread Ma Lin
Ma Lin added the comment: I have no idea about how to fix it, but I would like to suggest that add back this test which was removed in commit 284676cf2ac8 : file: /Lib/sqlite3/test/transactions.py def CheckVacuum(self): self.cur.execute("create table test(i)") self.cur.execute("insert

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2016-12-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Originally this issue was raised on StackOverflow: http://stackoverflow.com/questions/41388606/python-3-6-vs-3-5-typeerror-message-on-string-concatenation -- ___ Python tracker

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2016-12-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your patches Anthony. Could you please create a unittest for the first issue? The second issue is well known. Since the behavior is documented, I think it can be changed only in Python 3.7. The patch needs the "versionchanged" directives in

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2016-12-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Different cases accept different types. Not always we can say that only one specific type is accepted. "list +" accepts only lists, "list +=" is a syntax sugar for list.extend and accepts any iterables. "bytes +" and "bytearray +=" accept any objects that

[issue29059] Windows: Python not using ANSI compatible console

2016-12-30 Thread Glenn Linderman
Glenn Linderman added the comment: Re: curses... maybe that becomes a DOCS issue, to mention the available packages. But it would be easier, no doubt to port curses to a known existing escape sequence control set, than to use a bunch arcane, foreign-to-the-Unix-porter-that-wants-curses

[issue29119] Unintentional hard reference assignment in Python version of OrderedDict.move_to_end

2016-12-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Makes sense. Any chance to create tests? -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue29119] Unintentional hard reference assignment in Python version of OrderedDict.move_to_end

2016-12-30 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- priority: normal -> low Added file: http://bugs.python.org/file46098/od_proxy2.diff ___ Python tracker

[issue29119] Unintentional hard reference assignment in Python version of OrderedDict.move_to_end

2016-12-30 Thread Raymond Hettinger
New submission from Raymond Hettinger: The root.prev and first.prev assignments should use weak references rather than hard references. Spotted by Andra Bogildea. -- components: Library (Lib) files: od_proxy.diff keywords: patch messages: 284367 nosy: rhettinger priority: normal

[issue29102] Add an id field to PyInterpreterState.

2016-12-30 Thread Steve Dower
Steve Dower added the comment: I fully expect subinterpreters to have a serious role in long running applications like web servers or other agents (e.g. cluster nodes), so I'd rather just bite the bullet and take 64-bits now so that we can completely neglect reuse issues. Otherwise we'll find

[issue29059] Windows: Python not using ANSI compatible console

2016-12-30 Thread Steve Dower
Steve Dower added the comment: I suspect curses could be updated to fully support Windows, even without the VT100 mode (all the functionality has existed for years, just through a different interface). It really just needs someone to take on the project, and there are already better options

[issue29076] Py 3.6 Mac installer doesn't update "python3" shell command

2016-12-30 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- title: Python 3.6 installer doesn't update "python3" shell command -> Py 3.6 Mac installer doesn't update "python3" shell command ___ Python tracker

[issue29075] Remove Windows Vista support

2016-12-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: How certain are you that Vista support will actually end? Other things: assuming reasonable certainty, could the 3.6 installer say "This is the last version that will run on Vista!"? -- nosy: +terry.reedy ___

[issue29059] Windows: Python not using ANSI compatible console

2016-12-30 Thread Glenn Linderman
Glenn Linderman added the comment: Nice idea, but not by default. An easy way to switch back and forth, and to be sure the original mode is restored on process exit would be a win. Most windows users want a real GUI, not curses, but compatibility with VT escape codes for cross-platform

[issue29118] Randit

2016-12-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: Also, wherever you post, copy and paste the traceback instead of adding a link to an image. -- ___ Python tracker ___

[issue29118] Randit

2016-12-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: This issue has nothing to do with IDLE. There is also no bug here. Python's random module has a randint function that works fine. Either you or the book have misspelled 'randint' as 'randit' or the book is using its own random module and not the stdlib

[issue24932] Use proper command line parsing in _testembed

2016-12-30 Thread Nick Coghlan
Nick Coghlan added the comment: Steve's patch LGTM, and I now agree our needs are simple enough that we can rely on subprocess+unittest for the result reporting. I'd just missed Steve's simple solution of using the return code to indicate success or failure, as well as Eric's approach in

[issue24932] Use proper command line parsing in _testembed

2016-12-30 Thread Nick Coghlan
Changes by Nick Coghlan : -- title: Migrate _testembed to a C unit testing library -> Use proper command line parsing in _testembed ___ Python tracker

[issue29102] Add an id field to PyInterpreterState.

2016-12-30 Thread Nick Coghlan
Nick Coghlan added the comment: The concern I have with using an unsigned value as the interpreter ID is that it's applying the "NULL means an error" idiom or the "false means an error" idiom to a non-pointer and non-boolean return type, whereas the common conventions for integer return

[issue29118] Randit

2016-12-30 Thread Spacemage 33
New submission from Spacemage 33: I have a book with i can learn phyton but in the first Little game there is "from random import randit" and the book is for Phyton3 now it do not work im realy said about this please fix that -- assignee: terry.reedy components: IDLE files:

[issue29115] distutils.core.setup does not let people set 'bugtrack_url'.

2016-12-30 Thread Decorater
Decorater added the comment: In that case why does pypi.python.org not let me change that bug track url option or set it anymore? -- ___ Python tracker

[issue29105] code or doc improvement for logging.handlers.RotatingFileHandler

2016-12-30 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +vinay.sajip ___ Python tracker ___ ___

[issue29098] document minimum sqlite version

2016-12-30 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag ___ Python tracker ___ ___

[issue29107] traceback module incorrectly formats args-less syntax errors

2016-12-30 Thread Naftali Harris
Naftali Harris added the comment: Adding Georg, who is listed as an expert for the traceback module (https://docs.python.org/devguide/experts.html). -- nosy: +georg.brandl ___ Python tracker

[issue29107] traceback module incorrectly formats args-less syntax errors

2016-12-30 Thread Naftali Harris
Naftali Harris added the comment: For your convenience, here is a possible patch fixing these issues. It modifies the format_exception_only function in the traceback module to follow the behavior of the interpreter a little more closely for SyntaxError's. Feel free to use, in whole, in part,

[issue28612] str.translate needs a mapping example

2016-12-30 Thread Christopher Barker
Christopher Barker added the comment: This all came out of a thread on python-ideas, starting here: https://mail.python.org/pipermail/python-ideas/2016-October/043284.html the thread kind of petered out, but it seems there was a kinda-sorta consensus that we didn't need any new string methods,

[issue29102] Add an id field to PyInterpreterState.

2016-12-30 Thread Eric Snow
Eric Snow added the comment: Here's the updated patch. -- Added file: http://bugs.python.org/file46094/interpreter-id-2.diff ___ Python tracker ___

[issue29115] distutils.core.setup does not let people set 'bugtrack_url'.

2016-12-30 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I did some more research: setuptools didn't have this keyword either. It was added to PyPI at some point and then probably got picked up by some package authors as new "optional" keyword argument for setup():

[issue29115] distutils.core.setup does not let people set 'bugtrack_url'.

2016-12-30 Thread Berker Peksag
Berker Peksag added the comment: Again, this is not a distutils bug and it has already been reported to the setuptools maintainers: https://github.com/pypa/setuptools/issues/29 Quoting from the original report: > Currently setuptools.dist.Distribution passes the unfiltered collection > of

[issue29102] Add an id field to PyInterpreterState.

2016-12-30 Thread Eric Snow
Eric Snow added the comment: > What do you think about resetting the counter back to 1 in Py_Initialize? Sounds good to me. When I was working on the patch I had the idea in the back of my mind that not resetting the counter would better support interpreter separation efforts in the future.

[issue29115] distutils.core.setup does not let people set 'bugtrack_url'.

2016-12-30 Thread Decorater
Decorater added the comment: Except for the setup function, yeah. https://github.com/pypa/setuptools/blob/master/setuptools/__init__.py#L112 -- ___ Python tracker

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2016-12-30 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Should that message be the one predominantly used for sequences, i.e: TypeError: can only concatenate class1 (not "class2") to class1 or should another one be used like "Unsupported operand type(s) for op: 'class1' and 'class2'? The first is

[issue29117] dir() should include dunder attributes of the unbound method

2016-12-30 Thread Antony Lee
New submission from Antony Lee: ``` Python 3.5.2 (default, Nov 7 2016, 11:31:36) [GCC 6.2.1 20160830] on linux Type "help", "copyright", "credits" or "license" for more information. >>> class C: ... def f(self): pass ... >>> C.f.attr = 42 >>> print(dir(C.f)) ['__annotations__',

[issue29115] distutils.core.setup does not let people set 'bugtrack_url'.

2016-12-30 Thread R. David Murray
R. David Murray added the comment: Except that setuptools monkey patches distutiles all over the place. So no, it isn't the same at all. -- nosy: +r.david.murray ___ Python tracker

[issue29115] distutils.core.setup does not let people set 'bugtrack_url'.

2016-12-30 Thread Decorater
Decorater added the comment: So basically what from setuptools import setup is really doing is the same as doing from distutils.core import setup -- ___ Python tracker

[issue29115] distutils.core.setup does not let people set 'bugtrack_url'.

2016-12-30 Thread Decorater
Decorater added the comment: The problem with setuptools on that is that they export their setup like so which uses the distutils setup by doing: setup = distutils.core.setup. That is how they are doing it. -- ___ Python tracker

[issue28612] str.translate needs a mapping example

2016-12-30 Thread Gaurav Tatke
Gaurav Tatke added the comment: Should a user be suggested to use str.translate() for the use case where user only wants to keep certain characters and strip off everything else? -- ___ Python tracker

[issue28612] str.translate needs a mapping example

2016-12-30 Thread Gaurav Tatke
Gaurav Tatke added the comment: Hi, Pardon my ignorance, I am new to this but have below queries/thoughts - 1. Why would we say that adding new keys during lookup phase is an unpleasant side-effect? From what I understood by docs, one of the main reasons to use defaultdicts is to be able to

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2016-12-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Old error message is misleading. It implied that there are objects that can be converted to str implicitly. This was true in Python 2, but is false in Python 3. New error message conforms with TypeError messages produced by PyArg_Parse*(). It is the same

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2016-12-30 Thread Jim Fasarakis-Hilliard
New submission from Jim Fasarakis-Hilliard: Specifically, bytes (always, from what I could find) had this error message: >>> b'' + '' TypeError: can't concat bytes to str while str, after a change in issue26057, was made to: >>> '' + b'' TypeError: must be str, not bytes from

[issue29107] traceback module incorrectly formats args-less syntax errors

2016-12-30 Thread Naftali Harris
Naftali Harris added the comment: Two other minor discrepancies between the way traceback and the interpreter format SyntaxError's, in 2.7.13: 1. >>> e = SyntaxError("some message", ("myfile.py", None, None, None)) >>> raise e Traceback (most recent call last): File "", line 1, in

[issue24932] Migrate _testembed to a C unit testing library

2016-12-30 Thread Steve Dower
Steve Dower added the comment: The only real advantage of adding a native unit testing framework here is to avoid having to start/destroy _testembed[.exe] multiple times during the test run. But given the nature of these tests is highly environmental, I don't think we can reasonably avoid it.

[issue29103] Make enum.py pep8 compliant

2016-12-30 Thread Ethan Furman
Ethan Furman added the comment: Thanks Raymond and Jean-Sebastien. -- ___ Python tracker ___ ___

[issue29114] __class__ not exists in the method which bounded by types.MethodType.

2016-12-30 Thread Nick Coghlan
Nick Coghlan added the comment: Sorry, I wasn't at all clear about that part - the above techniques should work with explicitly created types.MethodType instances as well. That is, this should work the same as in my earlier examples (although I don't have that interpreter session around to

[issue29102] Add an id field to PyInterpreterState.

2016-12-30 Thread Steve Dower
Steve Dower added the comment: > Wouldn't this break the main property of IDs, the uniqueness? If we bump it up to a 64-bit ID then it'll be no worse than how we track all dict mutations. -- ___ Python tracker

[issue29114] __class__ not exists in the method which bounded by types.MethodType.

2016-12-30 Thread lanf0n
lanf0n added the comment: thanks xiang, Nick, I might misunderstood MethodType to bound method will work as class definition. It might not good to enhance MethodType to work as class definition, same problem on patching method to a class as Nick explained. --

[issue29115] distutils.core.setup does not let people set 'bugtrack_url'.

2016-12-30 Thread Berker Peksag
Berker Peksag added the comment: Marc-Andre is correct. bugtrack_url is a distribute/setuptools specific option. Please report your problem to them. -- nosy: +berker.peksag resolution: -> not a bug stage: -> resolved status: open -> closed ___

[issue29102] Add an id field to PyInterpreterState.

2016-12-30 Thread Nick Coghlan
Nick Coghlan added the comment: It depends on the scope of uniqueness we're after. `threading._counter()` (which is the small-integer-ID debugging counter for threading.Thread names) is a module global in the threading module, so an Initialize/Finalize cycle will reset it. If we wanted to

[issue29115] distutils.core.setup does not let people set 'bugtrack_url'.

2016-12-30 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I believe you need to report this problem to the setuptools maintainers. The stdlib distutils itself never defined a setup() argument 'bugtrack_url', so raises a warning when seeing this argument. -- nosy: +lemburg

[issue29114] __class__ not exists in the method which bounded by types.MethodType.

2016-12-30 Thread Nick Coghlan
Nick Coghlan added the comment: Right, this isn't actually a bug, it just requires a bit more creativity to bind and resolve `__class__` correctly when defining the replacement method. Here's what happens normally with zero-argument super(): >>> class A: ... def f(self): ...

[issue29102] Add an id field to PyInterpreterState.

2016-12-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > What do you think about resetting the counter back to 1 in Py_Initialize? Wouldn't this break the main property of IDs, the uniqueness? -- ___ Python tracker

[issue29102] Add an id field to PyInterpreterState.

2016-12-30 Thread Nick Coghlan
Nick Coghlan added the comment: +1 from me for the general idea. One subtlety with the draft implementation is that an Initialize/Finalize cycle doesn't reset the counter, which: 1. Increases the chance of counter overflow (while admittedly still leaving it incredibly low) 2. Means you still

[issue29111] Strange signature for memoryview constructor

2016-12-30 Thread Stefan Krah
Changes by Stefan Krah : -- assignee: -> skrah resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue29111] Strange signature for memoryview constructor

2016-12-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1e1e24629218 by Stefan Krah in branch '3.5': Issue #29111: Fix memoryview signature. https://hg.python.org/cpython/rev/1e1e24629218 -- nosy: +python-dev ___ Python tracker

[issue29097] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6

2016-12-30 Thread Ammar Askar
Changes by Ammar Askar : Added file: http://bugs.python.org/file46092/truncate_negatives.patch ___ Python tracker ___

[issue29097] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6

2016-12-30 Thread Ammar Askar
Ammar Askar added the comment: I've attached two patches that fix this behavior, one by simply foregoing the fold detection for this time range on windows (the patch that I'd argue is simpler and more readable) And one that truncates the passed values to local to not be negative. This one

[issue28816] Document if zipimport can respect import hooks to load custom files from zip.

2016-12-30 Thread Decorater
Decorater added the comment: OK, Well I just tested and it sadly don't support import hooks that adds support for importing custom file types or file types python does know about with a uncommon extension inside of zip files which is somewhat sad. However if someone was to do something

[issue29111] Strange signature for memoryview constructor

2016-12-30 Thread Stefan Krah
Stefan Krah added the comment: The patch seems to fix it. $module was a thing at some point, I don't know whether the semantics changed or if it was wrong in the first place. -- keywords: +patch Added file: http://bugs.python.org/file46089/issue29111.diff

[issue29115] distutils.core.setup does not let people set 'bugtrack_url'.

2016-12-30 Thread Decorater
New submission from Decorater: So, I could have an example setup.py which sets a bugtrack url however using sdist and bdist_wheel on them produces this warning: H:\Python\Python360\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg) The

[issue29061] secrets.randbelow(-1) hangs

2016-12-30 Thread Steven D'Aprano
Steven D'Aprano added the comment: > _randbelow is a private api and it is not broken, it is just being > misused by the secrets module. "Misused" seems a bit strong. Should I understand that you dislike the wrapper around _randbelow? The implementation was given in the PEP, and I don't