[issue38566] Description of '\w' behavior is vague in `re` documentation

2019-10-23 Thread James Gerity
New submission from James Gerity : The documentation for the `re` library¹ describes the behavior of the specifier '\w' as matching "Unicode word characters," which is very vague. The closest thing I can find that corresponds to this language is the guidance offered in Unicode

[issue38408] urlparse gives no method to build a url with a port

2019-10-08 Thread James Allsopp
New submission from James Allsopp : Hi, I like to build my Url's using url unparse, e.g. site_to_test = urllib.parse.urlunparse((scheme, host, page, '', '', '')) r = requests.get(site_to_test) However, we reach a lot of sites through SSH tunnels, as our network is heavily locked down

[issue38344] activate.bat else needs to be on the same line as the if

2019-10-02 Thread James Abel
Change by James Abel : -- keywords: +patch pull_requests: +16122 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16533 ___ Python tracker <https://bugs.python.org/issu

[issue38344] activate.bat else needs to be on the same line as the if

2019-10-02 Thread James Abel
New submission from James Abel : In activate.bat, the else needs to be on the same line as the if -- components: Windows messages: 353722 nosy: James Abel, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: activate.bat else needs

[issue21705] cgi.py: Multipart with more than one file is misparsed

2019-08-03 Thread Rhodri James
Change by Rhodri James : -- nosy: +Rhodri James, ethan.furman ___ Python tracker <https://bugs.python.org/issue21705> ___ ___ Python-bugs-list mailing list Unsub

[issue9968] Let cgi.FieldStorage have named uploaded file

2019-08-03 Thread Rhodri James
Change by Rhodri James : -- nosy: +Rhodri James, ethan.furman ___ Python tracker <https://bugs.python.org/issue9968> ___ ___ Python-bugs-list mailing list Unsub

[issue10879] cgi memory usage

2019-08-03 Thread Rhodri James
Change by Rhodri James : -- nosy: +Rhodri James, ethan.furman ___ Python tracker <https://bugs.python.org/issue10879> ___ ___ Python-bugs-list mailing list Unsub

[issue1047397] cgitb failures

2019-08-03 Thread Rhodri James
Change by Rhodri James : -- pull_requests: +14841 pull_request: https://github.com/python/cpython/pull/15094 ___ Python tracker <https://bugs.python.org/issue1047

[issue37749] ipaddress - is_global method all multicast addresses and networks return true

2019-08-02 Thread Brandon James
Change by Brandon James : -- keywords: +patch pull_requests: +14833 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15088 ___ Python tracker <https://bugs.python.org/issu

[issue37749] ipaddress - is_global method all multicast addresses and networks return true

2019-08-02 Thread Brandon James
New submission from Brandon James : When using the ipaddress library, all multicast addresses and networks return True when using the is_global method for their respective classes. I believe their are two possible fixes for this. 1) In practice no multicast addresses are globally routable

[issue37659] subprocess.list2cmdline() should not escape wrapping single/double quotes

2019-07-23 Thread James Xu
New submission from James Xu : While working on our project, we have noticed that for `subprocess.Popen(command, ...)`, when `command` is a string that contains escaped double quote, for example, `command = '"path to executable" --flag arg'`, this works fine. However, when command

[issue29288] Lookup Error while importing idna from a worker thread

