[issue27089] I think this is a small bug in urlparse.py

2016-05-23 Thread Feng A
New submission from Feng A: = BUG: run : urlparse.urlparse('http://google.com]') then: raise ValueError("Invalid IPv6 URL") = SOURCE: if url[:2] == '//': netloc, url = _splitnet

[issue27089] I think this is a small bug in urlparse.py

2016-05-23 Thread Xiang Zhang
Xiang Zhang added the comment: Why? I think this is the right behaviour. According to the rfc[1], square brackets are used and only used to refer IPv6 address in URI. Square brackets are reserved characters and the URI you give is not correct. 1. http://tools.ietf.org/html/rfc3986#section-3 -

[issue27089] I think this is a small bug in urlparse.py

2016-05-23 Thread Feng A
Feng A added the comment: I wish you could think twice if you hadn't use urlparse.py in practical project. 1. Do you like the module to raise an exception? 2. The href in webpage is always standard format? 3. Should the parse module verify the ipv6 url format? If so, did the module really ma

[issue27089] I think this is a small bug in urlparse.py

2016-05-23 Thread Xiang Zhang
Xiang Zhang added the comment: As a general purpose library for url parsing, I think conforming to the existing standard is a good choice. 'http://google.com]' is a malformed URI according to the standard and then I think raising an exception is quite suitable. Of course there are always malf

[issue27089] I think this is a small bug in urlparse.py

2016-05-23 Thread Xiang Zhang
Xiang Zhang added the comment: Ohh, not objective, but subjective. Sorry. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue27089] I think this is a small bug in urlparse.py

2016-05-23 Thread Antti Haapala
Antti Haapala added the comment: This behaviour exists exactly because the return value also contains the `.hostname`, which for the IPv6 addresses is *without* brackets: >>> urlparse('http://[::1]:80/').hostname '::1' There is no way to get a proper parsing result from such a broken U

[issue27089] I think this is a small bug in urlparse.py

2016-05-23 Thread Berker Peksag
Berker Peksag added the comment: > 4. Personally, Given a wrong formated url, It is the responsibility of the > module to correct it ? It's not the responsibility of the library to correct (or make a guess on) user input. -- nosy: +berker.peksag resolution: -> not a bug stage: -> re

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

2016-05-23 Thread aixtools
aixtools added the comment: See below between points. On 12-May-16 17:45, Martin Panter wrote: > Martin Panter added the comment: > > Thanks for trying to move the directory in the new patch, but it does not > seem to have been picked up by Rietveld. I have only seen patches generated > with M

[issue27090] Python 3 import error after installation

2016-05-23 Thread Richard Penman
New submission from Richard Penman: I installed latest release (https://www.python.org/downloads/release/python-351/) on OSX and get this error: $ python3 ... ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your

[issue27090] Python 3 import error after installation

2016-05-23 Thread Richard Penman
Richard Penman added the comment: The full error log: $ python3 Failed to import the site module Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/site.py", line 75, in __boot() File "/usr/local/lib/python2.7/site-packages/site.py", line 23, in __boot l

[issue16353] add function to os module for getting path to default shell

2016-05-23 Thread Xavier de Gaye
Xavier de Gaye added the comment: Following Serhiy suggestion at msg224477, this tentative patch adds the is_android attribute to the posix module and the default_shell attribute to the os module. No documentation for the moment. No test case is needed I think, as the changes in issue 16255 wi

[issue27090] Python 3 import error after installation

2016-05-23 Thread Richard Penman
Richard Penman added the comment: Apparently "The PYTHONPATH variable is used by all versions of Python 2 and Python 3, so you should not permanently configure this variable unless it only includes code that is compatible with all of your installed Python versions." That seems crazy... --

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

2016-05-23 Thread Clement Rouault
Changes by Clement Rouault : -- nosy: +hakril ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

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

2016-05-23 Thread Clement Rouault
Clement Rouault added the comment: I also stumbled on this issue when playing with the winreg module. I will try to make the discussion go forward by submitting a new patch. I added a test and tried everything (test included on 3.5) on my own computer (windows 8.1 64b) There are two points that

[issue27091] Python IDLE doesn't like 💙

2016-05-23 Thread Christian Kleineidam
New submission from Christian Kleineidam: When I past 💙 into the Python IDLE it closes automatically. I would be fine with the IDLE not being able to display the character. Automatically closing seems however excessive. -- components: IDLE messages: 266138 nosy: Christian.Kleineidam pr

[issue26927] test_mmap does not handle ValueError when no large file support

2016-05-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > When OverflowError is raised? Shouldn't it be replaced with ValueError? At least Python implementation of io.FileIO can raise OverflowError (from os.lseek()). Thus OverflowError should be kept. -- resolution: -> fixed status: open -> closed _

[issue27091] Python IDLE doesn't like 💙

2016-05-23 Thread STINNER Victor
STINNER Victor added the comment: What is your OS? Windows? What is the full Python version (see the IDLE window title)? Note: I cannot reproduce the issue on Linux with Python 3.4.3: pasting a string which contains 💙 do nothing, whereas pasting pure ASCII string works well. I recall the TCL

[issue27090] Python 3 import error after installation

2016-05-23 Thread Steven D'Aprano
Steven D'Aprano added the comment: It looks like your Python 3 is somehow using your Python 2 site directory. What does your PYTHONPATH contain? Try running this: python3 -E -S -c "import sys; print(sys.path)" and see what it says. -- nosy: +steven.daprano type: crash -> behavior __

[issue27092] ord() raises TypeError in string input

2016-05-23 Thread Christoph Wruck
New submission from Christoph Wruck: Hi, is there any reason why ord() raises a TypeError instead of ValueError on string/bytes input with wrong length? The chr() function will raise a ValueError on negative integers such as chr(-1). Required behaviour: try: n = ord(input_string) except V

[issue27092] ord() raises TypeError in string input

2016-05-23 Thread Christoph Wruck
Changes by Christoph Wruck : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue27092] ord() raises TypeError in string input

