[issue21948] Documentation Typo

2014-07-09 Thread Roy
New submission from Roy: In the documentation in 15.2 (https://docs.python.org/3/library/hmac.html), under hmac.new(key, msg=None, digestmod=None), it says "Paramter digestmod", which should be "Parameter digestmod" -- messages: 222623 nosy: thosehippos prior

[issue17113] argparse.RawDescriptionHelpFormatter should not delete blank lines

2021-12-10 Thread Roy Smith
Roy Smith added the comment: It's nice to see this is still being worked on after all these years :-) I'm not actually convinced the proposed fix makes sense. It swaps out one incorrect behavior for a different incorrect behavior. If it really is more effort than it's wo

[issue43371] Mock.assert_has_calls works strange

2022-01-15 Thread Roy Smith
Roy Smith added the comment: I agree that this is confusing and that what we need is an assertion for the top-level mock having specific calls in a specific order, and ignores any intervening extra calls to mocked functions. In other words, a version of assert_has_calls() which looks at

[issue46492] BrokenPipeError when piping to head (linux)

2022-01-23 Thread Roy Assis
New submission from Roy Assis : problem: --- Python raises exception when piping to head. Exception is not caught by try except. code: #sample.py import sys from time import sleep try: for line in sys.stdin: print(line, flush=True) sleep(2) except: print(&q

[issue46492] BrokenPipeError when piping to head (linux)

2022-01-23 Thread Roy Assis
Roy Assis added the comment: Resolution in this post: https://stackoverflow.com/questions/26692284/how-to-prevent-brokenpipeerror-when-doing-a-flush-in-python/26738736 code was changed to: #sample.py import sys from time import sleep try: for line in sys.stdin: print(line

[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-10-23 Thread Roy Smith
New submission from Roy Smith : The docs list the arguments in the order: class argparse.ArgumentParser([description][, epilog][, prog]... but the code (I'm looking at the 2.7.2 source) lists them as: class ArgumentParser(_AttributeHolder, _ActionsContainer): [...] def __init__

[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-10-23 Thread Roy Smith
Roy Smith added the comment: An Nth place is in the docstring: Keyword Arguments: - prog -- The name of the program (default: sys.argv[0]) - usage -- A usage

[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-10-23 Thread Roy Smith
Roy Smith added the comment: I'm working on a doc patch now... -- ___ Python tracker <http://bugs.python.org/issue13249> ___ ___ Python-bugs-list m

[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-10-23 Thread Roy Smith
Roy Smith added the comment: Patch attached. I just deal with putting all the items into the same order, not terry.reedy's idea for separating them into two groups. Added a recommendation to only use keywords, which seems sane given the number of arguments. -- keywords: +

[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-10-23 Thread Roy Smith
Roy Smith added the comment: PS -- this is against the 2.7 branch. -- ___ Python tracker <http://bugs.python.org/issue13249> ___ ___ Python-bugs-list mailin

[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-11-12 Thread Roy Smith
Roy Smith added the comment: New patch uploaded. The added recommendation is around line 161 (look for 'Recommended usage is to only use keyword arguments') -- Added file: http://bugs.python.org/file23667/Issue13249-2.patch ___ Pyth

[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-11-14 Thread Roy Smith
Roy Smith added the comment: Before I build another patch, would you be OK with leaving it as a note, but adding the "due to the number of arguments" language? There's a lot of text here, and people tend to just zoom in on the bits and pieces they need right now. I think th

[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-11-15 Thread Roy Smith
Roy Smith added the comment: Another patch, with the most recent review suggestions incorporated. -- Added file: http://bugs.python.org/file23703/Issue13249-3.patch ___ Python tracker <http://bugs.python.org/issue13

[issue12510] IDLE get_the_calltip mishandles raw strings

2011-07-06 Thread Roy Fox
New submission from Roy Fox : Hi, When you type (not copy-paste!) into an IDLE shell a string literal followed by ( you get a calltip. When the string contains a bad unicode escaping you get an error (see example below), which makes some sense. But when the string is raw, it isn't tr

[issue12628] urllib.request.urlopen gives empty response bodies for some sites

2011-07-23 Thread Roy Liu
New submission from Roy Liu : When testing urllib.request.urlopen in Python 3, I found that it gave empty responses for some sites. In other words, reading from the file-like object gives zero bytes. Python 2.x's urllib2.urlopen did not give this behavior. I isolated the problem down t

[issue10473] Strange behavior for socket.timeout

2010-11-20 Thread Roy Smith
New submission from Roy Smith : While investigating issue7322, I wrote a test case to demonstrate the issue. I made a mistake and called settimeout() on the wrong socket, but the result appears to demonstrate a different bug. When I run the attached test-issue7322.py on my OSX-10.6.5

[issue7322] Socket timeout can cause file-like readline() method to lose data

2010-11-20 Thread Roy Smith
Roy Smith added the comment: I'm looking into this now. In the meantime, I've opened a marginally-related bug, issue10473 -- nosy: +roysmith ___ Python tracker <http://bugs.python.

[issue7322] Socket timeout can cause file-like readline() method to lose data

2010-11-20 Thread Roy Smith
Roy Smith added the comment: Ataching a test case which demonstrates the bug. -- Added file: http://bugs.python.org/file19711/test-issue7322.py ___ Python tracker <http://bugs.python.org/issue7

[issue10473] Strange behavior for socket.timeout

2010-11-20 Thread Roy Smith
Roy Smith added the comment: Thank you for the detailed analysis. That certainly explains what I observed. Would it make sense for socket.makefile() to check to see if the socket is in blocking mode (assuming there is some reliable/portable way to perform this check), and raise some

[issue7322] Socket timeout can cause file-like readline() method to lose data

2010-11-20 Thread Roy Smith
Roy Smith added the comment: This is kind of ugly. On the one hand, I'm all for adding a check in makefile() to catch it being called on a non-blocking socket. On the other hand, you are correct that a user could change the mode leter. Even if we added checks for this in socket.setblo

[issue7995] On Mac / BSD sockets returned by accept inherit the parent's FD flags

2010-11-21 Thread Roy Smith
Roy Smith added the comment: The answer depends on what the socket module is trying to do. Is the goal simply to provide a pythonic thin wrapper over the underlying OS interfaces without altering their semantics, or to provide a completely homogeneous abstraction? Having attempted the

[issue7995] On Mac / BSD sockets returned by accept inherit the parent's FD flags

2010-11-21 Thread Roy Smith
Roy Smith added the comment: I got into this by starting with Issue7322, which reports a scenario where data is lost using makefile(). The docs for makefile() say, "The socket must be in blocking mode (it can not have a timeout)". So, we've got published documentation wh

[issue7995] On Mac / BSD sockets returned by accept inherit the parent's FD flags

2010-11-21 Thread Roy Smith
Roy Smith added the comment: Responding to msg122013: I think he exactly meant to equate the two. The original problem described in issue882297 is that the makefile() documentation only stated that the socket could not be in non-blocking mode. The test case presented didn't appear t

[issue11073] threading.Thread documentation can be improved

2011-01-30 Thread Roy Smith
New submission from Roy Smith : The documentation for the threading.Thread constructor says: "target is the callable object to be invoked by the run() method. Defaults to None, meaning nothing is called." This could be improved by explicitly stating that target is called in a stati

[issue11073] threading.Thread documentation can be improved

2011-01-30 Thread Roy Smith
Roy Smith added the comment: What I meant was whether target should be declared as @staticmethod or not. -- ___ Python tracker <http://bugs.python.org/issue11

[issue11073] threading.Thread documentation can be improved

2011-01-31 Thread Roy Smith
Roy Smith added the comment: Here's the code I ended up writing: class Foo(): def __init__(self): self.thread = Thread(target=Foo.runner, args=[self]) self.thread.start() @staticmethod def runner(self): # blah, blah, blah It was not immediately clear fro

[issue3585] pkg-config support

2008-08-17 Thread Clinton Roy
New submission from Clinton Roy <[EMAIL PROTECTED]>: This patch adds pkg-config support to the python build, a python.pc file is installed in the pkgconfig directory such that autoconf buildsystems can trivially link against the python library. Diff made against revision

[issue3585] pkg-config support

2008-08-18 Thread Clinton Roy
Clinton Roy <[EMAIL PROTECTED]> added the comment: Thanks for the comments Amaury, this patch uses ${VERSION} throughout so that it can be applied across branches. cheers, Added file: http://bugs.python.org/file11152/pkgconfig.diff ___ Python t

[issue3585] pkg-config support

2008-09-03 Thread Clinton Roy
Clinton Roy <[EMAIL PROTECTED]> added the comment: This version sets Libs.private for static compiles. Any chance this will make it into the 2.6/3.0 release candidates ? cheers, Added file: http://bugs.python.org/file11368/pkgconfig.diff ___ Python t

[issue3891] collections.deque should have empty() method

2008-09-17 Thread Roy Smith
New submission from Roy Smith <[EMAIL PROTECTED]>: Unless I'm missing something, the only way to tell if a deque is empty is to try and pop() something and catch the resulting IndexError. This is not only awkward, but mutates the data structure when you may not want to. It should

[issue3891] collections.deque should have empty() method

2008-09-17 Thread Roy Smith
Roy Smith <[EMAIL PROTECTED]> added the comment: I just realized my request may have been ambiguous; empty() is a predicate, not a verb. Doc should be something like: """Return true if the deque is empty. Return false otherwise.""" __

[issue3891] collections.deque should have empty() method

2008-09-17 Thread Roy Smith
Roy Smith <[EMAIL PROTECTED]> added the comment: Sigh. It looks like you can do what I want after all, by just using the deque object itself, i.e.: q = deque() while (q): ... This should be changed to a docs bug -- the doc page for deque should mention this, or include an example o

[issue3891] collections.deque should have empty() method

2008-09-17 Thread Roy Smith
Roy Smith <[EMAIL PROTECTED]> added the comment: In retrospect, it's obvious that "while mydeque" is indeed the way to process the queue, yet, when I was reading the docs, I didn't come away with that. The statement, "list objects support similar operations&qu

[issue3912] unittest. assertAlmostEqual() documentation incomplete

2008-09-19 Thread Roy Smith
New submission from Roy Smith <[EMAIL PROTECTED]>: The third argument, places, is optional, but no indication is given what value is used if it is omitted. -- assignee: georg.brandl components: Documentation messages: 73447 nosy: georg.brandl, roysmith severity: normal status

[issue3891] collections.deque should have empty() method

2008-09-19 Thread Roy Smith
Roy Smith <[EMAIL PROTECTED]> added the comment: I think you're missing the point. Imagine you are somebody who doesn't know Python internals. You're looking at the doc page for deque and ask yourself the question, "How do I tell if one of these is empty?".

[issue1873] threading.Thread.join() description could be more explicit

2008-01-19 Thread Roy Smith
New submission from Roy Smith: At http://docs.python.org/lib/thread-objects.html, under join(), it says: "As join() always returns None, you must call isAlive() to decide whether a timeout happened." This would be better if it were more explicit, i.e. "As join() always re

[issue2633] Improve subprocess.Popen() documentation ("env" parameter)

2008-04-14 Thread Roy Smith
New submission from Roy Smith <[EMAIL PROTECTED]>: http://docs.python.org/lib/node528.html (17.1.1 Using the subprocess Module) describes the "env" parameter thusly: If env is not None, it defines the environment variables for the new process. This is too vague to be usef

[issue2634] os.execvpe() docs need to be more specific

2008-04-14 Thread Roy Smith
New submission from Roy Smith <[EMAIL PROTECTED]>: Note: this is (sort of) related to Issue2633. http://docs.python.org/lib/os-process.html (14.1.5 Process Management). The docs for os.execvpe() say, "the env parameter must be a mapping which is used to define the environment va

[issue2639] shutil.copyfile() documentation is vague

2008-04-15 Thread Roy Smith
New submission from Roy Smith <[EMAIL PROTECTED]>: The current doc says, "Copy the contents of the file named src to a file named dst". Anybody used to the unix shell "cp" command would assume that dst could be a directory, in which case the true destination is a fi

[issue2639] shutil.copyfile() documentation is vague

2008-04-15 Thread Roy Smith
Roy Smith <[EMAIL PROTECTED]> added the comment: Reading closer, I see that copy() has the shell-like semantics I was expecting copyfile() to have. Perhaps the right fix is to include a note in the copyfile() docs saying, "dst must be a file path; see also copy() for a version w

[issue2701] csv.reader accepts string instead of file object (duck typing gone bad)

2008-04-26 Thread Roy Smith
New submission from Roy Smith <[EMAIL PROTECTED]>: If you pass csv.reader() a filename as its first argument: csv.reader('filename') instead of a file object like you're supposed to, you don't get an error. You instead get a reader object which returns the cha

[issue4257] Documentation for socket.gethostname() needs tweaking

2008-11-03 Thread Roy Smith
New submission from Roy Smith <[EMAIL PROTECTED]>: The docs say: Return a string containing the hostname of the machine where the Python interpreter is currently executing. If you want to know the current machine's IP address, you may want to use gethostbyname(gethostname()). Thi

[issue4538] ctypes could include data type limits

2008-12-04 Thread Roy Smith
New submission from Roy Smith <[EMAIL PROTECTED]>: It would be useful if ctypes included limiting constants for the various fixed-size integers, i.e. MAX_INT_32, MIN_INT_32, etc. Maybe it does and I just missed just didn't see it in the docs? -- assignee: theller compone

[issue4680] Queue class should include high-water mark

2008-12-16 Thread Roy Smith
New submission from Roy Smith : It would be nice if Queue.Queue included a way to access the high-water mark, i.e. the largest value which qsize() has ever reached. This is often useful when assessing application performance. I am assuming this is cheap, i.e. O(1), to provide

[issue4680] Queue class should include high-water mark

2008-12-17 Thread Roy Smith
Roy Smith added the comment: I'm suppose you could implement this in a subclass, but it would be inefficient. You'd have to over-ride put() and get(), call qsize(), then delegate to Base.put() and Base.get(). A cleaner solution would be in the C implementation of deque,

[issue4680] deque class should include high-water mark

2008-12-17 Thread Roy Smith
Roy Smith added the comment: I'm not actually sure what the use case is for clear(). It's easy enough to just create a new deque. If you can do that, why do you need clear()? Since I don't ever see a reason anybody would want to call clear(), I'm not 100% if it should

[issue4680] deque class should include high-water mark

2008-12-17 Thread Roy Smith
Roy Smith added the comment: And, FWIW, I did figure out a use case for clear(). I create a queue and pass it to two threads. One side or the other decides to abandon processing of the events currently in the queue. I can't just create a new queue, because you have no way to tel

[issue3585] pkg-config support

2009-01-04 Thread Clinton Roy
Clinton Roy added the comment: Is there anything I can do to move this forward at all? cheers, ___ Python tracker <http://bugs.python.org/issue3585> ___ ___ Python-bug

[issue1777134] minidom pretty xml output improvement

2009-02-09 Thread Roy Wood
Roy Wood added the comment: This patch would be very useful to me, so I'm sad to see it's been languishing for so long. :-( Is there any way to encourage the maintainer to merge this into the current branch? -- nosy: +rrwood ___ Pyth

[issue1777134] minidom pretty xml output improvement

2009-02-11 Thread Roy Wood
Roy Wood added the comment: Thanks! :-) On Wed, Feb 11, 2009 at 9:28 PM, Daniel Diniz wrote: > > Daniel Diniz added the comment: > > @Roy: we can try :) > > Patch updated, tests pass. However, keeping the default output and > adding an option to prettyprint should keep

[issue38462] Typo (nam ing) in import system docs

2019-10-13 Thread Roy Smith
New submission from Roy Smith : In https://docs.python.org/3.5/reference/import.html#importsystem, section "5.2 Packages", second sentence, the word "naming" is broken across two lines. In 3.7.5rc1 as well. Didn't check any others. -- assignee: docs@python

[issue38462] Typo (nam ing) in import system docs

2019-10-13 Thread Roy Smith
Roy Smith added the comment: Yeah, that's weird. Looks like this may be a Chrome bug. I'm seeing it in Chrome (Version 77.0.3865.90 (Official Build) (64-bit)), but not Safari. This is on MacOS (High Sierra). In the attached screenshot, I narrowed the window a bit. In

[issue43873] bz2.open() docs give conflicting defaults for mode

2021-04-16 Thread Roy Smith
New submission from Roy Smith : See https://docs.python.org/3.7/library/bz2.html For bz2.open(), the section header says: bz2.open(filename, mode='r' ...) but the text says: The mode argument ... The default is 'rb'. As I understand it, 'r' and 'rb'

[issue24258] BZ2File objects do not have name attribute

2021-04-26 Thread Roy Smith
Change by Roy Smith : -- nosy: +roysmith ___ Python tracker <https://bugs.python.org/issue24258> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24258] BZ2File objects do not have name attribute

2021-04-27 Thread Roy Smith
Roy Smith added the comment: The https://bitbucket.org/cliff/cpython#python24258 URL 404's Looking at the attached bz2.py diff, I would change: if isinstance(filename, (str, bytes, os.PathLike)): self._fp = _builtin_open(filename, mode) +self.fil

[issue44534] unittest.mock.Mock.unsafe doc is garbled

2021-06-29 Thread Roy Smith
New submission from Roy Smith : At https://docs.python.org/3.9/library/unittest.mock.html#unittest.mock.Mock, it says: unsafe: By default if any attribute starts with assert or assret will raise an AttributeError. That's not an English sentence. I think what was intended was, "

[issue38462] Typo (nam ing) in import system docs

2019-11-27 Thread Roy Smith
Roy Smith added the comment: Just for the archives: https://bugs.chromium.org/p/chromium/issues/detail?id=1022011 -- ___ Python tracker <https://bugs.python.org/issue38

[issue16399] argparse: append action with default list adds to list instead of overriding

2019-12-25 Thread Roy Smith
Roy Smith added the comment: I just got bit by this in Python 3.5.3. I get why it does this. I also get why it's impractical to change the behavior now. But, it really isn't the obvious behavior, so it should be documented at https://docs.python.org/3.5/library/argparse.html

[issue35105] Document that CPython accepts "invalid" identifiers

2020-07-02 Thread Roy Smith
Roy Smith added the comment: Just as another edge case, type() can do the same thing: Foo = type("Foo", (object,), {"a b": 1}) f = Foo() for example, will create a class attribute named "a b". Maybe this actually calls setattr() under the covers, but if i

[issue37554] Typo in os.rename docs

2019-07-10 Thread Roy Wellington
New submission from Roy Wellington : The documentation for os.rename (e.g., here, https://docs.python.org/3/library/os.html#os.rename but also for 3.8 and 3.9) currently reads, > On Unix, if src is a file and dst is a directory or vice-versa, anq:q > IsADirectoryErro

[issue30432] FileInput doesn't accept PathLike objects for file names

2017-05-22 Thread Roy Williams
New submission from Roy Williams: ``` from fileinput import FileInput from pathlib import Path p = Path('.') FileInput(p) ``` Results in: Traceback (most recent call last): File "", line 1, in File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/V

[issue30432] FileInput doesn't accept PathLike objects for file names

2017-05-22 Thread Roy Williams
Changes by Roy Williams : -- pull_requests: +1822 ___ Python tracker <http://bugs.python.org/issue30432> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30432] FileInput doesn't accept PathLike objects for file names

2017-05-22 Thread Roy Williams
Roy Williams added the comment: @arp11 sorry for the too-minimal repro :D - the issue is with FileInput attempting to cast `files` to a tuple. Instead, if passed a PathLike object FileInput should set `files` to a tuple just as it does with a str

[issue30605] re.compile fails when compiling bytes under `-bb` mode

2017-06-08 Thread Roy Williams
New submission from Roy Williams: import re re.compile(br'^(.*?)$(?m)') -- components: Regular Expressions messages: 295473 nosy: Roy Williams, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: re.compile fails when compiling bytes under `-bb` mod

[issue30605] re.compile fails when compiling bytes under `-bb` mode

2017-06-08 Thread Roy Williams
Roy Williams added the comment: Repro: ``` import re re.compile(br'^(.*?)$(?m)') ``` Results in ``` Traceback (most recent call last): File "test_compile.py", line 2, in re.compile(br'^(.*?)$(?m)') File "/usr/lib/python3.6/re.py", line 233

[issue30605] re.compile fails when compiling bytes under `-bb` mode

2017-06-08 Thread Roy Williams
Changes by Roy Williams : -- pull_requests: +2081 ___ Python tracker <http://bugs.python.org/issue30605> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2017-11-06 Thread Roy Williams
New submission from Roy Williams : Repro: ```python from pathlib import Path import subprocess subprocess.run([Path('/bin/ls')]) # Works Fine subprocess.run(Path('/bin/ls')) # Fails ``` The problem seems to originate from here: https://github.com/python/cpython/blob/mast

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2017-11-06 Thread Roy Williams
Roy Williams added the comment: Ignore my comment re: pathlib, it looks like PathLike is defined in `os` and not `pathlib`. -- ___ Python tracker <https://bugs.python.org/issue31

[issue34288] Declare sethostname in socketmodule.c for SOLARIS

2018-07-31 Thread Roy Belio
New submission from Roy Belio : Following issue 18259 which was solved by extern sethostname I managed to build python 3.7 on solaris only after patching away the ifdef for _AIX. We need to add SOLARIS flag and check for that also in the same line of #ifdef _AIX. This error only appears in

[issue31710] setup.py: _ctypes won't getbuilt when system ffi is only in $PREFIX

2018-08-02 Thread Roy Belio
Roy Belio added the comment: Also happens on suse 11 x86_64 with python 3.7 Same issue exactly building locally (but with cross compiling flag for system independency) Building our own libffi 3.2.1 and adding it in the CPPFLAGS includes. -- nosy: +rbelio

[issue31710] setup.py: _ctypes won't get built when system ffi is only in $PREFIX

2018-08-02 Thread Roy Belio
Roy Belio added the comment: Sure, I'll attach it. one more thing to mention is that during configure it printed: configure: WARNING: --with(out)-system-ffi is ignored on this platform We are also providing all the dependency libraries ourselves (building, linking, h files and what no

[issue31710] setup.py: _ctypes won't get built when system ffi is only in $PREFIX

2018-08-02 Thread Roy Belio
Roy Belio added the comment: as seen in the config.log: LIBFFI_INCLUDEDIR='/root/rc3/dist/lib/libffi-3.2.1/include' I'm attaching the config.log just in case -- Added file: https://bugs.python.org/file47729/config.log ___ Python

[issue34461] Availability of parsers in etree initializer

2018-08-22 Thread nilanjan roy
New submission from nilanjan roy : As xml package make the availability of separate global name-space by *__all__* so considerably *etree* should have included of all the parser files in its initialize(i.e. in *__init__.py*). So if any script consider as "from xml import *" t

[issue34461] Availability of parsers in etree initializer

2018-09-03 Thread nilanjan roy
nilanjan roy added the comment: @scoder: *xml* package organization have little confusion 1. Current xml have exposed all the sub-packages from *__all__* scope from the initializer - so there are possibilities to write code from script a. *import xml as x* or *import xml.somepackage as x

[issue34461] Availability of parsers in etree initializer

2018-09-03 Thread nilanjan roy
nilanjan roy added the comment: @serhiy.storchaka: If I concur with your comment then probably declaration of *__all__** over xml initializer(__init__) is little contradictory - because whenever we declare __all__ to enable global-scope means API provides the flexibility to use * during

[issue19006] UnitTest docs should have a single list of assertions

2013-09-11 Thread Roy Smith
New submission from Roy Smith: http://docs.python.org/2/library/unittest.html#assert-methods The docs say, "The TestCase class provides a number of methods to check for and report failures, such as", and then when you scroll a couple of screens down, there's another list,

[issue19006] UnitTest docs should have a single list of assertions

2013-09-11 Thread Roy Smith
Roy Smith added the comment: Adding a note that there are more methods in the tables below would be useful. Otherwise, you assume you've seen them all when you've read the first table. I agree that the assertions about exceptions and warnings belong in a different group, but I don

[issue15265] random.sample() docs unclear on k < len(population)

2012-07-06 Thread Roy Smith
New submission from Roy Smith : The docs don't say what happens if you call random.sample() with a population smaller than k. Experimentally, it raises ValueError, but this should be documented. I would have guessed it would return IndexError, by analogy to random.c

[issue15265] random.sample() docs unclear on k < len(population)

2012-07-07 Thread Roy Smith
Roy Smith added the comment: The docs describe population as a "sequence". Your patch describes it as a "list". I would go with: If *len(population)* is less than *k*, raises :exc:`ValueError`. -- ___ Python tracker <

[issue15575] Tutorial is unclear on multiple imports of a module.

2012-08-07 Thread Roy Smith
New submission from Roy Smith: Opening this bug at Ben Finney's request. See https://groups.google.com/forum/?fromgroups#!topic/comp.lang.python/wmDUrpW2ZCU for the full thread discussing the problem. Here's a significant excerpt: ---

[issue15873] "datetime" cannot parse ISO 8601 dates and times

2012-09-09 Thread Roy Smith
Roy Smith added the comment: We need to define the scope of what input strings will be accepted. ISO-8601 defines a lot of stuff which we may not wish to accept. Do we want to accept both basic format (MMDD) and extended format (-MM-DD)? Do we want to accept things like "1985-

[issue15873] "datetime" cannot parse ISO 8601 dates and times

2012-09-09 Thread Roy Smith
Roy Smith added the comment: I see I mis-stated my example. When I wrote: s = str(d1) d2 = datetime.datetime(s) assert d1 == d2 what I really meant was: s = d1.isoformat() d2 = datetime.datetime(s) assert d1 == d2 But, now I realize that while that is certainly an absolute lower bound, it&#

[issue15873] "datetime" cannot parse ISO 8601 dates and times

2012-09-10 Thread Roy Smith
Roy Smith added the comment: I've started collecting some test cases. I'll keep adding to the collection. I'm going to start trolling ISO 8601:2004(E) for more. Let me know if there are other sources I should be considering. -- ___

[issue15873] "datetime" cannot parse ISO 8601 dates and times

2012-09-10 Thread Roy Smith
Roy Smith added the comment: Ooops, clicked the wrong button. -- Added file: http://bugs.python.org/file27165/test-cases.py ___ Python tracker <http://bugs.python.org/issue15

[issue16623] argparse help formatter does not honor non-breaking space

2012-12-05 Thread Roy Smith
New submission from Roy Smith: Running this code: --- import argparse p = argparse.ArgumentParser() p.add_argument('--foo', help=u'This is a very long help string. ex: "--s3\u00A0s3://my.bucket/dir1/

[issue6792] Distutils-based installer does not detect 64bit versions of Python

2012-12-12 Thread Roy Jacobson
Roy Jacobson added the comment: This bug is a really annoying one, any chance it will be fixed in 2.7? It's really a matter when you want to deploy a program using distutils (my case), because you cannot really require your clients to edit the registry themselves :/ Is there any problem

[issue14452] SysLogHandler sends invalid messages when using unicode

2013-01-09 Thread Roy Smith
Changes by Roy Smith : -- nosy: +roysmith ___ Python tracker <http://bugs.python.org/issue14452> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17113] argparse.RawDescriptionHelpFormatter should not delete blank lines

2013-02-03 Thread Roy Smith
New submission from Roy Smith: The following code, when run with "--help", omits the trailing newlines from the epilog. It should just emit the string verbatim. If the developer didn't want the extra newlines, he/she wouldn't have put them there. im

[issue17184] re.VERBOSE doesn't respect whitespace in '( ?P...)'

2013-02-11 Thread Roy Smith
New submission from Roy Smith: # Python 2.7.3 # Ubuntu 12.04 import re pattern = r"( ?P.*)" regex = re.compile(pattern, re.VERBOSE) The above raises an exception in re.compile(): Traceback (most recent call last): File "./try.py", line 6, in regex = re.compile

[issue15606] re.VERBOSE whitespace behavior not completely documented

2013-02-11 Thread Roy Smith
Changes by Roy Smith : -- nosy: +roysmith ___ Python tracker <http://bugs.python.org/issue15606> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11204] re module: strange behaviour of space inside {m, n}

2013-02-11 Thread Roy Smith
Changes by Roy Smith : -- nosy: +roysmith ___ Python tracker <http://bugs.python.org/issue11204> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19006] UnitTest docs should have a single list of assertions

2013-09-13 Thread Roy Smith
Roy Smith added the comment: The new text suggested by terry.reedy works for me. -- ___ Python tracker <http://bugs.python.org/issue19006> ___ ___ Python-bug

[issue19416] NNTP page has incorrect links

2013-10-27 Thread Roy Smith
New submission from Roy Smith: http://docs.python.org/2/library/nntplib.html contains intra-page references such as: NNTP.next() Send a NEXT command. Return as for stat(). The problem is that the link for "stat" points to the stat module (i.e. http://docs.python.org/2/library

[issue21879] str.format() gives poor diagnostic on placeholder mismatch

2014-06-29 Thread Roy Smith
New submission from Roy Smith: https://mail.python.org/pipermail/python-list/2014-June/674188.html -- messages: 221846 nosy: roysmith priority: normal severity: normal status: open title: str.format() gives poor diagnostic on placeholder mismatch

[issue21879] str.format() gives poor diagnostic on placeholder mismatch

2014-06-29 Thread Roy Smith
Roy Smith added the comment: (ugh, hit return too soon) >>> '{1}'.format() Traceback (most recent call last): File "", line 1, in IndexError: tuple index out of range This is a confusing error message. The user hasn't written any tuples, so a message abo

[issue21956] Doc files deleted from repo are not deleted from docs.python.org.

2014-07-11 Thread Audrey Roy
Audrey Roy added the comment: > Since it isn't linked from the 3.4 index, it may be more effort than > it is worth to get someone to delete the file from the 3.4 tree on the > server. It would be worthwhile to delete or fix it in the 2.7 and 3.4 tree. It accidentally gets

[issue21956] Doc files deleted from repo are not deleted from docs.python.org.

2014-07-11 Thread Audrey Roy
Audrey Roy added the comment: Mark, I and a number of others simply misinterpreted the text in that section. -- ___ Python tracker <http://bugs.python.org/issue21

[issue22089] collections.MutableSet does not provide update method

2014-07-26 Thread Roy Wellington
New submission from Roy Wellington: Inheriting from collections.MutableSet mixes in several methods, however, it does not mix in a .update method. This can cause a variety of confusion if you expect a MutableSet to act like a set. Moreover, MutableMapping does provide a .update method, which

[issue22167] iglob() has misleading documentation (does indeed store names internally)

2014-08-07 Thread Roy Smith
New submission from Roy Smith: For background, see: https://mail.python.org/pipermail/python-list/2014-August/676291.html In a nutshell, the iglob() docs say, "Return an iterator which yields the same values as glob() without actually storing them all simultaneously." The

[issue22167] iglob() has misleading documentation (does indeed store names internally)

2014-08-07 Thread Roy Smith
Roy Smith added the comment: The thread that led to this started out with the use case of a directory that had 200k files in it. If I ran iglob() on that and discovered that it had internally generated a list of all 200k names in memory at the same time, I would be pretty darn surprised

  1   2   >