2019-04-11 Thread James Saryerwinnie
James Saryerwinnie added the comment: I ran into this as well also using the embedded distribution for windows (https://docs.python.org/3/using/windows.html#the-embeddable-package). socket.getaddrinfo() will encode unicode hostnames using idna and trigger this error if you call

[issue9883] minidom: AttributeError: DocumentFragment instance has no attribute 'writexml'

2019-04-03 Thread James Socol
Change by James Socol : -- nosy: -jamessocol ___ Python tracker <https://bugs.python.org/issue9883> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20399] Comparison of memoryview

2019-04-02 Thread james stone
james stone added the comment: I encountered this issue as well when using python 3.6.7 and psycopg2. Postgres tries to sort rows by the primary key field and if the returned type is a memoryview an the error is thrown: "TypeError: '<' not supported between instances of 'me

[issue36455] collections.abc.Sequence doesn't support reflection/introspection

2019-03-27 Thread James Edwards
James Edwards added the comment: Edit conflict -- indeed -- self closing. --- I should point out that this could be fixed with something like the following: @classmethod def __subclasshook__(cls, C): if cls is Sequence: return _check_methods(C, "__rever

[issue36455] collections.abc.Sequence doesn't support reflection/introspection

2019-03-27 Thread James Edwards
James Edwards added the comment: This was tagged as 3.7, but the issue still exists AFAICT in the latest github master: https://github.com/python/cpython/blob/master/Lib/_collections_abc.py -- ___ Python tracker <https://bugs.python.

[issue36455] collections.abc.Sequence doesn't support reflection/introspection

2019-03-27 Thread James Edwards
New submission from James Edwards : Consider: from collections.abc import * class DefinitelyNotAList: def __init__(self, backer): self.backer = backer def __getitem__(self, key): return self.backer[key] def __len__(self

[issue35989] ipaddress.IPv4Network allows prefix > 32

2019-03-05 Thread James Edwards
James Edwards added the comment: It may be worth also addressing the fact that IPv6Network makes no restriction on it's netmask (when specified as a tuple). -- nosy: +jedwards ___ Python tracker <https://bugs.python.org/issue35

[issue35859] Capture behavior depends on the order of an alternation

2019-01-30 Thread James Davis
James Davis added the comment: Thanks for your thoughts, Raymond. I understand that the alternation has "short-circuit" behavior, but I still find it confusing in this case. Consider these two: Regex patternmatched? matched string capture

[issue35859] Capture behavior depends on the order of an alternation

2019-01-30 Thread James Davis
New submission from James Davis : I have two regexes: /(a|ab)*?b/ and /(ab|a)*?b/. If I re.search the string "ab" for these regexes, I get inconsistent behavior. Specifically, /(a|ab)*?b/ matches with capture "a", while /(ab|a)*?b/ matches with an empty capture group. I

[issue35164] socket.getfqdn and socket.gethostbyname fail on MacOS

2018-12-13 Thread James Crowther
James Crowther added the comment: Hi Ronald, I've replied to your comments below >My gut feeling is that this is some issue with your system or environment. I Doubt it, happens with another MacBook air which is literally out of the box, no mods. >Some more que

[issue35164] socket.getfqdn and socket.gethostbyname fail on MacOS

2018-11-10 Thread James Crowther
James Crowther added the comment: Hi guys, I am the OP for the stack overflow issue question that sparked this bug report. In response to Ned's question about configuration of the system: MacOS 10.14.1 Installed x-code and command line tools python versions used, varies, 3.5.3, 3.6

[issue35069] Unexecuted import in function causes UnboundLocalError

2018-10-25 Thread James Hewitt
James Hewitt added the comment: So just the fact that somewhere in the function a name is referenced, even if that code isn't actually executed, is enough to change the local namespace. I think I knew that, but didn't know that's what it meant :) I guess the moral is, pay attention

[issue35069] Unexecuted import in function causes UnboundLocalError

2018-10-25 Thread James Hewitt
James Hewitt added the comment: I don't quite follow... the 'import logging.config' statement should never be executed, and if it is commented out the program works fine as written. It's as if the mere presence of the statement in the code causes 'logging' to be shadowed inside

[issue35069] Unexecuted import in function causes UnboundLocalError

2018-10-25 Thread James Hewitt
James Hewitt added the comment: Sure, it's at https://pastebin.com/L1RMPD7K -James On 10/25/2018 12:30 PM, Stéphane Wirtel wrote: > > Stéphane Wirtel added the comment: > > Could you share a pastebin? Thank you > >> Le 25 oct. 2018 à 21:28, James Hewitt a écrit : &g

[issue35069] Unexecuted import in function causes UnboundLocalError

2018-10-25 Thread James Hewitt
New submission from James Hewitt : Having 'import logging.config' in an if statement in a function causes a namespace issue, despite the fact that the import is not reached. Example code: --- #!/usr/bin/env python3 # Test weird import bug import logging config = {} config['log

[issue22499] [SSL: BAD_WRITE_RETRY] bad write retry in _ssl.c:1636

2018-09-23 Thread James Lu
Change by James Lu : -- nosy: +tacocat ___ Python tracker <https://bugs.python.org/issue22499> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34557] When sending binary file to a Microsoft FTP server over FTP TLS, the SSL unwind method hangs

2018-08-31 Thread James Campbell
New submission from James Campbell : When using the FTP library to transfer a binary file to a Microsoft FTP server using TLS, then the library will hang when unwinding the connection until it finally times out. The storbinary method calls conn.unwind which seems to have an issue with SSL

[issue34311] locale.format() and locale.format_string() cast Decimals to float

2018-08-04 Thread James Emerton
James Emerton added the comment: It looks like a bot got a bit excited when I mentioned this issue in the PR for bpo-33731. I unlinked the PR but this issue still got flagged for review. -- ___ Python tracker <https://bugs.python.org/issue34

[issue34311] locale.format() and locale.format_string() cast Decimals to float

2018-08-04 Thread James Emerton
Change by James Emerton : -- pull_requests: -8166 ___ Python tracker <https://bugs.python.org/issue34311> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34311] locale.format() and locale.format_string() cast Decimals to float

2018-08-04 Thread James Emerton
Change by James Emerton : -- keywords: +patch pull_requests: +8166 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34311> ___ ___ Py

[issue33731] string formatting that produces floats with preset precision while respecting locale

2018-08-01 Thread James Emerton
James Emerton added the comment: @rhettinger See #34311 about formatting Decimals using locale.format(). I'd like to see the problem fixed in one place or the other. Also, this is seems relatively straightforward to implement as it's really just a combination of the fixed precision 'f

[issue33731] string formatting that produces floats with preset precision while respecting locale

2018-08-01 Thread James Emerton
James Emerton added the comment: So far, I've implemented this for Decimal -- ___ Python tracker <https://bugs.python.org/issue33731> ___ ___ Python-bugs-list m

[issue33731] string formatting that produces floats with preset precision while respecting locale

2018-08-01 Thread James Emerton
Change by James Emerton : -- nosy: +jemerton ___ Python tracker <https://bugs.python.org/issue33731> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34311] locale.format() and locale.format_string() cast Decimals to float

2018-08-01 Thread James Emerton
James Emerton added the comment: Certainly adding another letter to the format spec would solve my issue and would in fact be somewhat preferable to using local.format directly. I think this could be fixed in the locale module by transforming the format spec and using new-style formatting

[issue34311] locale.format() and locale.format_string() cast Decimals to float

2018-08-01 Thread James Emerton
New submission from James Emerton : We use locale.format('%.2f', x, True) to convert Decimal values to strings for display. Unfortunately, the locale module is using %-formatting to generate the initial string before applying locale specific formatting. As a result, any value which cannot

[issue25457] json dump fails for mixed-type keys when sort_keys is specified

2018-06-29 Thread James Edwards
Change by James Edwards : -- keywords: +patch pull_requests: +7617 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue25457> ___ ___ Py

[issue25457] json dump fails for mixed-type keys when sort_keys is specified

2018-06-29 Thread James Edwards
James Edwards added the comment: This came up in a StackOverflow question[1] today, so I took a stab at addressing the error. The changes don't restore the 2.x behavior, but just do as R. David Murray suggested and coerce the keys to strings prior to sorting to prevent the error

[issue33971] os.mknod is subject to "umask"

2018-06-26 Thread James Stevens
New submission from James Stevens : As per the underlying "libc" call, the node created with "mknod" is subjected to the user's current umask setting. This is not made clear in the Python documentation, but the "libc" documentation makes this clear (see attache

[issue33970] bugs.python.org silently refuses registrations

2018-06-26 Thread James Stevens
New submission from James Stevens : bugs.python.org silently refuses registration if the user's "homepage" does not match some undisclosed URL validation test. The fact of the validation failure of the "homepage" is not disclosed at any time, including both the

[issue33969] "copytree" refuses to copy to a mount point

2018-06-26 Thread James Stevens
New submission from James Stevens : Even if the mount-point directory is empty, "copytree" refuses to copy to a it becuase it will not perform a copy if the destination directory already exists - although it will accept any of the parents of destination existing, or not. Therefore,

[issue33481] configparser.write() does not save comments.

2018-05-13 Thread David James Peters
New submission from David James Peters <pebau...@gmail.com>: The ConfigParser().write() does not save the comments; this makes using comments harder because it requires a separate demo ini file the user must be able to locate and read from without learning anything from the IN

[issue32533] SSLSocket read/write thread-unsafety

2018-04-17 Thread James Lu
Change by James Lu <bitfl...@gmail.com>: -- nosy: +tacocat ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32533> ___ __

[issue33090] race condition between send and recv in _ssl with non-zero timeout

2018-04-17 Thread James Lu
Change by James Lu <bitfl...@gmail.com>: -- nosy: +tacocat ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33090> ___ __

[issue32997] Catastrophic backtracking in fpformat

2018-03-05 Thread James Davis
James Davis <davis...@vt.edu> added the comment: Equivalent, probably cleaner. Comment on the PR if you want a change. -- ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32997] Catastrophic backtracking in fpformat

2018-03-05 Thread James Davis
Change by James Davis <davis...@vt.edu>: -- keywords: +patch pull_requests: +5750 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue32997] Catastrophic backtracking in fpformat

2018-03-05 Thread James Davis
New submission from James Davis <davis...@vt.edu>: The decoder regex used to parse numbers in the fpformat module is vulnerable to catastrophic backtracking. '^([-+]?)0*(\d*)((?:\.\d*)?)(([eE][-+]?\d+)?)$' The substructure '0*(\d*)' is quadratic. An attack string like '+0000++' bl

[issue32981] Catastrophic backtracking in poplib and difflib

2018-03-01 Thread James Davis
New submission from James Davis <davis...@vt.edu>: Hi Python security team, My name is James Davis. I'm a security researcher at Virginia Tech. The python core (cpython) has 2 regular expressions vulnerable to catastrophic backtracking that look like potential DOS vectors. The vuln

[issue20928] xml.etree.ElementInclude does not include nested xincludes

2018-02-18 Thread James Bailey
James Bailey <james.bai...@gmail.com> added the comment: Agreed with ruffsl's concerns about the overly aggressive detection of infinite recursion. I also wonder if the hrefs should be normalized or canonized for the check? The check may miss infinite recursions if the hrefs

[issue23835] configparser does not convert defaults to strings

2017-07-04 Thread James Tocknell
Changes by James Tocknell <aragilar+pythonb...@gmail.com>: -- pull_requests: +2628 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue30798] Document that subprocess.Popen does not set PWD

