[issue27096] Ability to get random bytes from random.Random (as with os.urandom)

2016-05-23 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue27096] Ability to get random bytes from random.Random (as with os.urandom)

2016-05-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: $ ./python -m timeit -s 'from os import urandom' 'urandom(100)' 10 loops, best of 3: 132 msec per loop $ ./python -m timeit -s 'from random import getrandbits' 'n = 100; getrandbits(n*8).to_bytes(n, "little")' 100 loops, best of 3: 14.1 msec per loop

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Further churning of the names will cause more harm than good. I recommend closing this (to end the bike-shedding and the stream of superlatives from the OP). This ship has sailed and users are already relying on the published API. Foord: "In the absence o

[issue26647] ceval: use Wordcode, 16-bit bytecode

2016-05-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, I forgot to add a note in What's New. And the documentation of the dis module should be updated (EXTENDED_ARG etc). Could anyone do this? -- stage: commit review -> needs patch ___ Python tracker

[issue27097] ceval: Wordcode follow up, explicit unsigned short read

2016-05-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: -> patch review Added file: http://bugs.python.org/file42964/ushort.patch ___ Python tracker ___

[issue27097] ceval: Wordcode follow up, explicit unsigned short read

2016-05-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue26647] ceval: use Wordcode, 16-bit bytecode

2016-05-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3a57eafd8401 by Serhiy Storchaka in branch 'default': Issue #26647: Python interpreter now uses 16-bit wordcode instead of bytecode. https://hg.python.org/cpython/rev/3a57eafd8401 -- ___ Python tracker <

[issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error

2016-05-23 Thread Nick Coghlan
Nick Coghlan added the comment: As Jonathan notes, the cause for confusion here is that we currently retrieve the attributes in the opposite order from the way we execute them, prompting the "Why is it looking for __exit__ first?", "Oh, __enter__ must be optional, so it didn't care that it was

[issue7159] Urllib2 authentication memory.

2016-05-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Should this be closed? A substantial patch was pushed year ago and I see no indication of further issue. -- nosy: +terry.reedy ___ Python tracker _

[issue27095] Simplify MAKE_FUNCTION

2016-05-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: At first look your patch looks good (I'll make more detailed review later), but you should wait until we have finished all work related to the conversion to wordcode. -- ___ Python tracker

[issue27093] Silence warning in cjkcodecs.h

2016-05-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3732828f2835 by Benjamin Peterson in branch '3.5': fix indentation and add curlies (closes #27093) https://hg.python.org/cpython/rev/3732828f2835 New changeset f0438e1a4761 by Benjamin Peterson in branch '2.7': fix indentation and add curlies (close

[issue27098] Pickle of memoryview not raising error

2016-05-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This was fixed in issue22995. Please wait 3.5.2. -- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error

2016-05-23 Thread Benjamin Peterson
Benjamin Peterson added the comment: I don't completely understand. If you get an AttributeError for __enter__, will you think only an __enter__ is required? -- nosy: +benjamin.peterson ___ Python tracker

[issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error

2016-05-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Nick, I've seen the come-up several times with people learning about context managers. The current error message seems cause confusion because it checks for __exit__ before __enter__, implying that the __enter__ is optional which it isn't. Do you have an

[issue27101] Compilation of python (modules) for foreign target platform problem.

2016-05-23 Thread Petr Ovtchenkov
New submission from Petr Ovtchenkov: Compilation of python for foreign target platform problem. Host arch is x86_64, target arch is arm (arm32). Configuration is (target arch part): (cd build-python && \ DESTDIR=${SYSROOT} \ PKG_CONFIG=true \ LIBFFI_INCLUDEDIR=

[issue26955] Implement equivalent to `pip.locations.distutils_scheme` in distutils

2016-05-23 Thread Ned Deily
Ned Deily added the comment: Sylvain, OK. I suggest you bring the matter up on the distutils-sig mailing list (if you haven't already) because that's where discussions and decisions are made about features for Python packaging including distutils. Otherwise, the issue is likely to languish h

[issue26971] python v3.5.1: sys.paths not respecting DESTDIRS and DESTSHARED

2016-05-23 Thread Ned Deily
Ned Deily added the comment: That's very odd! I don't have a SuSE system available to test with but it is not clear to me why that would have different behavior because where the standard library extension modules directory (lib-dynload) is installed is controlled by the Python configure and

[issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error

2016-05-23 Thread Xiang Zhang
Xiang Zhang added the comment: This seems to be designed. From PEP343 it tells clearly: If either of the relevant methods are not found as expected, the interpreter will raise AttributeError, in the order that they are tried (__exit__, __enter__). But currently I don't find out why.

[issue27099] IDLE: turn builting extensions into regular modules

2016-05-23 Thread Ned Deily
Ned Deily added the comment: I don't have an opinion on the matter, other than a reminder about the current cross-version (and cross-platform) compatibility issues with a user's IDLE configuration files as alluded to in Issue20580. Perhaps others more familiar with IDLE's internals would have

[issue24225] Idlelib: changing file names

2016-05-23 Thread Ned Deily
Ned Deily added the comment: > Ned, do you want me to post the patches first? Terry, at this stage of the release cycle, I think that's up to you and whether you want someone to do a code review prior to pushing upstream. Since this sounds like a fairly major change, though, it might be the p

[issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error

2016-05-23 Thread Jonathan Ellington
New submission from Jonathan Ellington: Attempting to use class that has both __exit__() and __enter__() undefined as a context manager yields an AttributeError referring to __exit__: >>> class A(): ... pass ... >>> with A(): ... pass ... Traceback (most recent call last): File "", li

[issue27098] Pickle of memoryview not raising error

2016-05-23 Thread Xiang Zhang
Xiang Zhang added the comment: I cannot reproduce this. Pickling memoryview objects works well on my OS. Python 3.5.1+ (default, Mar 30 2016, 22:46:26) [GCC 5.3.1 20160330] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import pickle >>> mv = memoryview(b'12

[issue23990] Callable builtin doesn't respect descriptors

2016-05-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ionel, 8 core developers (an unusually large number for a tracker issue) have posted here and the closest thing to a consensus is that this is an enhancement request. Beyond that, opinions are scattered. No one is going to commit a patch in this circumstance

[issue24225] Idlelib: changing file names

2016-05-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: 'De-extensionizing' issue is #27099. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue27099] IDLE: turn builting extensions into regular modules

2016-05-23 Thread Terry J. Reedy
New submission from Terry J. Reedy: Followup to #24225, which renamed idlelib files. Currently, an arbitrary set of 9 (of 10, if Check Module is counted as a separate feature) IDLE features are implemented as extensions. Their menu names are as follows: Edit - Show Completions Edit - Expa

[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

2016-05-23 Thread Colm Buckley
Colm Buckley added the comment: @haypo - just wondering where things stand with this? Is this patch going to get pushed to the mainline? -- ___ Python tracker ___ __

[issue27099] IDLE: turn builting extensions into regular modules

2016-05-23 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- dependencies: +Idlelib: changing file names ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue24225] Idlelib: changing file names

2016-05-23 Thread Terry J. Reedy
Terry J. Reedy added the comment: I have privately committed 3 patches. Patch 1 is a renaming patch equivalent to Al's 2 renaming patches. Patch 2 updates filesnames within code, equivalent to Al's third patch. At this point, 'python -m test.test_idle' ran with all 188 test_methods passing.

[issue27098] Pickle of memoryview not raising error

2016-05-23 Thread Memeplex
New submission from Memeplex: In [1]: mv = memoryview(b'123') In [2]: mv.__reduce__() TypeError: can't pickle memoryview objects But then: In [3]: pickle.dumps(mv) b'\x80\x03cbuiltins\nmemoryview\nq\x00)\x81q\x01.' Even worse: In [4]: pickle.loads(pickle.dumps(mv)) TypeError: Requ

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-23 Thread Michael Felt
Michael Felt added the comment: A bug was found, and has been corrected - but I am unclear on how to best submit the differences. Editing the current "review" code is not a good idea, as there are many differences. Please recommend correct course of action. p.s. I will have also removed the

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread Vitaly
Vitaly added the comment: assertSequenceEqualUnordered is not a good fit, because it doesn't follow the de facto naming convention, whereby "Equal" should be the suffix. Also assertSequenceEqualUnordered would be considered an oxymoron, since the word "Sequence" implies ordered, while "Unorder

[issue27093] Silence warning in cjkcodecs.h

2016-05-23 Thread Demur Rumed
Changes by Demur Rumed : -- components: +Extension Modules ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue27097] ceval: Wordcode follow up, explicit unsigned short read

2016-05-23 Thread Demur Rumed
New submission from Demur Rumed: Attached is a patch based off #26647 which converts ceval to read opcode/oparg by casting next_instr to an unsigned short. I don't believe we need to complicate the code with checking the pointer alignment of the instruction stream; some effort must be gone thr

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: assertSequenceEqualUnordered also works R. David. I was going to suggest that as well but edited it out to keep my suggestion simpler. :) I don't like the assertMultisetEqual suggestion as this is most notably an api having nothing to do with sets. #bikesh

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread Martin Panter
Martin Panter added the comment: assertMultisetEqual? -- nosy: +martin.panter ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue27096] Ability to get random bytes from random.Random (as with os.urandom)

2016-05-23 Thread Campbell Barton
Campbell Barton added the comment: @r.david.murray, yes, this avoids list creation, but is still quite slow. To create 1mb of data, you can compare the following: python -m timeit -s 'from os import urandom' 'print(len(urandom(100)))' python -m timeit -s 'from random import randint

[issue27095] Simplify MAKE_FUNCTION

2016-05-23 Thread Demur Rumed
Demur Rumed added the comment: Attached are modifications to the patch based on feedback from Nikita. It produces a larger patch tho. The changes are to combine return branches in compiler_make_closure & to combine code between compiler_function & compiler_lambda into compiler_default_argument

[issue27096] Ability to get random bytes from random.Random (as with os.urandom)

2016-05-23 Thread R. David Murray
R. David Murray added the comment: It seems reasonable to me, but I'm not the one to sign off on something like this. I've nosied someone who will have an opinion :) Would doing: mybytes = bytes(random.randint(0, 255) for i in range(size)) be faster enough to be workable? I suppose that

[issue27096] Ability to get random bits from random.Random (as with os.urandom)

2016-05-23 Thread Campbell Barton
Campbell Barton added the comment: Correction, meant to write: random.randbytes(n). -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue27096] Ability to get random bits from random.Random (as with os.urandom)

2016-05-23 Thread Campbell Barton
New submission from Campbell Barton: Currently, getting random bits can be done with os.urandom, However recently I was faced with having to make a test (with reproducible behavior), so I needed to replace os.urandom with a random generator that took a seed value. It turns out there are 3 way

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread R. David Murray
R. David Murray added the comment: how about assertSequenceEqualUnordered -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: assertUnorderedSequenceEqual would make more sense to me given the natural relation to assertSequenceEqual. We aren't dealing with sets (though sets are valid sequences) as this method specifically does not require sequence items to be hashable. Explicitly

[issue23990] Callable builtin doesn't respect descriptors

2016-05-23 Thread Graham Dumpleton
Graham Dumpleton added the comment: If someone is going to try and do anything in the area of better proxy object support, I hope you will also look at all the work I have done on that before for wrapt (https://github.com/GrahamDumpleton/wrapt). Two related issue this has already found are htt

[issue26971] python v3.5.1: sys.paths not respecting DESTDIRS and DESTSHARED

2016-05-23 Thread Johannes Spangenberg
Johannes Spangenberg added the comment: I can confirm this issue. I did run it on Linux SuSE 13.1 (64 Bit). Unlike other components, which are installed in `lib/`, `lib-dynload` is installed in `lib64/python3.5/`. But `sys.path` still points to `lib/python3.5/lib-dynload`. It did run in on :

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread Vitaly
Vitaly added the comment: I think that assertUnorderedEqual would contrast nicely with assertSequenceEqual -- ___ Python tracker ___ _

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread Vitaly
Vitaly added the comment: With missing last line, this time: == FAIL: test_equal_count_of_different_elements (__main__.Test) -- Traceback (most recent call last

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread Vitaly
Vitaly added the comment: Same results on Python.org's Python 3.5.1 shell: >>> class Test(u.TestCase): ... def test_equal_count_of_same_elements(self): ... self.assertCountEqual(set([1,2,3]), set([1,2,3])) ... def test_equal_count_of_different_elements(self): ... self.asse

[issue27066] SystemError if custom opener returns -1

2016-05-23 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: BTW, I may wait to commit this until after we've moved to GitHub. :) -- ___ Python tracker ___ ___

[issue27095] Simplify MAKE_FUNCTION

2016-05-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Interpreter Core dependencies: +ceval: use Wordcode, 16-bit bytecode nosy: +serhiy.storchaka ___ Python tracker ___

[issue23990] Callable builtin doesn't respect descriptors

2016-05-23 Thread Ethan Furman
Ethan Furman added the comment: The BDFL would be the BDFL (Guido van Rossum ;) or whomever he asks to do the job. Don't worry too much about drafts. Pick one of the existing PEPs (409 is fairly short), and follow the same type of layouts. Make your arguments for what should be changed and

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread Vitaly
Vitaly added the comment: The preceding results are via Python 2.7.10 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread Vitaly
Vitaly added the comment: $ python assert_items_equal_test.py FF. == FAIL: test_different_count (__main__.Test) -- Traceback (most recent call last): File "as

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread Vitaly
Vitaly added the comment: Why do you say that "we aren't dealing with python sets"? Try: import unittest as u class Test(u.TestCase): def test_equal_count_of_same_elements(self): self.assertItemsEqual(set([1,2,3]), set([1,2,3])) def test_equal_count_of_different_elements(self):

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread R. David Murray
R. David Murray added the comment: And it suffers the same problem as 'unordered', or even more so, as it implies sets, but we aren't dealing with python sets. See why this is so tough? :) -- ___ Python tracker _

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread R. David Murray
R. David Murray added the comment: Heh. We could call it 'assertQuotientSetEqual', but most people would have to look that up (I did, to find it). 'assertEquivalenceClassesEqual' is a bit better, but probably still not clear without looking it up (or being a mathematician). -- _

[issue27095] Simplify MAKE_FUNCTION

2016-05-23 Thread Demur Rumed
Changes by Demur Rumed : -- versions: +Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread Vitaly
Vitaly added the comment: When I read "Unordered", it makes me think of collections, including sequences and sets. -- ___ Python tracker ___

[issue27095] Simplify MAKE_FUNCTION

2016-05-23 Thread Demur Rumed
New submission from Demur Rumed: Implemented as per https://mail.python.org/pipermail/python-dev/2016-April/144135.html -- files: mkfu.patch keywords: patch messages: 266187 nosy: Demur Rumed priority: normal severity: normal status: open title: Simplify MAKE_FUNCTION type: performance

[issue27094] Floating Point Printing Error with 2+.8553 or 3+.8553

2016-05-23 Thread R. David Murray
R. David Murray added the comment: https://docs.python.org/3/tutorial/floatingpoint.html -- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'm not against adding a new name if it makes glorious sense, but we should not remove the old names from unittest as that causes unnecessary pain (based on past experience). assertCountEqual does make sense in terms of the "equivalent to" context from the

[issue27094] Floating Point Printing Error with 2+.8553 or 3+.8553

2016-05-23 Thread Seth Norton
Changes by Seth Norton : -- versions: +Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue27094] Floating Point Printing Error with 2+.8553 or 3+.8553

2016-05-23 Thread Seth Norton
New submission from Seth Norton: In a basic command line interpreter, adding 2 or 3 to .8553 will cause the result to be displayed as if a rounding error occurred. The number is so small that I expect it is not a mathematical error but rather in how the number is printed. The displayed answer

[issue23990] Callable builtin doesn't respect descriptors

2016-05-23 Thread Ionel Cristian Mărieș
Ionel Cristian Mărieș added the comment: Okay ... is anyone interested in helping with this (reviewing drafts)? Who would be the BDFL? -- ___ Python tracker ___

[issue23990] Callable builtin doesn't respect descriptors

2016-05-23 Thread Ethan Furman
Ethan Furman added the comment: I'm not against them, but there are many diverse opinions. A PEP will: - broaden discussion, so all (or at least most) pros and cons can be considered - highlight any other pieces of Python that would need to change to properly support proxies - get a prono

[issue23990] Callable builtin doesn't respect descriptors

2016-05-23 Thread Ionel Cristian Mărieș
Ionel Cristian Mărieș added the comment: On Mon, May 23, 2016 at 11:04 PM, Ethan Furman wrote: > `issubclass` doesn't "do the right thing", as evidenced by another dev. > Hmmm. Technically, in that case, the problem is in collections.abc.Iterable, not issubclass. I can extent the patch to fix

[issue23990] Callable builtin doesn't respect descriptors

2016-05-23 Thread Ethan Furman
Ethan Furman added the comment: `issubclass` doesn't "do the right thing", as evidenced by another dev. Continued complaining to this issue is not going to get you what you want, but writing a PEP to address the issue might. -- ___ Python tracker <

[issue27029] Remove support of deprecated mode 'U' in zipfile

2016-05-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch addresses Jim's comments. -- Added file: http://bugs.python.org/file42958/zipfile_remove_deprecated2.patch ___ Python tracker __

[issue23990] Callable builtin doesn't respect descriptors

2016-05-23 Thread Ionel Cristian Mărieș
Ionel Cristian Mărieș added the comment: On Mon, May 23, 2016 at 9:34 PM, Ethan Furman wrote: > "Add proxy support to builtins" and should address such things as > callable, issubclass, and whatever else is is appropriate. ​As previously stated this builtin is the only one not doing the right

[issue27066] SystemError if custom opener returns -1

2016-05-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In general LGTM, but I left style comment on Rietveld. And you can use assertRaisesRegex in tests if you prefers. -- ___ Python tracker ___ _

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +georg.brandl, gregory.p.smith, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-23 Thread Mark Grandi
Mark Grandi added the comment: @hakril: ok, that makes sense, I'm not a windows/win32 programmer by any means so I was mostly going on the microsoft web docs also the patch by hakril includes the documentation from my patch, so that patch should be the one considered (as a FYI) -- ver

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-23 Thread Steve Dower
Steve Dower added the comment: IIRC, the preferred typedef is ULONGLONG, but it's not really a big deal. Avoiding new header files is a good enough reason. I think Paul's right about 3.6 only. We shouldn't encourage code that won't work downlevel within the same version, and there is a ctypes

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread Vitaly
Vitaly added the comment: By leaps and bounds, I like assertUnorderedEqual versus assertCountEqual, which is terribly misleading. The first, and simplest, thing that comes to my mind from the word Count by itself is the count of all elements in a sequence (i.e., its length), certainly not freq

[issue23990] Callable builtin doesn't respect descriptors

2016-05-23 Thread Ethan Furman
Ethan Furman added the comment: To change this behavior at this point will require a PEP. The PEP should be something along the lines of "Add proxy support to builtins" and should address such things as callable, issubclass, and whatever else is is appropriate. As for working around your prob

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-23 Thread Clement Rouault
Clement Rouault added the comment: Because `QWORD` is not defined in any file included by CPython. The main file for basic sized type definition in Windows is: basetsd.h: Type definitions for the basic sized types. which contains the definition of `DWORD64`: `typedef unsigned __int64 DWORD

[issue26779] pdb continue followed by an exception in the same frame shows incorrect frame linenumber

2016-05-23 Thread Sriram Rajagopalan
Sriram Rajagopalan added the comment: ping. Gentle reminder to review the patch -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-23 Thread Mark Grandi
Mark Grandi added the comment: why do you say that QWORD is not present in windows.h? I found it here: https://msdn.microsoft.com/en-us/library/windows/desktop/aa383751%28v=vs.85%29.aspx typedef unsigned __int64 QWORD; -- ___ Python tracker

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-23 Thread Paul Moore
Paul Moore added the comment: My instinct is that this should only go into 3.6. It's a remote possibility, but someone could otherwise write code that uses REG_DWORD64 and say that it "works on 3.5" because they tested on 3.5.x, only to have it fail on 3.5.1. But if someone with a better feel

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: My first expectation for this function was assertUnorderedEqual, but I want to avoid problems with renaming (and coexisting of three names of for the same function), and I vote for status quo. -- nosy: +serhiy.storchaka _

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread R. David Murray
R. David Murray added the comment: Vitaly: if you can come up with a name we agree is more descriptive than the current one by a non-trivial margin, we will be happy to listen. assertFrequencyCountsEqual is not sufficiently better. (Personally, I would not know what that function did by read

[issue27085] Make it possible to select return type for os.listdir

2016-05-23 Thread R. David Murray
R. David Murray added the comment: The issue of passing an fd is a fair point. However, converting the filenames to bytes isn't going to help you print them, you'll just get decoding errors when converting them to strings instead of encoding errors. You could use the surrogateescape error han

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread Vitaly
Vitaly added the comment: Gentlemen, the point is that the name of a function should be all that is necessary to unambiguously understand what this method does without having to know that it's implemented in terms of collections.Counter or any other internal detail like that. That's not a good

[issue23026] Winreg module doesn't support REG_QWORD, small DWORD doc update

2016-05-23 Thread Steve Dower
Steve Dower added the comment: Looks good to me. (In case someone else applies the patch, there are a few mixed tab/spaces that should be fixed.) I'm personally okay with adding this to 3.5, but technically I think it's a new feature and should be in 3.6 only. Anyone else have an opinion here?

[issue27090] Python 3 import error after installation

2016-05-23 Thread Ned Deily
Ned Deily added the comment: To add to Zach's comment, there have been extended discussions in the past about whether there should be a separate set of environment variables for Python 3 vs Python 2 interpreters; see, for instance, Issue2375 and http://comments.gmane.org/gmane.comp.python.deve

[issue27090] Python 3 import error after installation

2016-05-23 Thread Zachary Ware
Zachary Ware added the comment: > That seems crazy... What's crazy about it? There are very very few legitimate situations where you need to permanently set any PYTHON* variable, particularly PYTHONPATH and PYTHONHOME. Adding site-packages to sys.path via PYTHONPATH is completely unnecessar

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread Michael Foord
Michael Foord added the comment: I agree with David, I don't like the name but it is at least accurate (if you already understand what it does). assertItemsEqual was better but misleading. In the absence of a *dramatically* better name leave it alone. -- __

[issue26632] __all__ decorator

2016-05-23 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On May 23, 2016, at 02:43 PM, Franklin? Lee wrote: >I sometimes wrap functions that return iterators to make functions that >return lists, because I work on the interpreter a lot. From there, it's not >much of a stretch to imagine functions which are implemente

[issue23990] Callable builtin doesn't respect descriptors

2016-05-23 Thread Ionel Cristian Mărieș
Changes by Ionel Cristian Mărieș : Added file: http://bugs.python.org/file42957/callable2.diff ___ Python tracker ___ ___ Python-bugs-list mai

[issue27085] Make it possible to select return type for os.listdir

2016-05-23 Thread Evgeny Kapun
Evgeny Kapun added the comment: Unfortunately, on Linux, handling names as Unicode can cause some problems. For example, merely print()-ing such a name can cause UnicodeEncodeError. -- ___ Python tracker _

[issue27085] Make it possible to select return type for os.listdir

2016-05-23 Thread STINNER Victor
STINNER Victor added the comment: > Unfortunately, this doesn't work if I pass a file descriptor. I strongly suggest you to handle filenames as Unicode ;-) It helps a lot on Windows, it's more convenient, etc. -- nosy: +haypo ___ Python tracker

[issue27085] Make it possible to select return type for os.listdir

2016-05-23 Thread Evgeny Kapun
Evgeny Kapun added the comment: Unfortunately, this doesn't work if I pass a file descriptor. -- resolution: rejected -> status: closed -> open ___ Python tracker ___ __

[issue27066] SystemError if custom opener returns -1

2016-05-23 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : Added file: http://bugs.python.org/file42956/27066-2.patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue27021] It is not documented that os.writev() suffer from SC_IOV_MAX

2016-05-23 Thread Jim Jewett
Changes by Jim Jewett : -- stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue27086] Add closefd argument to os.listdir

2016-05-23 Thread R. David Murray
R. David Murray added the comment: This proposal doesn't feel to me like it matches the general APIs we have in the standard library. I would think the python style for this would be to use a context manager when opening the fd. So, I'm -1 on this proposal. -- nosy: +r.david.murray

[issue27085] Make it possible to select return type for os.listdir

2016-05-23 Thread R. David Murray
R. David Murray added the comment: The API for selecting the output type is to pass in the corresponding input type. This is true for many functions in the python3 standard library. -- nosy: +r.david.murray resolution: -> rejected stage: -> resolved status: open -> closed __

[issue27071] unittest.TestCase.assertCountEqual is a very misleading name

2016-05-23 Thread R. David Murray
R. David Murray added the comment: Personally I don't see any difference between assertCountsEqual and assertFrequencyCountsEqual. The logic for assertCountsEqual is that it is asserting that some counts are equal in this sequence. What could we be counting? The only obvious thing is the le

[issue26632] __all__ decorator

2016-05-23 Thread Franklin? Lee
Franklin? Lee added the comment: >I don't know, but what practical effect will this have? I.e. under what >conditions would you @public wrap a @functools.wraps function and want it to >show up in __all__? Do you have a specific use case? I sometimes wrap functions that return iterators to make

[issue27038] Make os.DirEntry exist

2016-05-23 Thread Jim Jewett
Changes by Jim Jewett : -- stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue26915] Test identity first in membership operation of ItemsView, ValuesView and Sequence in collections.abc

2016-05-23 Thread Xiang Zhang
Xiang Zhang added the comment: Reopen this since the solution is not complete pointed out by Serhiy and the new patch has already been attached(s2). -- status: closed -> open ___ Python tracker ___

[issue27032] Remove deprecated html.parser.HTMLParser.unescape()

2016-05-23 Thread Jim Jewett
Jim Jewett added the comment: Looks Good To Me -- nosy: +Jim.Jewett ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

  1   2   >