Martin Panter added the comment:
If libuv closes the FD (step 3), won’t you get the same sort of problem if the
uvloop user tries to do something else with the Python socket object, e.g. call
getpeername()?
I see the fileno=... parameter for sockets as a parallel to the os.fdopen()
function
Martin Panter added the comment:
I think your code example is not very robust, because the “sock” object refers
to a freed file descriptor, and could easily close an unrelated file:
$ python3.5 -q
>>> import socket
>>> sock0 = socket.socket()
>>> sock = socket
Martin Panter added the comment:
Thanks for tackling this one Tim. I agree with Berker that the :const:`True`
changes are out of scope (some introduce errors and inaccuracies).
class CalledProcessError(SubprocessError):
-"""Raised when a check_call() or check_output() proc
Martin Panter added the comment:
This is by design; see PEP 475, and the documentation
<https://docs.python.org/3.5/library/time.html#time.sleep>.
If you make your signal handler raise an exception, it will interrupt the
sleep() call most of the time. But if the signal happens to be re
Martin Panter added the comment:
If there is an obscure platform where we don’t include the right header file
for a function, changing the warning into an error would cause the build to
fail. If we do make it an error, it should only be so for 3.7
Martin Panter added the comment:
PS: I agree it would be good to add more documentation for cross-compiling. I
tried to suggest something in an outdated patch once before; see the bottom of
<https://bugs.python.org/file42143/cross-override.pa
Martin Panter added the comment:
Well, I am not really an expert on the setup.py stuff, but I will ask a
question anyway that may help the review process: Why do you remove the code
that loops over Modules/Setup? Maybe is it redundant with the other code for
removing the already-built
Changes by Martin Panter <vadmium...@gmail.com>:
--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Martin Panter added the comment:
So is your “automatic closing” due to your program, or a bug in Python? You
will have to give more information if you want anyone else to look at this.
When I run the code you posted (with various modules imported) all I get is
NameError: name 'yellow_page
Martin Panter added the comment:
Patch v2 also adds a new attribute to context objects. With this I can work
around my Google server bug:
context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH)
context.suppress_ragged_eofs = True
handler = urllib.request.HTTPSHandler(context=context
Martin Panter added the comment:
I still think something is closing your socket object. I cannot see what it is
from the code you posted though. If you update the print() call, I expect you
will see that it is closed, and the file descriptor is set to -1:
print("sock_err @ ", msg
Martin Panter added the comment:
Are you sure about adding the space after tab? I am no Python 2 expert, but I
don’t see it:
$ python2 -c 'print "\t", ""' | cat -A
^I$
Anyway, I’m not happy applying this patch unless it is clear that raising the
Python version required t
Martin Panter added the comment:
This indicated to me that the socket object has indeed been closed _before_ you
call getpeername():
-
print(sock)>>>
sock.getpeername()>>>
OS.Error[WinError10038]an operation was attempted on something that is not a
socket
==
Martin Panter added the comment:
I committed my patch as it was. I understand Silent Ghost’s objection was
mainly that they thought the new paragraph or its positioning wouldn’t be very
useful, but hopefully it is better than nothing. Perhaps in the future, the
documentation could
Martin Panter added the comment:
For the blake problem, I guess the structures may either get laid out
incorrectly, or you might be lucky and they will get the desired packing by
default. You might have to find if XLC has another way to enable struct
packing. Or in the worst case, rewrite
Martin Panter added the comment:
The warnings about platform-dependent libraries should be suppressed now thanks
to Issue 27713.
The warnings from Modules/_ctypes/_ctypes_test.c about bitfields are covered by
Issue 27643. Can you help with developing the patch?
The remaning warnings all seem
Changes by Martin Panter <vadmium...@gmail.com>:
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7
___
Python tracker <rep...@bugs.python.org>
<http://bu
Martin Panter added the comment:
The getpeername() method is just a wrapper around the OS function, so it is not
going to work if the socket file descriptor is closed or invalid (-1).
You haven’t provided enough code or information for someone else to reproduce
the problem. But it sounds like
Martin Panter added the comment:
The test tries using ProxyHandler directly. It looks like that handler
intentionally ignores the request if it matches no_proxies (Issue 6894), so I
think Piotr’s approach of adjusting the tests is correct. The patch looks good
to me, though I would drop
Martin Panter added the comment:
Just some minor comments on aix-library.161004.patch:
Instead of _util.py, I wonder if the new file should have a different name,
like _util_common.py, to avoid being too similar to util.py.
+def get_shared(input):
+"""Internal support fu
Martin Panter added the comment:
This is my understanding:
We are talking about the code at
<https://hg.python.org/cpython/annotate/v3.6.0b2/Lib/sysconfig.py#l377> that
switches the values of LDSHARED and/or BLDSHARED.
Yes, Michael H. was suggesting to both move and change (revert
Martin Panter added the comment:
The peek() method was originally added by Issue 9962, where Antoine was trying
to imitate the BufferedReader.peek() API. However because “the number of bytes
returned may be more or less than requested”, I never understood what this
methods were good for; see
Martin Panter added the comment:
I would fix the documentation to say the underlying stream should do “exact”
reads and writes, e.g. one that implements io.BufferedIOBase.read(size) or
write(). In my experience, most APIs in Python’s library assume or require
this, rather than the “raw
Martin Panter added the comment:
For arbitrary C-contiguous buffers aka “bytes-like objects” (which are not just
arrays of bytes), I think this trick relies on Issue 15944, which is only added
in 3.5+.
--
___
Python tracker <rep...@bugs.python.
Martin Panter added the comment:
There is related discussion in Issue 12486 about supporting unencoded text
input. The current patch there actually already raises a warning and removes
call sites from the Python library, though it does not add a doc string.
--
nosy: +martin.panter
Martin Panter added the comment:
Thanks Ville. I added some more fixes of my own I had been saving up.
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.7
___
Pytho
Martin Panter added the comment:
>From memory, there are at least three code paths for input():
1. Fallback implementation, used when stdout is a pipe or other non-terminal
2. Default PyOS_ReadlineFunctionPointer() hook, used when stdout is a terminal:
https://docs.python.org/3.5/c-
Martin Panter added the comment:
For replacing macros, I think “static inline” may be fine, even with older
compilers. Maybe these PyDTrace_ functions could also be static inline, since
they were originally macros. Or do they really need to be linkable inline
functions
Martin Panter added the comment:
Hi Michael, I have done some cleanup and modifications to your patch. The
result is in aix-library.161001.patch, which has all the changes, i.e. it is
not based on another patch. More significant changes I made:
* Change getExecLibPath_aix() and find_parts
Changes by Martin Panter <vadmium...@gmail.com>:
--
resolution: -> fixed
stage: commit review -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<http://bu
Martin Panter added the comment:
Other tests in this file skip the test if libc_name is None. So I think it
would make more sense to skip the test rather than fail in test_find(). I.e.
if not found:
self.skipTest("Could not find c and m libraries")
If you are confident that fi
Martin Panter added the comment:
The test in 2.7 (1aae9b7ff321) seems to cause a Windows 8.1 buildbot to hang in
test_sqlite. I deduced this because there is no mention of "test_sqlite" in the
test log output, compared to a previous successful test log.
http://buildbot.python.org/al
Martin Panter added the comment:
I think this might be separate to Issue 25825, but my investigation at
<https://bugs.python.org/issue25825#msg273425> may be relevant. Following on
from that, I reopened Issue 18235, which seems to be about the same LDSHARED vs
BLDSHARED problem, but
Martin Panter added the comment:
Reopening this to fix the original bug in 2.7, and to improve things for Python
3.
Michael Felt (or anyone else): Can you confirm if Michael Haubenwallner’s
suggested patch from <https://bugs.python.org/issue18235#msg219888> is
appropriate? It look
Martin Panter added the comment:
It might have been good to get this reopened to attract more attention to it.
Anyway, Issue 28311 has now been opened for 2.7, and it seems to be about the
same problem.
--
nosy: +martin.panter
superseder: -> AIX shared library extension modu
Martin Panter added the comment:
Here is a patch to fix the corresponding bug in the bzip decompressor. I will
try to commit it soon if there are no objections.
For the record, these bugs were introduced with the max_length support in Issue
15955. The bzip code was modelled after the LZMA
Martin Panter added the comment:
The purpose of the test seems to be to check that finding and loading works for
widely-available libraries. However I suspect find_library("c") can fail on
other platforms as well. Presumably that is why there is the special case for
Cygwin
New submission from Martin Panter:
Issue 1793 added ctypes.util.find_msvcrt(), and special cases that map
find_library("c") and "m" to the new function. However this contradicts the
documentation
<https://docs.python.org/3.5/library/ctypes.html#finding-shared-l
Martin Panter added the comment:
This competes with the patch at Issue 17598.
How are you building Python? I presume you are not using the configure script.
It would be good to come up with a patch that addresses for both cases.
--
nosy: +martin.panter
Martin Panter added the comment:
It looks like Issue 4709 may also be a duplicate.
Your added definition is distant from the comment explaining it. And why not
open MS_WIN64 to any Windows compiler, rather than limiting it to just MSC and
MINGW?
I presume you are not building by running
Martin Panter added the comment:
The patch seems to share some changes to Modules/posixmodule.c with parts of
Issue 17598’s patch (and one common part has already been applied).
Issue 17591 already fixed to lowercase.
Just now Issue 28269 has been opened about strcasecmp
Martin Panter added the comment:
This probably duplicates Issue 17590, although the extra context here is nice :)
What do you think of my patch there, which also removes them from
PC/pyconfig.h? I think it is better to define things in one place if possible.
--
nosy: +martin.panter
Martin Panter added the comment:
It is not clear what Yassine’s bug is. Maybe it is about round-tripping from
urlparse() → urlunparse(). If so, it could be solved by fixing either of the
following two problems:
1. urlunparse() forgets the initial pair of slashes when netloc="".
Martin Panter added the comment:
Issue 17102 is open about the specific problem of escaping the destination
directory. Maybe it is a duplicate, but this bug also discusses other problems.
--
dependencies: +tarfile extract can write files outside the destination path
Changes by Martin Panter <vadmium...@gmail.com>:
--
resolution: -> fixed
stage: needs patch -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<http://bu
Martin Panter added the comment:
That would get the patch mostly working with 2.6+. Is it okay to break Python <
2.6 support? I know there was an OS X Tiger buildbot using 2.5 until recently;
see Issue 28039.
Personally, I would rather focus on the problems with make dependencies, bu
Changes by Martin Panter <vadmium...@gmail.com>:
--
versions: +Python 3.7 -Python 3.6
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Martin Panter added the comment:
The version I committed has the space separating @ #
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<http://bugs.pyt
Changes by Martin Panter <vadmium...@gmail.com>:
--
resolution: -> fixed
stage: commit review -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<http://bu
Martin Panter added the comment:
I have been experimenting with a patch that changes the default to
suppress_ragged_eofs=False.
One disadvantage of this change is it could make servers less robust. E.g. in
the tests, I explicitly enabled suppress_ragged_eofs=True in a server, because
Martin Panter added the comment:
Added review comment
--
nosy: +martin.panter
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Martin Panter added the comment:
Serhiy, what’s the relevance? In the built-in Element Tree package, it is a
class:
<https://docs.python.org/3.5/library/xml.etree.elementtree.html#element-objects>.
--
___
Python tracker <rep...@bugs.p
Martin Panter added the comment:
Mostly looks good to me. I left some comments on the code review.
--
nosy: +martin.panter
versions: +Python 2.7, Python 3.5, Python 3.7
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Martin Panter added the comment:
Actually in the Py 3 branch, I found an earlier revision that added
indata="FOO\n": r59506 (Dec 2007).
Anyway, the server in the test case just does a simple lower() call on the
data, so I think the simpler FOO line may be fine on its own.
--
New submission from Martin Panter:
In r62273 (Apr 2008), method testAsyncoreServer() was added to the py3k branch
with indata="FOO\n". In r64578 (Jun 2008), this test method was added to the Py
2 branch, but with indata = "TEST MESSAGE of mixed case\n". Later, r80598 added
Martin Panter added the comment:
I understand this condition happens when the local end calls unwrap(), but the
low-level socket connection has already been shut down from the remote end. If
the remote is too slow, I get ConnectionResetError instead.
There is some discussion of this at
<h
Martin Panter added the comment:
Thanks to the fix for Issue 22233, now the response is parsed more sensibly,
and the body can be read. The 0x85 byte now gets decoded with Latin-1:
>>> print(ascii(resp.getheader("Link")[:100]))
'<http://www.babla.cn/\xe8\x8b\xb1\xe8\xa
Martin Panter added the comment:
Personally, I’m not too enthusiastic, because it is rather magical, and does
not work in all cases. It seems more like a feature than a bug fix. But I have
rarely used the fileno=... parameter, and it shouldn’t have much negative
impact, so I’m not too fussed
Martin Panter added the comment:
This patch ports the logic written for Issue 26662 to Python 2. Basically,
configure searches for commands called python2.7, python2, and python (in order
of priority), and sets PYTHON_FOR_GEN to the result. PYTHON_FOR_GEN could be
overridden by the user
Changes by Martin Panter <vadmium...@gmail.com>:
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<http://bugs.
Martin Panter added the comment:
Can the resize fail if the buffer is only being strunk? I haven’t looked
closely, but maybe that’s why some of the cases don’t check for failure.
--
nosy: +martin.panter
___
Python tracker <rep...@bugs.python.
Changes by Martin Panter <vadmium...@gmail.com>:
--
nosy: -martin.panter
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27761>
___
Martin Panter added the comment:
Yes, a bug fix for 3.5+.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27348>
___
___
Pyth
Martin Panter added the comment:
For the record, there is more discussion of this in Issue 28092
--
nosy: +martin.panter
superseder: -> Build failure for 3.6 on Centos 5.11
___
Python tracker <rep...@bugs.python.org>
<http://bug
Martin Panter added the comment:
I pushed my Py 2 patch, since it is simpler and does not interfere with other
modules. But it would still be good to get feedback on policy-flag.patch for
Python 3.
--
___
Python tracker <rep...@bugs.python.
Martin Panter added the comment:
Just to clarify, the current status is that the revision that Koobs identified
is still in place, meaning that the AST files are regenerated into the build
tree, not the source tree.
I don’t think there is much else to do for this bug, unless Koobs can provide
Martin Panter added the comment:
I plan to commit this soon, in time for the next release.
--
stage: patch review -> commit review
versions: +Python 3.7
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.or
Martin Panter added the comment:
I agree the doc is far from perfect. The bit I was going off is just above
<https://docs.python.org/3.5/library/socket.html#socket.socket.family>, saying
“these (read-only) attributes that correspond to the values given to the socket
constructor”.
My in
Changes by Martin Panter <vadmium...@gmail.com>:
Added file: http://bugs.python.org/file44684/indent.py3.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Changes by Martin Panter <vadmium...@gmail.com>:
Added file: http://bugs.python.org/file44683/indent.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Martin Panter added the comment:
Another option I forgot to point out is that some of the other regeneration
Python scripts (in Py 2 and/or 3; I forget which) have some autoconf magic to
figure out the right installed python command to use. We should probably use
that for Py 2’s ASDL script
Martin Panter added the comment:
.
I found more messed up indentation looking through Antoine’s large “untabify”
commit r81029. These don’t trigger compiler warnings, but I think it may be
worth restoring them.
--
nosy: +martin.panter
stage: resolved -> patch review
status: clo
Martin Panter added the comment:
It seems a terrible idea to require Python 3 to be installed in order to
regenerate the boot files for a Python 2 build. Maybe if we can figure out the
minimum installed Python version expected for these ASDL scripts in 2.7, and
maintain that while adding
Martin Panter added the comment:
Perhaps this is a dupe of Issue 15119. When I was testing with the sanitizer,
the only excessive shift error I got was explained by that bug.
--
nosy: +martin.panter
___
Python tracker <rep...@bugs.python.org>
Martin Panter added the comment:
What is the reasoning behind this? It seems like trading one person’s style,
fashion, or editor settings for another. I think it is better to just tolerate
existing styles, unless they cause significant problems. But maybe see what
other people think
New submission from Martin Panter:
Compiling Python 2.7 gives:
/home/proj/python/cpython/Modules/_bsddb.c: In function ‘newDBObject’:
/home/proj/python/cpython/Modules/_bsddb.c:936:5: warning: this ‘else’ clause
does not guard... [-Wmisleading-indentation]
else
^~~~
/home/proj/python
Martin Panter added the comment:
Thanks that works well Christian
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28118>
___
___
Martin Panter added the comment:
Happened again:
http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.x/builds/4990/steps/test/logs/stdio
Timeout (0:10:00)!
Thread 0x000801807400 (most recent call first):
File
"/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib
Martin Panter added the comment:
See also Issue 28028. Serhiy suggested translating warnings to SyntaxWarning in
general. Looks like that may help narrowing down the location of escaping
problems.
--
___
Python tracker <rep...@bugs.python.
Martin Panter added the comment:
The documentation says that the family, type and proto attributes correspond to
the constructor arguments. Although it is unfortunate and quirky, I think your
behaviour does match the documentation.
Do the mismatched settings cause any serious problems
Martin Panter added the comment:
I understand it’s already implemented, and Victor just reopened it for more
documentation.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Martin Panter added the comment:
Closing this assuming that revision ca1ddd365f5f (committed to 3.5 and 3.6+
branches) fixed it.
--
nosy: +martin.panter
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> AIX shared library exten
Martin Panter added the comment:
Okay so my “make -t” trick has various flaws. You still have to know the
filenames to specify, it requires Makefile to be generated by configure in the
source tree, and it creates empty files if you use it in a separate build
directory.
Another idea: instead
Martin Panter added the comment:
I was thinking of “static inline” for PyMem_New(). I understand the Centos and
OS X Tiger problem is only related “extern inline” vs plain “inline”, and
“static inline” should not be affected.
--
___
Python tracker
Martin Panter added the comment:
Perhaps another way to defeat the warning is to make PyMem_New() an inline
function? I haven’t tried, but this way would make all the data types involved
more explicit.
--
___
Python tracker <rep...@bugs.python.
Martin Panter added the comment:
As Serhiy suggested in the other bug, one workaround is just to disable the
warning with -Wno-type-limits. It would depend if the benefits of the warning
outweigh the annoyance of coming up with a more complicated workaround for this
specific case
Martin Panter added the comment:
I think Silent Ghost is talking about my -Wtype-limits warning, which is still
present. That is the only warning I am getting. I suspect you won’t see it with
a 32-bit build.
--
___
Python tracker <
Martin Panter added the comment:
IMO if a versionadded/versionchanged notice is relevant, that is a good sign it
is a feature rather than bug fix. If the 3.6.1 documentation says “added in
3.5.3”, how do you know if it is in 3.6.0?
I looked at the history of other schemes being added to try
Martin Panter added the comment:
Recording bugs reports for specific schemes as dependencies of this:
Issue 25895: ws(s)
Issue 16134: rtmp(e/s/t)
Issue 23759: coap(s)
--
dependencies: +Add support for RTMP schemes to urlparse, urllib.parse.urljoin
does not handle WebSocket URLs
Martin Panter added the comment:
Benjamin changed PEP 7 to allow static inline functions directly in Python 3.6.
But later he added program-wide, linkable inline functions in the Python 3.6
code:
2f77a9f0b9d6: add plain “inline” to header file
63ae310b60ff: add “extern inline” stubs in a new
Martin Panter added the comment:
Matthias seems to have already applied his patch in Python 3.3 and 3.4+:
revision f2cc3d8b88bb.
Roumen: Is your problem still relevant? If so, perhaps open a separate bug to
elaborate.
Koobs: Is your problem with finding Python/Python-ast.c still relevant
Changes by Martin Panter <vadmium...@gmail.com>:
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.5, Python 3.6 -Python 3.7
___
Python tracker <rep...@bugs.python.org>
&l
Martin Panter added the comment:
This is like the OS X Tiger buildbot failure.
http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/11323/steps/compile/logs/stdio
/usr/bin/ld: multiple definitions of symbol _PyDTrace_FUNCTION_ENTRY
Python/ceval.o definition
Martin Panter added the comment:
I’m not sure what the overall status of this bug is, so I will leave the
versions as they are. Are the three comments from 2013 relevant, and is there
anything I can do to help?
The Python 2 code already unconditionally adds -IInclude (see Issue 786737
Changes by Martin Panter <vadmium...@gmail.com>:
--
resolution: -> duplicate
status: open -> closed
superseder: -> test_threading: test_threads_join_2() failed with "Fatal Python
error: Py_EndInterpreter: not the last thread"
_
Changes by Martin Panter <vadmium...@gmail.com>:
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<http://bu
Martin Panter added the comment:
New test failure when using -Werror:
==
ERROR: test_local_bad_hostname (test.test_httplib.HTTPSTest)
--
Traceback (most recent
Changes by Martin Panter <vadmium...@gmail.com>:
Added file: http://bugs.python.org/file44549/srcdir-check.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Changes by Martin Panter <vadmium...@gmail.com>:
Removed file: http://bugs.python.org/file44548/srcdir-check.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Martin Panter added the comment:
There are various tricky cases to be considered with the regenerated files like
importlib.h. One of them is that you are supposed to be able to build Python
from a read-only source tree. See Issue 15819. Writing files into $(srcdir)
would break this.
Also
801 - 900 of 4209 matches
Mail list logo