2017-07-01 Thread James Lin
James Lin added the comment: Yes, but the Python docs have scary-looking warnings about using shell=True, so people (rightly) should avoid using shell=True if they don't think that they need it. And in this case, people might not even know that they're invoking some binary that expects PWD

[issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups

2017-06-30 Thread James Shewey
James Shewey added the comment: According to the man page for gethostbyaddr "The gethostbyname*() and gethostbyaddr*() functions are obsolete. Applications should use getaddrinfo(3) and getnameinfo(3) instead." - so perhaps using the correct API call might be a good start to

[issue30806] netrc.__repr__() is broken for writing to file

2017-06-29 Thread James
New submission from James: Have any valid .netrc file. For testing purposes you can use this: machine abc.xyz login myusername password mypassword The documentation for netrc.__repr__() states that it "dumps the class data as a string in the format of a netrc file". However, wh

[issue30798] Document that subprocess.Popen does not set PWD

2017-06-28 Thread James Lin
New submission from James Lin: Even though http://bugs.python.org/issue4057 was rejected (which I think is fair), I think it would be worth mentioning something about PWD in the Python docs for subprocess.Popen's cwd parameter (and possibly for os.chdir): 1. It's pretty common for people

[issue30568] README Formatting

2017-06-04 Thread James Lu
New submission from James Lu: - Shorten the Copyright statement from a list of years (`2001, 2002, 2003, ... 2017`) into `2001-2017` - Extend copyright date at end of README from 2016 to 2017 - Ensure that there are two newlines before every header throughout the file (this was the original

[issue29872] My reply

2017-03-21 Thread James Triveri
New submission from James Triveri: reply from james.triv...@gmail.com -- messages: 289962 nosy: jtrive84 priority: normal severity: normal status: open title: My reply ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29716] Python 3 Module doc still sounds like __init__.py is required

2017-03-03 Thread James O
James O added the comment: Ah, I didn't realize some tools depended on it. Should I set the status to closed? (like I said, I'm new to this) -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29716] Python 3 Module doc still sounds like __init__.py is required