2016-05-23 Thread Christoph Wruck
Changes by Christoph Wruck : -- type: enhancement -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3

2016-05-23 Thread R. David Murray
R. David Murray added the comment: At the time I wanted it to be named assertCountsEqual, which is better (IMO) than either assertItemsEqual or assertCountEqual. I lost that naming contest, though :(. On the third hand, I don't think there exists a good two word name for what the function do

[issue27092] ord() raises TypeError in string input

2016-05-23 Thread Xiang Zhang
Xiang Zhang added the comment: Once I also mentioned about this in another thread, issue27008, I created and Serhiy gave me a response. You can have a look at that. -- nosy: +xiang.zhang ___ Python tracker ___

[issue27091] Python IDLE doesn't like 💙

2016-05-23 Thread Martin Panter
Martin Panter added the comment: Is this the same as Issue 13153? -- nosy: +martin.panter ___ Python tracker ___ ___ Python-bugs-list

[issue27092] ord() raises TypeError in string input

2016-05-23 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue26969] ascynio should provide a policy to address pass-loop-everywhere problem

2016-05-23 Thread Vincent Michel
Vincent Michel added the comment: I agree with Yury's ideas about the implementation of this feature. However, it is a bit confusing to have `asyncio.get_event_loop` defined as: def get_event_loop(): policy = get_event_loop_policy() return policy.get_running_loop() or policy.get_event_l

[issue27092] ord() raises TypeError on string/bytes input

2016-05-23 Thread Christoph Wruck
Christoph Wruck added the comment: closed as redundant to: http://bugs.python.org/issue27008 -- resolution: -> not a bug status: open -> closed title: ord() raises TypeError in string input -> ord() raises TypeError on string/bytes input ___ Python

[issue27093] Silence warning in cjkcodecs.h

2016-05-23 Thread Demur Rumed
New submission from Demur Rumed: gcc6 now warns about indentation of code. find_paireencmap raised such warnings. This patch silences that warning while updating the code to be more PEP7 friendly wrt curlies -- files: cjkcodecs.patch keywords: patch messages: 266148 nosy: Demur Rumed p

[issue23990] Callable builtin doesn't respect descriptors

2016-05-23 Thread Ionel Cristian Mărieș
Ionel Cristian Mărieș added the comment: On Mon, Apr 20, 2015 at 5:08 PM, Eric Snow wrote: > FYI, I'll re-iterate something I said before, there is a different > approach you can take here if this is just an issue of proxying. Use two > different proxy types depending on if the proxied object

[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

[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 ___

[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.

[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

[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

[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 __

[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

[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.

[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

[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 ___ __

[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, on Linux, handling names as Unicode can cause some problems. For example, merely print()-ing such a name can cause UnicodeEncodeError. -- ___ Python tracker _

[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

[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

[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. -- __

[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

[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

[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?

[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

[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 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

[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 _

[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

[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

[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 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

[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

[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

[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

[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

[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

[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 ___ _

[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

[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 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 <

[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: 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: Okay ... is anyone interested in helping with this (reviewing drafts)? Who would be the BDFL? -- ___ Python tracker ___

[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

[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.

[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 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

[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

[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
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 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). -- _

[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 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 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: The preceding results are via Python 2.7.10 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[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

[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 ___

[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 ___ ___

[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

[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: I think that assertUnorderedEqual would contrast nicely with assertSequenceEqual -- ___ Python tracker ___ _

[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 :

[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

[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

[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

[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

[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 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

[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 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

[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

[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

[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

[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

[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

[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

  1   2   >