New submission from Andy Maier :
MappingProxyType objects can currently be initialized from a string object.
Given is purpose, I think this is a bug and should result in TypeError being
raised.
Example code (on CPython 3.9.1):
>>> from types import MappingProxyType
>>> mp
Change by Andy Maier :
--
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue43828>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Andy Maier :
Objects of MappingProxyType do expose a __hash__() method, but if the
underlying mapping is hashable, it still does not support hashing it.
Example:
Content of mp_hash.py:
--
#!/usr/bin/env python
from nocasedict import NocaseDict, HashableMixin
from
Andy Maier added the comment:
I accept that the issue was closed, but wanted to document some things:
1. The dict class manages very well to detect that a string is invalid input:
>>> d = dict('abc')
Traceback (most recent call last):
File "", line 1, in
New submission from Andy Maier :
Hello, we have a nasty occurrence of BadStatusLine that shows the status line
of the request(!!) in one of our projects. That exception is raised when
checking a response and should check the response, not the request.
Further debugging revealed that not
Andy Maier added the comment:
I should have added that my local system is macOS, and that "up to 3.9" means I
only tried up to 3.9.
--
___
Python tracker
<https://bugs.python.o
New submission from Andy Maier :
A user of our pywbem package gets an SSLError with message "[SSL] EC lib
(_ssl.c:728)" when invoking the connect() method on an SSL wrapped socket. See
https://github.com/pywbem/pywbem/issues/1950.
The issue is that with this error message, it is no
Andy Maier added the comment:
More details about the environment this happens on:
Python 3.5.7 (default, Aug 16 2019, 10:17:32)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux
--
___
Python tracker
<https://bugs.python.org/issue38
Andy Maier added the comment:
Our user was able to fix this issue by upgrading the OpenSSL version used on
the client side from 1.0.1e-fips to 1.1.1.
It seems to me that Python's SSL support cannot do anything about this issue.
As far as I'm concerned ths issue can
Andy Maier added the comment:
Thanks for the help, Christian!
--
___
Python tracker
<https://bugs.python.org/issue38810>
___
___
Python-bugs-list mailin
New submission from Andy Maier :
Unpickling an object of a user class that derives from list seems to miss
calling the user class's __init__() method:
Consider this script, which defines a derived class of the built-in list for
the purpose of creating a case insensitive list. The
New submission from Andy Maier :
I found that os.path.relpath() on Windows raises ValueError when the path and
the start path are on different drives. This is to be expected, as there is no
single root on Windows.
On Python 3.7, the behavior is:
>>> os.path.relpath(
New submission from Andy Maier :
I stumbled across the problem reported in https://bugs.python.org/issue25030 on
Python 3.8:
>>> with open('x.txt', 'a') as fp:
... fp.seek(0, whence=os.SEEK_END)
...
Traceback (most recent call last):
File "",
Andy Maier added the comment:
Thanks for referencing the PR that reintroduced the old way of documenting it.
>From my perspective, the proposal is fine. There are already some cases where
>it is documented like that, e.g. str.removeprefix(
Andy Maier added the comment:
Thanks for the clarification.
Just for the record:
I have implemented __setstate__() such that it completely restores the state
from just the inherited list state. That makes it independent of whether
__init__() or __new__() is called:
def __getstate__
Andy Maier added the comment:
And just to be complete: That did not require implementing __reduce__().
--
___
Python tracker
<https://bugs.python.org/issue41
New submission from Andy Maier :
Python 3.7 removed support for passing the argument to the built-in functions
int(), bool(), float(), list() and tuple() as a keyword argument.
This change is described in the "What's New" for 3.7
(https://docs.python.org/3/whatsnew/3.7.html)
New submission from Andy Maier:
Using the enum34 backport of enums, the help() function on an enum class Colors
displays only:
---
Help on class Colors in module __main__:
Colors =
---
Source code to reproduce:
---
from enum import Enum # enum34 package
class Colors(Enum
Andy Maier added the comment:
The pydoc.py of Python 3.4 that supposedly has been fixed has a lot of changes
compared to 2.7, but the place where I applied my "fix" in TextDoc.docclass()
is unchanged.
So it seems that my fix should be regarded only to be a quick fix, and the real
Andy Maier added the comment:
Using Ethan's sample code (Thanks!!), I was pointed in the right direction and
was able to produce a simple piece of code that reproduces the behavior without
depending on enum34, as well as a proposal for a fix in pydoc.py.
The problem can be reproduced w
Andy Maier added the comment:
Here is the bug2.py file pasted into the previous message, for convenience.
--
Added file: http://bugs.python.org/file35502/bug2.py
___
Python tracker
<http://bugs.python.org/issue21
Andy Maier added the comment:
Attaching the patch for pydoc.py, relative to the tip of 2.7. the patch
contains just the proposed fix, and no longer the debug prints.
--
keywords: +patch
Added file: http://bugs.python.org/file35673/pydoc.py.patch
Andy Maier added the comment:
Attaching the patch for Lib/test/test_pydoc.py, relative to the tip of 2.7. The
patch adds a testcase test_class_with_metaclass(), which defines a class that
provokes the buggy behavior, and verifies the fix.
--
Added file: http://bugs.python.org
Andy Maier added the comment:
Ezio, what do you mean with "string signature"?
For me, the patch looks fine as it is.
--
nosy: +andymaier
___
Python tracker
<http://bugs.python.o
New submission from Andy Maier:
The .hgignore file misses some entries for directories and files created by
Eclipse with pydev.
The additional lines for .hgignore would be:
^.project
^.pydevproject
^.settings/
This change applies to 2.7 and 3.x.
--
messages: 222032
nosy
Changes by Andy Maier :
--
keywords: +patch
Added file: http://bugs.python.org/file35817/issue21898.diff
___
Python tracker
<http://bugs.python.org/issue21
New submission from Andy Maier:
In Python 2.7 and up to Python 3.3, the documentation build process downloads
tools such as Sphinx etc. into the Doc/tools subtree. The .hgignore file misses
entries to ignore those.
The additional lines for .hgignore would be:
^Doc/tools/docutils/
^Doc
Changes by Andy Maier :
--
keywords: +patch
Added file: http://bugs.python.org/file35818/issue21900.diff
___
Python tracker
<http://bugs.python.org/issue21
Andy Maier added the comment:
Your patch right now generates the line:
New in version 2.6: bytes() has been added as an alias for str()
at the end of the paragraph for str().
To me, that is sufficient for the description of str().
If anything, we could add a separate paragraph for bytes
Andy Maier added the comment:
Zach, I reviewed your 2.7 backport, including a comparison with the latest 3.x
patch.
Comments on the 2.7 backport:
1. In "3.1.1 Numbers", on "If both operands are ints,":
The "ints" is a link labeled "int" followed by
Andy Maier added the comment:
That is indeed true; i just verified that by creating a new clone repository.
Sorry for the extra work.
When I created the bug yesterday, I had my repository clone updated to "2.7"
and the .hgignore definitely did not have the entries. I even s
Andy Maier added the comment:
> Regardless, though, you are having a Mercurial issue here, not a Python one :)
That seems to be the case ... I don't think I can reproduce it.
All fine then.
Thanks, David!
--
___
Python tracke
Andy Maier added the comment:
> Andy: in future, please use the 'review' link to post reviews,...
Will do ... I just now discovered the "Start Review" link (I'm new here, so
thanks for telling me...)
Andy
--
_
Andy Maier added the comment:
Hi, I would like to revive this issue, and have a few comments:
1. In Darren's original proposal, I suggest to say "implicit (old-style)
relative imports" instead of "old-style relative imports", because that is the
term used in
Andy Maier added the comment:
Hi, I would like to revive this issue and have added a review comment to
issue10225-py3k.diff.
Otherwise, I have reviewed the changes in both diffs and think they are good to
go.
Andy
--
nosy: +andymaier
___
Python
Andy Maier added the comment:
Éric,
I have reviewed the patch, and have one minor comment on it (see review page).
Otherwise, I think it is good to go into v3 (The version list for this issue
also shows 2.7, and the 2.7 version of this file is quite different from the v3
tip version, so a
Andy Maier added the comment:
Just out of curiosity: Why do the patches attached to this issue not have a
"review" link?
Also, both (2.7 and 3.2) patches do not line up with the current 2.7 and 3.x
tip, both hunks get rejected.
Comments on both patches:
1. It would be helpful i
Andy Maier added the comment:
Hi, I'd like to revive this issue.
IMHO, the changes in issue12067-expressions_v2.diff go too far. I don't think
that deleting the entire section about the details of comparing objects of the
same type makes sense.
I agree with Terry's stateme
Andy Maier added the comment:
Ah! I was somehow suspecting that. Thanks for clarifying!
I'll prepare a patch.
To correct my earlier message, the best place to link for comparisons is
probably the Conparisons subchapter of the Expressions chapter in the
reference. See also issue
Changes by Andy Maier :
--
versions: +Python 3.5 -Python 3.2, Python 3.3
Added file: http://bugs.python.org/file35843/issue12067-expressions_v3.diff
___
Python tracker
<http://bugs.python.org/issue12
Andy Maier added the comment:
Uploaded issue12067-expressions_v3.diff for the 3.5 tip.
Please review.
--
___
Python tracker
<http://bugs.python.org/issue12
Andy Maier added the comment:
Uploaded issue12067-expressions_v4.diff to improve the unicode footnote 3, and
to revert to using the term "lexicographical" for sequences (after learning
that it applies there as well). Also, this version was produced using "hg diff"
Andy Maier added the comment:
PS: The v4 patch does not address comments f) and h) from msg04, and it
seems to me they do not need to be addressed.
--
___
Python tracker
<http://bugs.python.org/issue12
Andy Maier added the comment:
Terry,
I'd like to comment on your statement:
> 3. By default, == and /= compare identities.
in msg148774.
What experiment lead you to that conclusion?
Here is one that contradicts it (using cpython 3.4.1):
>>> i1 = 42
>>> f1 = 42.0
>
Andy Maier added the comment:
Uploaded v5 of the patch.
Changes:
1. The statement that comparison of different built-in types (always) raises
TypeError, was too general. Changed to distinguish equal and order operators,
as summarized by Ezio in items 3) and 4) of msg148760.
2. Ensured max
Andy Maier added the comment:
It seems I still need to practice creating patches ... uploading v6 which
should create a review link. No other changes.
Sorry for that.
Andy
--
Added file: http://bugs.python.org/file35851/issue12067-expressions-py34_v6.diff
Andy Maier added the comment:
Another attempt. Really sorry...
--
Added file: http://bugs.python.org/file35853/issue12067-expressions-py34_v7.diff
___
Python tracker
<http://bugs.python.org/issue12
Andy Maier added the comment:
Uploaded patch version py34_v2, which contains the following changes relative
to 3.4:
1. The changes in the description of list.sort() from "default" in list.sort(),
by adding this text:
(the arguments can be used for sort customization, see :func:`s
Andy Maier added the comment:
uploaded patch version py27_v2, which contains the same changes as py34_v2,
relative to 2.7, except for this differences:
1. The change from "default" was already in 2.7.
2. The reference to defining ordering methods for user-defined classes includes
a
Andy Maier added the comment:
I would like to revive this issue.
>From the discussion, it seems to me that the following changes in the Python
>Library documentation would make sense:
1. Move add_history() higher up in the sequence of functions, for example to
after write_history_file
Andy Maier added the comment:
I have reviewed the descriptions of the built-in functions in Python 3.4, and
found only the following issues w.r.t. missing __special__functions:
1. getattr(), setattr(), delattr(): They only refer to object attributes and
miss to mention the fallback to object
Andy Maier added the comment:
I see.
But I don't think it is a sensible default, as the source code states.
The Python doc (v2 and v3) is quite consistent in stating that `==` compares
the values of two objects, while `is` compares object identity.
Having a default implementation o
Andy Maier added the comment:
Uploaded a patch for Python 3.4, and for merging into "default".
The patch addresses items 1) to 3) from my previous post; item 4) does not need
to be addressed IMHO.
Andy
--
keywords: +patch
Added file: http://bugs.python.org/file35879/issue1
Andy Maier added the comment:
Uploaded v2 of the 3.4/default patch, which removes the comment line at the top
of Doc/library/functions.rst (mentioned by Éric in the original message of this
issue).
-> Please review the patch.
-> Please also double check whether there are any additional
Andy Maier added the comment:
Comments on v2 of both patches:
1. The paragraph "Each item needs to ..." describes the requirement in terms of
"ordering relationships between items". It would be both simpler and less
ambiguous to describe the requirement in terms of &qu
Andy Maier added the comment:
Comments on the patch py34_v2:
1. On complex(): It delegates to object.__complex__(); that should also be
described.
2. On hex(): The use of "__index__()" is text and should be changed to a
hyperl
Andy Maier added the comment:
I reviewed the description of the built-in functions in Python 2.7, and found
these issues:
1. The following built-in functions do not mention their underyling __special__
functions:
- cmp()
- delattr(), getattr(), hasattr(), setattr()
- complex(), int(), long
Changes by Andy Maier :
--
nosy: +benjamin.peterson, steven.daprano
___
Python tracker
<http://bugs.python.org/issue12067>
___
___
Python-bugs-list mailin
Changes by Andy Maier :
--
nosy: +ethan.furman
___
Python tracker
<http://bugs.python.org/issue12067>
___
___
Python-bugs-list mailing list
Unsubscribe:
Andy Maier added the comment:
Uploaded v8 of the patch for 3.4 and default.
It reflects hopefully everything that was said in this issue thread, and on the
python-dev mailing list (subject: == on object tests identity in 3.x), at least
to the extent it was related to comparisons.
Besides the
Changes by Andy Maier :
Added file: http://bugs.python.org/file35938/try_eq.py
___
Python tracker
<http://bugs.python.org/issue12067>
___
___
Python-bugs-list mailin
Changes by Andy Maier :
Added file: http://bugs.python.org/file35939/try_eq.out
___
Python tracker
<http://bugs.python.org/issue12067>
___
___
Python-bugs-list mailin
Andy Maier added the comment:
Mark: Both are good points!
Would you add the cases from your second comment under "symmetry"?
--
___
Python tracker
<http://bugs.python.o
Andy Maier added the comment:
Uploaded v9 of the patch for 3.4 and default.
It reflects Marc's comment, plus the result of the recent discussion on
python-dev since v8 of th epatch, up to 2014-07-15 (subject: == on object tests
identity in 3.x).
-> Please review the patch.
Changes by Andy Maier :
--
nosy: +andymaier
___
Python tracker
<http://bugs.python.org/issue11945>
___
___
Python-bugs-list mailing list
Unsubscribe:
Andy Maier added the comment:
Just wanted to say that i will continue working on this, working in the
comments made so far...
Andy
--
___
Python tracker
<http://bugs.python.org/issue12
Andy Maier added the comment:
@Guido:
Agree to all you said in your #msg226496.
There is additional information about comparison in:
- Tutorial (5.8. Comparing Sequences and Other Types),
- Library Reference (5.3. Comparisons),
- Language Reference (3.3.1. Basic customization)
that needs to be
Andy Maier added the comment:
I reviewed the issues discussed here and believe that the patch for #Issue
12067 adresses all of them (and yes, it is large, unfortunately).
It became large because I think that more needed to be fixed. May I suggest to
review that patch.
Andy
--
nosy
Andy Maier added the comment:
Uploading v10 of the patch, which addresses all review comments made on v9.
There is one open question back to Martin Panter about which different types of
byte sequences can be compared in Py 3.4.
I also believe this patch addresses all of Issue 22001. Let me
Andy Maier added the comment:
Here is the delta between v9 and v10 of the patch, if people want to see just
that.
--
Added file:
http://bugs.python.org/file36897/issue12067-expressions-py34_delta-v9-v10.diff
___
Python tracker
<h
Andy Maier added the comment:
I have addressed the comments by Jim Jewett, Martin Panter and of myself in a
new version v11, which got posted.
For the expression.rst doc file, this version of the patch has its diff
sections in a logical order, so that the original text and the patched text
Andy Maier added the comment:
I also made sure in both files that the line length of any changed or new lines
is max 80. Sorry if that creates extra changes when looking at deltas between
change sets.
--
___
Python tracker
<http://bugs.python.
Andy Maier added the comment:
I have posted v12 of the patch, which addresses all comments since v11.
This Python 3.4 patch can be applied to the "default" (3.5 dev) branch as well.
I will start working on a similar patch for Python 2.7 now.
--
Added file:
http://bugs.
Andy Maier added the comment:
Nir,
I appreciate very much what you are doing. I was about to do the same ;-)
I'll review your code shortly. I like the idea to use /etc/os-release, as it
has the most complete information. Stay tuned.
Andy
Am 6. Dezember 2015 18:12:52 MEZ, schrieb Nir
New submission from Andy Maier:
Hi, I did search for these in the open bugs, but did not find any matching bug.
I have a project that revealed that some of its InterSphinx links to existing
classes/types or methods to not resolve their targets, or to resolve to a
target that is not the right
Andy Maier added the comment:
Hi Martin!
The intersphinx stuff is simply linking from a Sphinx RST documentation to a
different Sphinx RST documentation, using support from the intersphinx
extension of Sphinx. I think the name comes from the interwiki links in
MediaWiki. It only comes into
Andy Maier added the comment:
Ok. If these methods generate index entries, maybe the problem is on my side by
not linking them correctly. So let's try with the other two changes.
Unfortunately, I cannot easily build cpython at the moment to verify, I moved
to Linux and when trying to
Andy Maier added the comment:
Martin, I can now link to the two methods e.g. via
:meth:`py:datetime.tzinfo.utcoffset`, and it resolves nicely.
See here (linking to Python 2):
https://pywbem.readthedocs.org/en/latest/#pywbem.MinutesFromUTC
Don't know why it now works, probably user er
Andy Maier added the comment:
Martin,
I just noticed that your fix must already be active. My link to tzinfo now
lands on the long description. So maybe it was not a user error of mine that
resolved the problem with the two methods (I was pretty sure I had tried the
same syntax I use now
Andy Maier added the comment:
Nir currently proposes to change the package name from "ld" to "dist". See
https://github.com/nir0s/ld/issues/103
Comments on this name change proposal are welcome (over there).
On "Given the unremarkable simplicity of implementin
Andy Maier added the comment:
@leycec: By the way, the "ld" package *does* use shlex.shlex() to parse the
os-release file.
--
___
Python tracker
<http://bugs.python.
Andy Maier added the comment:
Just for completeness:
The "ld" package is now called "distro" and its v0.6.0 is on PyPI:
https://pypi.python.org/pypi/distro
--
___
Python tracker
<http://bu
Changes by Andy Maier :
--
nosy: +andymaier
___
Python tracker
<http://bugs.python.org/issue1322>
___
___
Python-bugs-list mailing list
Unsubscribe:
Andy Maier added the comment:
Do we really think that a package on pypi solves the problem better? The
discussion only shows that it is more likely we end up with multiple different
packages on pypi, instead of one that is commonly agreed.
I agree it is tough to get to an agreed upon approach
Changes by Andy Maier :
Added file:
http://bugs.python.org/file38303/issue12067-expressions-py3.5_v14.diff
___
Python tracker
<http://bugs.python.org/issue12067>
___
___
Andy Maier added the comment:
I have posted v14 of the patch (for the 3.5 'default' branch), based on
Martin's v13. v14 addresses all comments Martin made, as described in my
responses to them (see patch set 10).
On Issue 4395: That issue should be pursued in addition to this
86 matches
Mail list logo