2017-03-03 Thread James O
New submission from James O: PEP 420 says "Allowing implicit namespace packages means that the requirement to provide an __init__.py file can be dropped completely..." (as described here: http://stackoverflow.com/questions/37139786/is-init-py-not-required-for-packages-i

[issue29705] socket.gethostbyname, getaddrinfo etc broken on MacOS 10.12

2017-03-02 Thread James Crowther
James Crowther added the comment: Hi Ned, Thats ok, thanks! I’m going to try it on another machine, its really strange, I’m wondering what I might have done on my mac to cause it to flake out like this. Will do some more testing with other macs running 10.12 and see if they have

[issue29705] socket.gethostbyname, getaddrinfo etc broken on MacOS 10.12

2017-03-02 Thread James Crowther
James Crowther added the comment: Hi Ned, Currently running 10.12.3. and output is as follows Jamess-MacBook-pro:crowdrender_repository jamesmac$ python3.5 Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 26 2016, 10:47:25) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "

[issue29705] socket.gethostbyname, getaddrinfo etc broken on MacOS 10.12

2017-03-02 Thread James Crowther
James Crowther added the comment: Hi Ned, Doesn’t seem to matter, I can try my local host name given by; socket.gethostname() or I can try another host on the network, same result. If I do the exact same operation using the same python version on windows or linux, then I get

