Change by Andy Lester :
--
pull_requests: +18034
pull_request: https://github.com/python/cpython/pull/18674
___
Python tracker
<https://bugs.python.org/issue39
Change by Andy Lester :
--
pull_requests: -18034
___
Python tracker
<https://bugs.python.org/issue39770>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Andy Lester :
--
pull_requests: -18032
___
Python tracker
<https://bugs.python.org/issue39770>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Andy Lester :
--
pull_requests: -18031
___
Python tracker
<https://bugs.python.org/issue39770>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Andy Lester :
--
pull_requests: +18033
pull_request: https://github.com/python/cpython/pull/18675
___
Python tracker
<https://bugs.python.org/issue39
Change by Andy Lester :
--
pull_requests: +18032
pull_request: https://github.com/python/cpython/pull/18674
___
Python tracker
<https://bugs.python.org/issue39
Change by Andy Lester :
--
keywords: +patch
pull_requests: +18031
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18673
___
Python tracker
<https://bugs.python.org/issu
New submission from Andy Lester :
The array_modexec function in Modules/arraymodule.c has a loop that calculates
the number of elements in the descriptors array. This size was used at one
point, but is no longer. The loop can be removed.
--
components: Interpreter Core
messages
Change by Andy Lester :
--
keywords: +patch
pull_requests: +18003
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18637
___
Python tracker
<https://bugs.python.org/issu
New submission from Andy Lester :
In Modules/_datetimemodule.c, the char *timespec and char *specs[] can be made
const. Their contents are never modified.
In ndarray_get_format in Modules/_testbuffer.c, char *fmt can be made const.
--
components: Interpreter Core
messages: 362565
Andy Lester added the comment:
Just added a new PR to finish off the remaining places to use Py_IS_TYPE()
https://github.com/python/cpython/pull/18601
--
___
Python tracker
<https://bugs.python.org/issue39
Change by Andy Lester :
--
pull_requests: +17968
pull_request: https://github.com/python/cpython/pull/18601
___
Python tracker
<https://bugs.python.org/issue39
Change by Andy Lester :
--
keywords: +patch
pull_requests: +17967
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18600
___
Python tracker
<https://bugs.python.org/issu
New submission from Andy Lester :
The function PyTokenizer_FromUTF8 from Parser/tokenizer.c had a comment:
/* XXX: constify members. */
This patch addresses that.
In the tok_state struct:
* end and start were non-const but could be made const
* str and input were const but should
Change by Andy Lester :
--
pull_requests: -17937
___
Python tracker
<https://bugs.python.org/issue39684>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Andy Lester :
--
pull_requests: +17947
pull_request: https://github.com/python/cpython/pull/18565
___
Python tracker
<https://bugs.python.org/issue39
Change by Andy Lester :
--
nosy: +petdance
___
Python tracker
<https://bugs.python.org/issue38691>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Andy Lester :
--
keywords: +patch
pull_requests: +17937
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18557
___
Python tracker
<https://bugs.python.org/issu
New submission from Andy Lester :
These two code if/thens can be combined
if (ready) {
kind = PyUnicode_KIND(self);
data = PyUnicode_DATA(self);
}
else {
wstr = _PyUnicode_WSTR(self);
}
Py_UCS4 ch;
if (ready) {
ch = PyUnicode_READ(kind
Andy Lester added the comment:
All I'm saying is that I think Py_IS_TYPE is a great idea, and that Py_IS_TYPE
should take const arguments, since its arguments are not modified. If you
think that should go in a different ticket, then I can make that happen
Andy Lester added the comment:
> Would you mind to explain how it's an issue to modify PyObject* temporarily
> during a function call?
It's not a problem to modify the PyObject* during a function call. However,
many functions don't need to modify the object, but are still taking non
Andy Lester added the comment:
I'm hoping that a goal here is to make
static inline int _Py_IS_TYPE(PyObject *ob, PyTypeObject *type)
actually be
static inline int _Py_IS_TYPE(const PyObject *ob, const PyTypeObject *type)
--
___
Python tracker
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
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
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: +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 :
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
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
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
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 :
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
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
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, PyObject
Change by Andy Lester :
--
pull_requests: -17798
___
Python tracker
<https://bugs.python.org/issue39591>
___
___
Python-bugs-list mailing list
Unsubscribe:
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: -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: +17797
pull_request: https://github.com/python/cpython/pull/18422
___
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: +17793
pull_request: https://github.com/python/cpython/pull/18420
___
Python tracker
<https://bugs.python.org/issue39
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
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;
inst
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.python.org/i
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:
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 b
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:
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
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:
Thank you. I appreciate the pointer.
--
___
Python tracker
<https://bugs.python.org/issue39150>
___
___
Python-bugs-list mailin
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
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 :
_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 pointers
Andy Maier added the comment:
Thanks for the help, Christian!
--
___
Python tracker
<https://bugs.python.org/issue38810>
___
___
Python-bugs-list mailin
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 be closed
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
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
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 this because it's sligh
Andy Harrington added the comment:
This is really important for newbies. They have no business being in the
system Python folder. And Idle is for newbies!
I was teaching an intro Python class, and tried to help a student who had been
writing programs in Idle, but now could not get Python
Change by Andy Papageorgiou :
--
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue37542>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Andy Papageorgiou :
Wireshark reports two identical back to back packets sent for each sendto(),
timing between packets is between 2 and 10us.
Note this is on a point to point ethernet (just 1 cable, no switches, routers
or anything else in between) to an embedded platform
Change by Andy Dirnberger :
--
nosy: +dirn
___
Python tracker
<https://bugs.python.org/issue36774>
___
___
Python-bugs-list mailing list
Unsubscribe:
Andy Harrington added the comment:
This appears to be a system settings option in Mac OS Sierra set under the
Dock, "prefer tabs when opening documents". With that choice, when there
is the tab bar in an Idle edit window (more than one window superimposed,
with tabs) the the wh
New submission from Andy Harrington :
Mac now puts multiple tabs inside of application window instead of starting a
separate window (with some OS settings).
With just one file being edited in Idle (no tab line) the bottom line with the
numerical cursor coordinates is visible. When
New submission from Andy Harrington :
In a source file in Idle I scroll down no matter which way I rotate the mouse
wheel. This happens in no other app.
Mac High Sierra OS.
I have the Mac scrolling setup "natural" - backwards from the Windows
directions.
--
assignee: t
New submission from andy polandski :
root@kali:~# python get-pip.py
Collecting pip
>From cffi callback :
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 309, in
wrapper
_lib.X509_up_ref(x509)
AttributeError: 'modul
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) in se
Andy Balaam <m...@artificialworlds.net> added the comment:
I would argue that this makes as_completed a lot more useful than it is now, so
would be worth adding (maybe after 3.7).
But, if this does not go into asyncio, is there another library where it would
belong? Or
Andy <grr...@surfsup.at> 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: -> res
Andy <grr...@surfsup.at> 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 &
Andy Balaam added the comment:
bump
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30782>
___
___
Python-bugs-list mailing list
Changes by Andy Balaam <m...@artificialworlds.net>:
--
pull_requests: +2475
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30782>
___
New submission from Andy Balaam:
asyncio.as_completed allows us to provide lots of coroutines (or Futures) to
schedule, and then deal with the results as soon as they are available, in a
loop, or a streaming style.
I propose to allow as_completed to work on very large numbers of coroutines
Andy Edwards added the comment:
I'm seeing this issue in Python 2.7
Andys-MacBook-Pro:jcore-api-py andy$ which python
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
Andys-MacBook-Pro:jcore-api-py andy$ python setup.py test
running test
running egg_info
writing requirements
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 <rep...@bugs.python.org>
<htt
Andy Maier added the comment:
@leycec: By the way, the "ld" package *does* use shlex.shlex() to parse the
os-release file.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.p
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:
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:
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 error I
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 build
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
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:
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 Cohen
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 issue; it seems
Changes by Andy Maier andreas.r.ma...@gmx.de:
Added file:
http://bugs.python.org/file38303/issue12067-expressions-py3.5_v14.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12067
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 andreas.r.ma...@gmx.de:
--
nosy: +andymaier
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1322
___
___
Python-bugs-list
Andy Reitz added the comment:
Sure, but the question is who should do the encoding -- the user, or python? I
think it would be better for python to read the password from the environment
variable, and encode it before using it. I think this is what users expect
Andy Reitz added the comment:
The proxy credentials are supplied by our sysadmin. My understanding is that
the http_proxy env variable doesn't require URI encoding. In addition, the same
credentials work fine with curl.
--
___
Python tracker rep
New submission from Andy Reitz:
On Python 2.7.9, if I set an https_proxy environment variable, where the
password contains a '/' character, urllib2 fails. Given this test code:
import os, urllib
os.environ['http_proxy'] = http://someuser:a/b@10.11.12.13:1234;
f = urllib.urlopen('http
Andy Reitz added the comment:
Sorry, went a bit too quickly -- here is the sample code that I meant to use:
import os, urllib2
os.environ['http_proxy'] = http://someuser:a/b@10.11.12.13:1234;
f = urllib2.urlopen('http://www.python.org')
data = f.read()
print data
And the stack trace
Andy Zobro added the comment:
This breaks custom actions.
e.g.:
class dict_action(argparse.Action):
def __init__(self, *a, **k):
argparse.Action.__init__(self, *a, **k)
TypeError: __init__() got an unexpected keyword argument 'allow_abbrev'
--
nosy: +xobes
Andy Zobro added the comment:
Ignore previous comment, I wish I could delete it.
I simply provided the allow_abbrev to the wrong function and spent zero time
investigating the error.
--
___
Python tracker rep...@bugs.python.org
http
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.python.org
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 rep...@bugs.python.org
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
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 rep
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 rep...@bugs.python.org
http://bugs.python.org/issue12067
101 - 200 of 331 matches
Mail list logo