New submission from Andy <[EMAIL PROTECTED]>:
Suggest clarification on behaviour of the __slots__ attribute when
inheriting from classes that don't have __slots__ defined. Obviously the
superclass automatically creates __dict__, and it seems the subclass
inherits this. I presume this
Andy <[EMAIL PROTECTED]> added the comment:
Sorry for the terribly dumb question about this.
Are you meaning that, at this stage, all that is required is:
1. the application of the PyAPI_FUNC macro
2. move the file to the Include directory
3. update Makefile.pre.in to point to t
Andy <[EMAIL PROTECTED]> added the comment:
Did that and it builds fine.
So my test procedure was:
- checkout clean source
- apply patch as per guidelines
- remove the file Psrser/tokenizer.h (*)
- ./configure
- make
- ./python setup.py install
Build platform: Ubuntu , gcc 4.2.
New submission from Andy <[EMAIL PROTECTED]>:
Checked out the PY3K branch and built. Received a warning
about "characters after #ifdef ignored" from Objects/stringlib/find.h
the line in question is:
#ifdef STRINGLIB_WANT_CONTAINS_OBJ && !defined(FROM_BYTEARRAY)
Whic
Andy <[EMAIL PROTECTED]> added the comment:
patch for issue attached.
gcc -v => gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
tests:
./runtests.sh =>
0 BAD
297 GOOD
27 SKIPPED
324 total
--
keywords: +patch
Added file: http://bugs.python.org/file11291/iss
New submission from Andy <[EMAIL PROTECTED]>:
With a clean checkout of the py3k source it fails to build the Parser
exension module (based on Modules/parsermodule.c) when building against
a cygwin target.
This appears to be related to the movement of the symbol
_PyParser_Gramma
Andy <[EMAIL PROTECTED]> added the comment:
bah I *am* a idiot, #4288 and Christian's comments point out that I
can't use 'find' & 'xargs' properly :-(
Will modify patch to use the correct grammar file &c.
(and maybe one day I might actually say some
Changes by Andy <[EMAIL PROTECTED]>:
Removed file: http://bugs.python.org/file11960/parsermodule_fix.diff
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Andy <[EMAIL PROTECTED]> added the comment:
a new patch that will use the grammar definition from Python/graminit.c
- it is as of yet untested for Cygwin (can't get to that machine right
now). It follows the same pattern as the previous, i.e. it makes us of
an accessor function
Andy <[EMAIL PROTECTED]> added the comment:
looks like it might be a similar root issue to the one I raised in #4279.
Looks like this patch breaks the data hiding that I think has been
attempted :-( though it doesn't mess with setup.py in the way mine does :-)
Don't know
Andy <[EMAIL PROTECTED]> added the comment:
Christian: sorry my 'find' kung fu is weak :-( :-$ I see why.
Will work on a better patch.
___
Python tracker <[EMAIL PROTECTED]>
<http://
Andy <[EMAIL PROTECTED]> added the comment:
Martin:
Looking at it I agree with you 100% - the patch is too complicated for
what it is intending to resolve. It simply does not need another
accessor function to muddy the waters when making the symbol public as
done in #4288 resolves the
Andy <[EMAIL PROTECTED]> added the comment:
Christian:
Cool, thanks for the feedback d00d - it took longer than i though to get
what I predicted :-) No worries on the whole "core target" platform
thing - I understand it perfectly, had the same issue for work related
things: t
New submission from ANdy :
# To reproduce:
# Put this text in a file `a.py` and run `py a.py`.
# Or just run: py -c "print(('é' * 40 + '\n') * 473)"
# Scroll up for a while. One of the lines will be:
# ��ééé
# (You can spot thi
Andy added the comment:
While debugging I reproduced this on
- 'OpenSSL 1.1.0f 25 May 2017'
- 'OpenSSL 1.0.1f 6 Jan 2014'
- and 'BoringSSL', latest.
using Python 2.7.12, 2.7.13, 2.7.6 and 3.5.3. This was all on Debian.
Note that since I used Python <2.7.1
Andy added the comment:
Thanks for adding the test!
If the official stance is that only the latest OpenSSL is supported then this
is definitely WAI. Sounds like a good policy...
I'll close this issue.
--
resolution: -> not a bug
stage: -> resolved
status: ope
Andy added the comment:
I'm also of the opinion that this would be a valuable feature to have. I
think it's a reasonable expectation that an XML library produces valid
XML. It's particularly strange that ET would output XML that it can't
itself read. Surely the job of ma
Andy S added the comment:
Can reproduce this on 3.9. Is the fact 3.9 is in `bugfix` status enough to
backport any fixing changes from 3.11 (if that's true and the bug was fixed)?
--
___
Python tracker
<https://bugs.python.org/is
Andy S added the comment:
Then maybe those RMs (for 3.9 and 3.10) should decide on their own? That should
mean the bug should be reopened for them to get assigned to.
--
___
Python tracker
<https://bugs.python.org/issue42
New submission from Andy Schumann:
On Windows a path can contain spaces (e.g. C:\Program Files\python22
\python.exe). If using popenx each component in a command line has
therefore to be double quoted as well as the whole command string.
The method run_cgi() of the class CGIHTTPRequestHandler
New submission from Andy Wildenberg :
This was originally posted on
http://stackoverflow.com/questions/1800452/how-to-intercept-wm-delete-window-on-osx-using-tkinter
but seems not to have been reported as a bug.
On OS X (10.6.8, python 2.6.1) register a protocol on 'WM_DELETE_WINDOW
Changes by Andy Buckley :
--
nosy: +andybuckley
___
Python tracker
<http://bugs.python.org/issue2292>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Andy Harrington :
You cannot make a self-referential annotation like
class Graph:
def reverse(self) -> Graph:
# ...
This corresponds to a common coding situation.
--
components: Interpreter Core
messages: 129587
nosy: andyharrington
priority: nor
Changes by Andy Buckley :
--
nosy: +andybuckley
___
Python tracker
<http://bugs.python.org/issue858809>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Andy Buckley :
--
nosy: +andybuckley
___
Python tracker
<http://bugs.python.org/issue1294959>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Andy Bailey :
--
nosy: +GooseYArd
___
Python tracker
<http://bugs.python.org/issue5755>
___
___
Python-bugs-list mailing list
Unsubscribe:
Andy Harrington added the comment:
I found a similar issue. If you want more simple files demonstrating the
issue, I have attached some. If I start my localCGIServer.py, then I can use
adder.html fine (uses get), but with adderpost.html (uses post) the cgi action
file, adder.cgi (that
Changes by Andy Harrington :
Removed file: http://bugs.python.org/file20392/localCGIServer.py
___
Python tracker
<http://bugs.python.org/issue4953>
___
___
Python-bug
Changes by Andy Harrington :
Added file: http://bugs.python.org/file20393/adder.html
___
Python tracker
<http://bugs.python.org/issue4953>
___
___
Python-bugs-list mailin
Changes by Andy Harrington :
Added file: http://bugs.python.org/file20394/adderpost.html
___
Python tracker
<http://bugs.python.org/issue4953>
___
___
Python-bugs-list m
Changes by Andy Harrington :
Added file: http://bugs.python.org/file20395/localCGIServer.py
___
Python tracker
<http://bugs.python.org/issue4953>
___
___
Python-bug
Changes by Andy Harrington :
Added file: http://bugs.python.org/file20396/adder.cgi
___
Python tracker
<http://bugs.python.org/issue4953>
___
___
Python-bugs-list mailin
New submission from Andy Novocin <[EMAIL PROTECTED]>:
I installed python 2.5.2 on my SUSE 10.3 system which came with 2.4.4
and when you type
import readline
it returns No module named readline.
When installing I just unzipped, ./configure, make, sudo make install.
Im brand new to Lin
New submission from Andy Harrington <[EMAIL PROTECTED]>:
When you enter help("".find)
you get
...
such that sub is contained within s[start,end]
...
s[start, end] makes no sense. It should be s[start:end].
--
assignee: georg.brandl
components: Documentation
mess
New submission from Andy Kilpatrick <[EMAIL PROTECTED]>:
cookielib doesn't handle URLs like "http://server/script?
err=/base/error.html&ok=/base/ok.html", as
CookieJar::_cookie_from_cookie_tuple uses rfind("/") to strip off the
end of the URL, returni
Andy Buckley added the comment:
That sort of idea, yes: just a wild thought, but it would be really nice if
this was available so that in combination with a standard bash/zsh function,
getting basic automatic command completion for scripts built with optparse (and
any other implementer of
Andy Buckley added the comment:
Thanks for the pointers to both of these... I wasn't aware of either. I see
argparse has been recently approved for Python stdlib inclusion, too:
http://www.python.org/dev/peps/pep-0389/ Congratulations!
As far as I can tell, genzshcomp is parsing the o
New submission from Andy Friesen :
In certain circumstances, "if __debug__" seems to be evaluating its "else"
clause even when -O is not specified. This can cause very surprising behavior.
a.zip contains a single file named a/__init__.pyo. It is the compiled form of
Andy Buckley added the comment:
> The backward compatible solution is to have --help-options disabled by
> default, and ask people to enable it with add_interface=True.
Or to add the option just before arg parsing, if it has not already been
defined?
Thanks for the patches, Filip!
New submission from Andy Balaam <[EMAIL PROTECTED]>:
Running test_errno on my 32-bit Ubuntu Gutsy machine gives me this:
$ ./python Lib/test/test_errno.py
test_for_improper_attributes (__main__.ErrnoAttributeTests) ... FAIL
test_using_errorcode (__main__.ErrnoAttributeTests)
Andy Balaam <[EMAIL PROTECTED]> added the comment:
Adding Brett Cannon since it looks like his checkin created the test
which fails on my machine. Apologies if this is very bad etiquette. I
couldn't find any guidelines about this in the developers' docs, but
probably tha
Andy Balaam <[EMAIL PROTECTED]> added the comment:
Woah! fast response, and what looks like a much more sensible fix.
Thanks Brett.
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Andy Harrington <[EMAIL PROTECTED]> added the comment:
After going to the sprint Monday, I am working on this as my first patch.
There is no test file for pydoc. ??
--
nosy: +andyharrington
_
Tracker <[EMAIL PROTECTED]>
<http://
Andy Harrington <[EMAIL PROTECTED]> added the comment:
Several points:
Additional note in pydoc output:
I thought that 'inherited' docs should be marked, so I chose to add to
the note for any function that gets docs displayed from an inherited
function:
', docs from
Changes by Andy Harrington <[EMAIL PROTECTED]>:
Removed file: http://bugs.python.org/file9823/pydoc.PATCH
_
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.o
Andy Harrington <[EMAIL PROTECTED]> added the comment:
HM, before writing my patch I tested pydoc to see the issue was still
there. I did not look at the 2004 patch from aschmolck since it was so
old and was clearly not implemented, and brett just listed this issue as
one to deal with i
Andy Harrington <[EMAIL PROTECTED]> added the comment:
Alexander,
I have no idea why your patch languished. On the one hand I might have
skipped this if I realized that before. On the other hand, I did add
something extra, and I might not have had an open mind if I had looked
at yours.
New submission from Andy Buckley <[EMAIL PROTECTED]>:
optparse is a great option parser, but one thing that would make it even
greater would be if it provided a standard option (cf. --help) which
lists all the available options in a parseable form. Something prefixed
with --help, e.g.
New submission from Andy Buckley :
When using distutils to build an extension module using SWIG, it makes
most sense to use the built-in SWIG support. However, the distutils seem
to "vet" the options passed via the Extension.swig_opts attr/arg:
[...]
ext_modules=[Extensi
New submission from Andy Buckley :
It would make package maintenance easier, as well as integration with
other build systems e.g. autotools (necessary for projects where not
everything is Python), if the distutils supported an uninstallation
command, e.g.
python setup.py uninstall
This would
Andy Buckley added the comment:
This works in my current version of distutils (Python 2.5.2, from Ubuntu
Intrepid). Maybe it was fixed and no-one noticed that this bug was
relevant ;)
--
nosy: +andybuckley
___
Python tracker
<http://bugs.python.
Andy Buckley added the comment:
Dumb question, but why is distutils wrapping the command args in quotes
anyway? I'm not even sure why lists are being used (rather than a
string) for the options, except that lists are a bit more "Pythony" and
can be used to semantically divide t
New submission from Andy Buckley :
If you attempt to call "python setup.py install --prefix=/foo", and
/foo/lib/pythonX.Y/site-packages does not exist, the installation will
fail, requiring that the directory be made by hand.
Since there is no easy way to know in advance (other than
New submission from Andy Buckley :
At present, distutils exits with an error return code if the directory
that modules are being installed into is not in PYTHONPATH. Since the
install path is not easily obtained (it at least requires running Python
to work out the version string, plus some
Andy Buckley added the comment:
Thanks for the rapid feedback: yes, I am using setuptools and didn't
realise it would be responsible for this override. Is setuptools
feedback done completely independently from this tracker?
___
Python tracker
Andy Buckley added the comment:
If an uninstall registry is feasible, the it could be neat. The
suggested behaviour of unlinking known files based on the source
directory is not all that inconvenient: it's by no means perfect, but it
has its uses and is familiar to many, since it is ho
Andy Buckley added the comment:
I'm having trouble with this as well :( It's pretty much a blocker for
integrating distutils-based extension builds with an autotools library
build, because the "make distcheck" target explicitly does the build in
a subtree of the source
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 Lowry :
It would be useful to have something like a `getLevelNames` method to return
the current list of level names, ordered by priority.
This currently appears to be available only by accessing a private member, like
`_levelToName` or `_nameToLevel`.
This
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
Andy Fiddaman added the comment:
I've just found this while investigating a regression with my project following
update to 3.9.5. It took me some time to discover that the new test failures
were due to __file__ now being fully qualified when it wasn't before.
As far as I can tell
Andy Lowry added the comment:
@andrei.avk Yes, that sounds just fine. Many thanks.
--
___
Python tracker
<https://bugs.python.org/issue43858>
___
___
Python-bug
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 Lester :
_Py_HashPointer in Python/pyhash.c takes a pointer argument that can be made
const. This will let compiler and static analyzers know that the pointer's
target is not modified. You can also change calls to _Py_HashPointer that are
down-casting poi
Change by Andy Lester :
--
keywords: +patch
pull_requests: +17145
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17690
___
Python tracker
<https://bugs.python.org/issu
New submission from Andy Lester :
PyToken_OneChar in Parser/token.c is autogenerated. I suspect it may be faster
and smaller if it were a lookup into a static table of ops rather than a switch
statement. Check to see if it is.
--
components: Interpreter Core
messages: 358975
nosy
Andy Lester added the comment:
Thank you. I appreciate the pointer.
--
___
Python tracker
<https://bugs.python.org/issue39150>
___
___
Python-bugs-list mailin
Change by Andy Lester :
--
components: +Regular Expressions -Library (Lib)
nosy: +ezio.melotti, mrabarnett
___
Python tracker
<https://bugs.python.org/issue39
Andy Lester added the comment:
I tried out some experimenting with the lookup table vs. the switch
statement.
The relevant diff (not including the patches to the code generator) is:
--- Parser/token.c
+++ Parser/token.c
@@ -77,31 +77,36 @@
int
PyToken_OneChar(int c1)
{
-switch (c1
Andy Lester added the comment:
Yes, I ran it multiple times on my 2013 Macbook Pro and got ~10% speedup. I
also ran it on my Linux VM (that I only use for development) and got a speedup
but less so.
The code I used to run the tests is at:
https://github.com/petdance/cpython/blob
Andy Lester added the comment:
Re: branch prediction.
The branch
if (c1>=37 && c1<=126)
could just as easily be
if (c1>=0 && c1<=126)
with no other changes to the code. It could be just
if (c1<=126)
if c1 wasn't signed.
As far as
New submission from Andy Lester :
Four functions in Objects/unicodectype.c copy values out of lookup tables with
a for loop
int i;
for (i = 0; i < n; i++)
res[i] = _PyUnicode_ExtendedCase[index + i];
instead of a memcpy
memcpy(
Andy Lester added the comment:
I'm closing this as it seems there's not much interest in this.
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.py
Andy Lester added the comment:
Thanks for replying. I figured that might be the case, which is why I made a
ticket before bothering with a pull request.
I've also seen this kind of thing around:
i = ctx->pattern[0];
Py_ssize_t groupref = i+i;
in
New submission from Andy Lester :
The functions tb_displayline and tb_printinternal can take const pointers on
some of their arguments.
tb_displayline(PyObject *f, PyObject *filename, int lineno, const PyObject
*name)
tb_printinternal(const PyTracebackObject *tb, PyObject *f, long limit
Change by Andy Lester :
--
pull_requests: +17793
pull_request: https://github.com/python/cpython/pull/18420
___
Python tracker
<https://bugs.python.org/issue39
Change by Andy Lester :
--
keywords: +patch
pull_requests: +17794
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18420
___
Python tracker
<https://bugs.python.org/issu
Change by Andy Lester :
--
pull_requests: +17797
pull_request: https://github.com/python/cpython/pull/18422
___
Python tracker
<https://bugs.python.org/issue39
Change by Andy Lester :
--
pull_requests: -17794
___
Python tracker
<https://bugs.python.org/issue39591>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Andy Lester :
--
pull_requests: +17798
pull_request: https://github.com/python/cpython/pull/18422
___
Python tracker
<https://bugs.python.org/issue39
Change by Andy Lester :
--
pull_requests: +17799
pull_request: https://github.com/python/cpython/pull/18422
___
Python tracker
<https://bugs.python.org/issue39
Change by Andy Lester :
--
pull_requests: -17798
___
Python tracker
<https://bugs.python.org/issue39591>
___
___
Python-bugs-list mailing list
Unsubscribe:
Andy Lester added the comment:
I'm sorry, I think my comment was misleading.
The changes I had proposed were not making the object itself const, but some of
the arguments in the static worker functions. For example:
-tb_displayline(PyObject *f, PyObject *filename, int lineno, PyO
Andy Lester added the comment:
> Yes, Py_INCREF and Py_DECREF change the type, and therefore constness.
Understood. The changes that I have proposed are not to objects that get sent
through Py_INCREF/Py_DECREF. If they did, -Wcast-qual would have caught it.
-Wcast-qual catches if you c
New submission from Andy Lester :
gcc -Wcast-qual turns up a number of instances of casting away constness of
pointers. Some of these can be safely modified, by either:
* Adding the const to the type cast, as in:
-return _PyUnicode_FromUCS1((unsigned char*)s, size);
+return
Change by Andy Lester :
--
keywords: +patch
pull_requests: +17827
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18453
___
Python tracker
<https://bugs.python.org/issu
New submission from Andy Lester :
PyObject_GetAttrString(PyObject *v, const char *name)
typedef PyObject *(*getattrfunc)(PyObject *, char *)
The outer PyObject_GetAttrString takes a const char *name, but then casts away
the const when calling the underlying tp_getattr. This means that an
Andy Lester added the comment:
Do you know why it was reverted? (Granted, it was 15 years ago...)
It looks like the original changeset is trying to address at least two
different problems with non-const string literals. My ticket here is focusing
only on getattrfunc and setattrfunc. The
New submission from Andy Lester :
The function md5_compress does not modify its buffer argument.
static void md5_compress(struct md5_state *md5, unsigned char *buf)
buf should be const.
--
components: Extension Modules
messages: 361932
nosy: petdance
priority: normal
severity: normal
Change by Andy Lester :
--
keywords: +patch
pull_requests: +17871
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18497
___
Python tracker
<https://bugs.python.org/issu
New submission from Andy Lester :
Here are some fixes of char * pointers to literals that should be const char *
in these four files.
+++ Objects/frameobject.c
+++ Objects/genobject.c
+++ Python/codecs.c
+++ Python/errors.c
--
components: Interpreter Core
messages: 361982
nosy
Change by Andy Lester :
--
keywords: +patch
pull_requests: +17886
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18510
___
Python tracker
<https://bugs.python.org/issu
Andy Lester added the comment:
@vstinner would it be helpful if I went on a sweep looking for places we can
use the new Py_IS_TYPE macro?
Getting away from Py_TYPE(op) would also mean a move to making the internals
const-correct.
--
nosy: +petdance
1 - 100 of 333 matches
Mail list logo