[issue29705] socket.gethostbyname, getaddrinfo etc broken on MacOS 10.12

2017-03-02 Thread James Crowther
New submission from James Crowther: Currently I can't use socket to resolve host names to IP addresses. This is something critical to mine as well as other applications that run over networks. When I attempt to do the following: import socket socket.getaddrinfo(hostname, None

[issue5945] PyMapping_Check returns 1 for lists

2017-02-17 Thread James R Barlow
Changes by James R Barlow <j...@purplerock.ca>: -- pull_requests: +105 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5945> ___ _

[issue28877] Cannot compile _ssl.o on HP-UX

2016-12-05 Thread James Matthews
New submission from James Matthews: Cannot build Python 2.7.12 on HP-UX due to the following error: /opt/hp-gcc64-4.7.1/bin/gcc -pthread -shared build/temp.hp-ux-B.11.31-9000-800-2.7/root/build/Python-2.7.12/Modules/_ssl.o -L/usr/local/lib -lssl -lcrypto -o build/lib.hp-ux-B.11.31-9000-800

[issue18777] Cannot compile _ssl.c using openssl > 1.0

2016-11-30 Thread James Matthews
James Matthews added the comment: This is marked as fixed but am still seeing this error in 2.7.12 on HP-UX 11.31. /opt/hp-gcc64-4.7.1/bin/gcc -pthread -shared build/temp.hp-ux-B.11.31-9000-800-2.7/root/build/Python-2.7.12/Modules/_ssl.o -L/usr/local/lib -lssl -lcrypto -o build/lib.hp-ux-B

[issue28663] Higher virtual memory usage on recent Linux versions

2016-11-11 Thread James Lu
Changes by James Lu <bitfl...@gmail.com>: -- nosy: +James Lu ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28663> ___ __

[issue20825] containment test for "ip_network in ip_network"

2016-10-20 Thread James Schneider
James Schneider added the comment: Please consider for implementation in 3.6. I'd love it even more for 3.5 but I don't think that will happen. With the latest patch, I don't believe there are any backwards-incompatible changes, though

[issue28326] multiprocessing.Process depends on sys.stdout being open

2016-10-01 Thread James Lu
Changes by James Lu <bitfl...@gmail.com>: -- nosy: +James Lu ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28326> ___ __

[issue27934] json float encoding incorrect for dbus.Double

2016-09-02 Thread Eddie James
Changes by Eddie James <eaja...@us.ibm.com>: Added file: http://bugs.python.org/file44349/json-float-repr-2.7.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue27934] json float encoding incorrect for dbus.Double

2016-09-02 Thread Eddie James
Eddie James added the comment: Python 2.7 also already behaves correctly for other dbus types: Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import

[issue27934] json float encoding incorrect for dbus.Double

2016-09-02 Thread Eddie James
Eddie James added the comment: Wait what about the json C code for 2.7? That's still using PyObject_Repr() which will call tp_repr for dbus.Double... Any suggestions? -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue27934] json float encoding incorrect for dbus.Double

2016-09-02 Thread Eddie James
Eddie James added the comment: Thanks Mark, yes you installed the right package. OK I didn't dig deep enough in the sub class. And yea, there shouldn't be any difference between float.__repr__ and float.__str__. Obviously repr calls the object's tp_repr method, while float.__repr__ calls

[issue27934] json float encoding incorrect for dbus.Double

