New submission from Chris Bremner :
Looking in the documentation for inspect.getcallargs
(https://docs.python.org/3/library/inspect.html#inspect.getcallargs), it
appears that inspect.getcallargs is deprecated in favor of
inspect.Signature.bind and inspect.Signature.bind_partial.
However
Chris Jerdonek added the comment:
Okay, I thought a partial object was supposed to "look" like a function.
I'm okay with closing this.
--
resolution: -> rejected
___
Python tracker
<https://bugs.
Chris Jerdonek added the comment:
> It shouldn't be the __qualname__ of the wrapped function
Yes, I agree with you. I was thinking it should be similar to what it would be
for a function defined at the same location.
--
___
Python tracker
Chris Jerdonek added the comment:
Sorry, I'm out of practice. I thought I closed this when I marked it rejected.
--
___
Python tracker
<https://bugs.python.org/is
Chris Jerdonek added the comment:
Closing this as a duplicate. Please carry over to issue 27682 any PR's that are
still current.
--
nosy: +chris.jerdonek
resolution: -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder: -> wsgiref: Wi
Change by Chris Jerdonek :
--
stage: -> test needed
title: wsgiref: Windows Error 10053, ConnectionAbortedError: [WinError 10053]
An established connection was aborted by the software in your host machine ->
wsgiref BaseHandler / SimpleHandler can raise additional error
Chris Jerdonek added the comment:
This seems like a bug in wsgiref.BaseHandler to me. BaseHandler.run() calls
handle_error() if an error occurs inside finish_response():
https://github.com/python/cpython/blob/e2ed5adcb5db2d70cfa72da1ba8446f7aa9e05cd/Lib/wsgiref/handlers.py#L141
However
Chris Jerdonek added the comment:
> In the pydev thread, Guido said "My feeling is that limiting it to strings is
> fine, but checking those strings for resembling identifiers is pointless and
> wasteful."
But in a later message, after additional discussion, he acknowled
Chris Jerdonek added the comment:
This may or may not be the same as what you're suggesting, Martin. But is
another option to make close() a no-op if it is called a second time?
Otherwise, it seems we'd need to make sure that no code path can result in
close() being called t
New submission from Chris Withers :
$ python3
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 26 2018, 23:26:24)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from unittest.mock import c
Chris Withers added the comment:
I don't think the getattr(self, 'parent', None) is necessary, the attribute is
always there and None == None ;-)
I reckon this will work:
if self.parent != other.parent):
return True
...but obviously, we'd add some more tests to th
Chris Withers added the comment:
I'm chatting with Michael already (on Facebook of all places), and I use this
feature heavily and deeply, being one of the people who originally requested it.
I'm both happy and capable of seeing this through, so no need for anyone else
Chris Withers added the comment:
Assuming the PR is merged, what do I need to do for 3.7 and 3.6 backports?
There's no doubt a doc for this somewhere, so please just point me at it :-)
--
___
Python tracker
<https://bugs.python.org/is
New submission from Chris AtLee:
cgi.FieldStorage uses fp.readline(1 << 16) to read in POSTed file data if no
content length has been specified. All HTTP clients I've looked at terminate
the file body with CRLF and then the final MIME boundary. If the file body is
65,535 bytes,
Chris AtLee added the comment:
This is a possible fix to this issue. It's not as clean as I'd like, but the
simpler versions I tried could end up with the entire file contents in memory
for degenerate (or malicious) inputs.
The trick is handling the case where the current line en
Chris AtLee added the comment:
To demonstrate how to hit this in a real use case, run the attached script
which implements a simple http server that saves POSTed files to a local file
"got_data". It returns the sha1sum of the POSTed file as the http response.
Then, create a
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue10581>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue18163>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue18166>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue18162>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue18170>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris AtLee added the comment:
Thanks, your patch is definitely much simpler!
I was worried about the case where you have interrupted \r\n that appears in
the middle of the content. But that case is handled by the next readline(),
which returns a single \n.
One question about the tests
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue18335>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Chris Siebenmann:
socket.fromfd() requires you to supply at least the family and type of
the file descriptor that you are turning into a Python socket object.
However the socket module provides no documented way to determine what
these actually are and there are any number of
Chris Siebenmann added the comment:
As far as I know, you can recover everything except the protocol
portably on Unix (and fromfd() will already handwave the protocol).
getsockopt() with SO_TYPE will give you the type. The family can be
recovered by calling getsockname() with a plain struct
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue18406>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue18369>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue18264>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue18436>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Chris Lambacher:
When an Enum is being created, the _value2member_map class property is defined
to speed lookup of Enum values later on. If the value does not exist then it
falls back to a linear search through the _member_map.values() looking for
member.value == value
New submission from Chris Lambacher:
Starting at line 153 in enum.py there is:
153 if not use_args:
154 enum_member = __new__(enum_class)
155 original_value = value
156 else:
157 enum_member = __new__
New submission from Chris Curvey:
on http://docs.python.org/2/library/multiprocessing.html, there is a bit about
how to use a Pool properly, which looks like this
pool = Pool(processes=4) # start 4 worker processes
result = pool.apply_async(f, [10])
What this neglects to mention
New submission from Chris Lambacher:
It would be useful to set the discovered member_type to the Enum class and not
just the instance. Attached is a patch to add _member_type_ to the enum_class.
--
files: enum_member_type_on_class.patch
keywords: patch
messages: 194199
nosy: lambacck
Chris Lambacher added the comment:
My use case is a generic mixin for Enums and a generic mixin for Django ORM
fields that uses the Enums to generate choices.
The Enum mixin has to call cls.__class__._get_mixins_(cls.__bases__) to get the
member_type so that it can call the member_type
Chris Jerdonek added the comment:
I'm still getting hit with this. In what versions is it okay for us to fix the
bad API, as Michael suggested?
--
___
Python tracker
<http://bugs.python.org/i
Chris Rebert added the comment:
Here's a quick stab at 2/3rds of an implementation, and some docs.
--
Added file: http://bugs.python.org/file25310/shutil_open.py
___
Python tracker
<http://bugs.python.org/i
Chris Rebert added the comment:
> # or os.name == 'mac' ???
Nope, that refers to retro Mac OS 9 (and probably lower). Mac OS X is 'posix'
for os.name purposes.
--
___
Python tracker
<http:/
Chris Rebert added the comment:
`operation` seems questionable. IMO, the verbs seem stronger / more important
than mere optional suggestions (particularly "open" vs. "edit" for files with
read-only viewers), and only Windows supports them (so anyone requiring that
featur
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue14616>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Rebert added the comment:
No, it isn't. Changing the `IOError(errno.ENOENT, "...`s to
`FileNotFoundError("...`s would half fix it.
The other half, the `OSError(errno.ENOSYS)`s, has a FIXME for what's the right
error to raise in that case ("no application asso
New submission from Chris Jerdonek :
When invoking doctest.DocTestSuite's constructor with a module that has no
docstrings, doctest raises the following exception:
...
File
"/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/doctest.py",
line 2280,
Chris Rebert added the comment:
>> ENOSYS was the closest approximation I could find. Thoughts? Custom
>> error class? Different errno? Something else?
>
> Why not ValueError?
Because the value they provided was perfectly valid (the file/directory *did*
exist), so the ca
Chris Rebert added the comment:
Hobs, why is exit code 4 of xdg-open (which the manpage describes as the
extremely generic "The action failed.") interpreted as FileNotFoundError in
your new version?
--
___
Python tracker
<http://bu
Chris Rebert added the comment:
Also:
The FileNotFoundErrors quote the path twice:
Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53)
>>> path = "/foo/bar"
>>> print "Path '%s' may not exist" % repr(path)
Path ''/f
Chris Rebert added the comment:
The xdg-open source code
(http://cgit.freedesktop.org/xdg/xdg-utils/tree/scripts/xdg-open ) shows that
exit code 4 is used whenever an invocation of another opener script (e.g.
kde-open, gnome-open) fails for any reason besides said script not being
installed
Chris Rebert added the comment:
>> The semantics of "associated application" change considerably from
>> operating system to operating system. As an example,
>> ``os.startfile("a.py")`` will usually run `a.py` in the Python
>> interpreter, whil
Changes by Chris Rebert :
Added file: http://bugs.python.org/file25332/shutil_open.patch
___
Python tracker
<http://bugs.python.org/issue3177>
___
___
Python-bugs-list m
Chris Lambacher added the comment:
I am really happy to see this as an option in the Windows installer. This has a
potential to really reduce the support burden on training new Windows users to
use Python and will really help normalize the experience for new users between
Windows and POSIX
Chris Lambacher added the comment:
The reason for the conditional approach was to attempt to account for the
"negative consequences" of adding enabling this by default. i.e. if you are
already a Python developer and install a new version, it will be status quo,
but if you are a
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue9530>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue13968>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue10427>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Chris Bergstresser :
The datetime module says:
An object d of type time or datetime may be naive or aware. d is aware if
d.tzinfo is not None and d.tzinfo.utcoffset(d) does not return None. If
d.tzinfo is None, or if d.tzinfo is not None but d.tzinfo.utcoffset(d) returns
Chris Bergstresser added the comment:
It doesn't seem to be a bug in pytz. AFAICT, the only methods that get called
during the time comparison is "utcoffset" on the UTC timezone, and "utcoffset"
on the New York timezone.
Looking closer at it, it seems t
Chris Rebert added the comment:
Any reactions to the strawman wording for the entry?
--
___
Python tracker
<http://bugs.python.org/issue14187>
___
___
Python-bug
Chris Bergstresser added the comment:
That patch fixes the documentation there, but the description at the top of the
distinction between naive and aware time objects at the top datetime module is
still wrong. Here it is:
-
There are two kinds of date and time objects
Chris Rebert added the comment:
Here's an actual patch.
--
keywords: +patch
Added file: http://bugs.python.org/file25544/func_annotation.patch
___
Python tracker
<http://bugs.python.org/is
New submission from Chris Jerdonek :
pkgutil.walk_packages(paths) seems to return incorrect results when the name of
a subpackage of a path in paths matches the name of a package in the standard
library. It both excludes modules it should include, and includes modules it
should exclude
Chris Jerdonek added the comment:
I'd like to see this enhancement as well. It seems that not even a TextWrapper
is capable of a simple indent (because TextWrapper methods operate on
"paragraphs" rather than lines).
--
nosy: +cjerdonek
___
Chris Jerdonek added the comment:
Should the function work for strings with non-Unix line endings?
http://docs.python.org/dev/py3k/reference/lexical_analysis.html#physical-lines
For example, should indent("abc\r\n", "") return the same string, and should
"\r\n
Chris Rebert added the comment:
Right, I can see how the 3rd paragraph has become tangential given the refined
scope of the entry.
What do people think about a separate entry:
"annotation"
Can refer to either a `function annotation` or some uses of
`d
Changes by Chris Rebert :
Added file: http://bugs.python.org/file25568/function_annotation_v2.patch
___
Python tracker
<http://bugs.python.org/issue14187>
___
___
Pytho
Chris Rebert added the comment:
Patch to mention shlex.quote() in the `subprocess` module's "Frequently Used
Arguments" Warning box. Could perhaps be a separate Note, but that could be
clutter-y.
--
keywords: +patch
Added file: http://bugs.pytho
Chris Rebert added the comment:
Re: Nick's comments:
Besides `close_fds`, what other Popen parameters currently have suboptimal
defaults?
--
___
Python tracker
<http://bugs.python.org/i
Chris Rebert added the comment:
Draft docs patch. More cross-referencing. Analysis of deviations from RFC based
on previous docs & the RFC.
Don't know if there are relevant, more precise implementation limitations that
need to be mentioned.
If backported to 2.x, will need to cover
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue14805>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue14757>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Rebert :
Added file: http://bugs.python.org/file25592/json.rst.patch
___
Python tracker
<http://bugs.python.org/issue14674>
___
___
Python-bugs-list m
Chris Rebert added the comment:
New revision per Éric's Rietveld feedback.
Sidenote: Is there any way to get notified of these reviews? I only saw it
because I happened to click the "review" link on a lark.
--
Added file: http://bugs.python.org/file25594
Chris Rebert added the comment:
The "import json"s were left for uniformity with the other code samples in the
module's docs.
Also, here's what the pedantically-strict recipes might look like:
def _reject_inf_nan(string):
if string in {'-Infinity',
Chris Rebert added the comment:
Further copyediting.
--
Added file: http://bugs.python.org/file25595/json.rst.patch
___
Python tracker
<http://bugs.python.org/issue14
Chris Rebert added the comment:
Reflect broader scope
--
title: Add link to RFC 4627 from json documentation -> Link to & explain
deviations from RFC 4627 in json module docs
___
Python tracker
<http://bugs.python.org/
Chris Rebert added the comment:
>> for key, value in pairs:
>> if key in pairs:
>
> "if key in obj:"?
Yes, obviously. :-) It wrote those very late at night.
@Ezio: These were per Éric's feedback but
Chris Rebert added the comment:
Notification of any future Rietveld comments would be appreciated.
--
Added file: http://bugs.python.org/file25603/json.rst.patch
___
Python tracker
<http://bugs.python.org/issue14
Changes by Chris Rebert :
Removed file: http://bugs.python.org/file25592/json.rst.patch
___
Python tracker
<http://bugs.python.org/issue14674>
___
___
Python-bugs-list m
Changes by Chris Rebert :
Added file: http://bugs.python.org/file25606/json.rst.patch
___
Python tracker
<http://bugs.python.org/issue14674>
___
___
Python-bugs-list m
Changes by Chris Rebert :
Removed file: http://bugs.python.org/file25591/json.rst.patch
___
Python tracker
<http://bugs.python.org/issue14674>
___
___
Python-bugs-list m
Chris Rebert added the comment:
Patch. Though I ponder whether the expression in question might be equivalent
to simply:
type(obj).__name__.replace('_', ' ')
--
keywords: +patch
nosy: +cvrebert
Added file: http://bugs.python.org/file256
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue14845>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Rebert added the comment:
So, does the refactored patch need any further revising, or is it good to go?
--
___
Python tracker
<http://bugs.python.org/issue14
Chris Rebert added the comment:
Hopefully final revision. Thanks for the quick response Éric!
Changes:
- Cover `ensure_ascii` parameter per latest review comment
- Add enhanced "Character Encodings" section for 2.x backport
-- Cover `encoding` parameter & restriction
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue14872>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue14880>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue14617>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue1191964>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue1260171>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Rebert added the comment:
Eh, just needs clarification along the lines of:
"Exceptions raised in the child ++Python++ process"
"A ValueError will be raised if Popen is called with invalid arguments
++whose validity is not dependent upon the state of
Chris Rebert added the comment:
The term "invalid arguments" in "A ValueError will be raised if Popen is called
with invalid arguments." is still vague. One could well argue that a
nonexistent executable or bad command is "invalid". Anything resulting in an
OSEr
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue14886>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
Perhaps because that's what str.split() does:
>>> "a\nb".split("\n")
['a', 'b']
>>> "a\nb\n".split("\n")
['a', 'b', '']
>>> "a\nb\n
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue12779>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
Thanks. It looks like the issue with the latest patch is caused by side
effects of calling importlib.import_module().
Working from the patch, I got it to the point where inserting the following
four lines somewhere in the code--
try
Chris Jerdonek added the comment:
See also issue 14787 re: walk_packages(), which also affects versions before
3.3.
--
nosy: +cjerdonek
___
Python tracker
<http://bugs.python.org/issue14
Chris Jerdonek added the comment:
Because we don't know if the rest of the test code will adhere to this, we
might want to consider clearing the cache before each test as well.
Alternatively, we could avoid having to call importlib.invalidate_caches() at
all (and having to think abou
Chris Jerdonek added the comment:
That sounds fine. I just got the sense from above that there was a desire to
call invalidate_caches() as few times as possible.
And yes, I agree only before is necessary. I had just taken what you said
above literally (that "[the cache] should be res
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue14966>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Chris Rebert :
--
nosy: +cvrebert
___
Python tracker
<http://bugs.python.org/issue15039>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Jerdonek added the comment:
Great. Looks good!
--
___
Python tracker
<http://bugs.python.org/issue13857>
___
___
Python-bugs-list mailing list
Unsubscribe:
Chris Withers added the comment:
It's the fact that for immutable types, initialization is done in __new__
instead of __init__ that isn't documented anywhere.
This should be Python-level rather than C-level documentation.
The example I gave in #msg76473 is confusing without doc
Chris Withers added the comment:
Probably also wouldn't go amiss to put some notes near the docs for common
immutable types that people might subclass: datetime, maybe tuple?
--
___
Python tracker
<http://bugs.python.org/i
801 - 900 of 2758 matches
Mail list logo