2016-09-02 Thread Eddie James
Eddie James added the comment: Understood on 2.7, I wasn't aware it would cause any issues. Dbus.Double is not a subclass of float unfortunately. Problem is that all Dbus types seem to have a custom tp_repr method that returns that strange formatting I mentioned. So repr won't be the same

[issue27934] json float encoding incorrect for dbus.Double

2016-09-01 Thread Eddie James
Changes by Eddie James <eaja...@us.ibm.com>: Added file: http://bugs.python.org/file44334/json-float-str-2.7.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue27934] json float encoding incorrect for dbus.Double

2016-09-01 Thread Eddie James
New submission from Eddie James: JSON does not correctly encode dbus.Double types, even though all other dbus types are handled fine. I end up with output like this (0.25 is the floating point value): dbus.Double(0.25, variant_level=1) Found that the encoding uses repr() for float objects

[issue26513] platform.win32_ver() broken in 2.7.11

2016-08-31 Thread James Domingo
James Domingo added the comment: Per SilentGhost's request, reposting my message from issue 27890 here -- The platform.release() function in Python 3.5.1 returns the correct value on Windows 2008 Server R2: C:\Users\jdoe\Documents\Python>python-3.5.1-embed-amd64\python.exe Python 3.

[issue27890] platform.release() incorrect in Python 3.5.2 on Windows 2008ServerR2

2016-08-29 Thread James Domingo
New submission from James Domingo: The platform.release() function in Python 3.5.1 returns the correct value on Windows 2008 Server R2: C:\Users\jdoe\Documents\Python>python-3.5.1-embed-amd64\python.exe Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900 64 bit (AM

[issue27532] Dictionary iterator has no len()

2016-07-16 Thread James Lu
James Lu added the comment: I think you closed it too quickly. You see, computing the length of combinations() doesn't require looping all the way through the iterator; you can compute it quickly. I created a wrapper class just for this purpose. On Sat, Jul 16, 2016 at 5:24 PM, R. David Murray

[issue27532] Dictionary iterator has no len()

2016-07-16 Thread James Lu
James Lu added the comment: same for itertools iterators - libraries such as tqdm would benefit from this On Sat, Jul 16, 2016 at 3:08 PM, James Lu <rep...@bugs.python.org> wrote: > > New submission from James Lu: > > This would be useful for libraries like tqdm (p

[issue27532] Dictionary iterator has no len()

2016-07-16 Thread James Lu
New submission from James Lu: This would be useful for libraries like tqdm (progress bar module). -- components: Interpreter Core messages: 270581 nosy: James.Lu priority: normal severity: normal status: open title: Dictionary iterator has no len() type: enhancement versions: Python 3.6

[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-17 Thread James Paget
James Paget added the comment: The 2.7.12rc1+ build resolves the issue for me. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread James Paget
James Paget added the comment: Python Packaging Authority member pfmoore from pypa/pip says "there's no ctypes-based code that could be causing the error" and "Python appears to be crashing as a result of pure Python code" and "there's no way that I can see how pip co

[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread James Paget
James Paget added the comment: I have submitted this to pip as you have suggested (see pip Issue #3795), but feel that Python.exe should not crash even if there is a problem with a third-party package. -- ___ Python tracker <rep...@bugs.python.

[issue27305] Crash with "pip list --outdated" on Windows 10 with Python 2.7.12rc1

2016-06-13 Thread James Paget
New submission from James Paget: On Windows 10 Professional 64-bit, typing "pip list --outdated" or "python -m pip install -U pip" at the Windows command prompt causes Python 2.7.12rc1 to crash. I get the standard "python.exe has stopped working" crash not

[issue27295] heaps library does not have support for max heap

2016-06-12 Thread James Lu
James Lu added the comment: It's not a very pythoniic way to simply negate the value. Plus, the majority of heap users want performance (heap was made for speed), so a C version would be much better. On Sat, Jun 11, 2016 at 4:39 PM, Raymond Hettinger <rep...@bugs.python.org>

[issue27295] heaps library does not have support for max heap

2016-06-11 Thread James Lu
New submission from James Lu: Both max heaps and min heaps have uses in algorithms. Some algorithms require both. Why doesn't the heapq library support max heaps (not including the private _heapify_max() method)? -- components: Library (Lib) messages: 268211 nosy: James.Lu priority

[issue27290] Turn heaps library into a more OOP data structure?

2016-06-10 Thread James Lu
James Lu added the comment: Even a wrapper class would be helpful, it's simply more pythonic. On Fri, Jun 10, 2016 at 6:02 PM, Raymond Hettinger <rep...@bugs.python.org> wrote: > > Raymond Hettinger added the comment: > > The main reason is that there would be very litt

[issue27290] Turn heaps library into a more OOP data structure?

2016-06-10 Thread James Lu
New submission from James Lu: The heapq library uses a list or other mutable sequence time to represent a heap. Since Python is a highly OOP language, why not make heaps their own data type? -- components: Library (Lib) messages: 268159 nosy: James.Lu priority: normal severity: normal

[issue20825] containment test for "ip_network in ip_network"

2016-06-01 Thread James Schneider
James Schneider added the comment: I'd like to ask for a status on getting this merged? As a network administrator, these changes would have a magical effect on my code dealing with routing tables and ACL's. -- nosy: +James Schneider ___ Python

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-05-08 Thread James Tatum
James Tatum added the comment: FYI, NamedTemporaryFile doesn't work well with Windows. There are a handful of issues about it. -- nosy: +James.Tatum ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26982] Clarify forward annotations in PEP 484

2016-05-08 Thread James Tatum
Changes by James Tatum <jta...@gmail.com>: Removed file: http://bugs.python.org/file42786/forward_references.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue26982] Clarify forward annotations in PEP 484

2016-05-08 Thread James Tatum
Changes by James Tatum <jta...@gmail.com>: Added file: http://bugs.python.org/file42787/forward_references.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue26982] Clarify forward annotations in PEP 484

2016-05-08 Thread James Tatum
Changes by James Tatum <jta...@gmail.com>: Added file: http://bugs.python.org/file42786/forward_references.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue26982] Clarify forward annotations in PEP 484

2016-05-08 Thread James Tatum
Changes by James Tatum <jta...@gmail.com>: Removed file: http://bugs.python.org/file42785/forward_references.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue26982] Clarify forward annotations in PEP 484

2016-05-08 Thread James Tatum
New submission from James Tatum: In https://github.com/python/typeshed/issues/180, we discussed a slight ambiguity with PEP 484's mention of forward references. It wasn't entirely clear that they don't apply unless using function annotations. This patch attempts to clear up the ambiguity

[issue26752] Mock(2.0.0).assert_has_calls() raise AssertionError in two same calls

2016-04-14 Thread James
New submission from James: >>> import mock >>> print mock.__version__ 2.0.0 >>> = test.py from mock import Mock,call class BB(object): def __init__(self):pass def print_b(self):pass def print_bb(self,tsk_id):pass bMock = Mock(return

[issue26730] SpooledTemporaryFile doesn't correctly preserve data for text (non-binary) SpooledTemporaryFile objects when Unicode characters are written

2016-04-10 Thread James Hennessy
New submission from James Hennessy: The tempfile.SpooledTemporaryFile class doesn't correctly preserve data for text (non-binary) SpooledTemporaryFile objects when Unicode characters are written. The attached program demonstrates the failure. It creates a SpooledTemporaryFile object, writes

[issue25713] Setuptools included with 64-bit Windows installer is outdated

2015-11-23 Thread James Paget
New submission from James Paget: This applies to Python 3.5.1rc1 only. The Windows 64-bit standalone installer installs setuptools 18.2, but the latest version is 18.5. It should be noted that the Python 2.7.11rc1 Windows 64-bit standalone installer installs setuptools 18.5. Other Python

[issue25167] THE SCORCH TRIALS OF MAZE RUNNER DISFACTION LOGGIC

2015-09-18 Thread james
New submission from james: http://www.thebigidea.co.nz/profile/james/65456 http://www.cyclefish.com/hebucoho/ https://soundation.com/user/MazeRunnerTheScorchTrials https://issuu.com/mazerunnerthescorchtrials http://poputka.ua/user-profile-39591.aspx http://www.pikore.com/mazerunnerthescorch

[issue24748] Change of behavior for importlib between 3.4 and 3.5 with DLL loading

2015-08-28 Thread James Salter
James Salter added the comment: This also affects py2exe, which dynamically generates stub .pyc loaders inside a ZIP which then load .pyd modules outside the ZIP with the same name. Windows 8, x64, visual studio 2015 enterprise. It is simple enough to work around by doing a del sys.modules

<    1   2   3   4   5   6   >