New submission from Ross Lagerwall :
Here's a patch that adds a bunch of posix functions that are missing from the
posix module. Includes tests & documentation.
Tested on Linux & FreeBSD.
Specifically:
futimes
lutimes
futimens
fexecve
Ross Lagerwall added the comment:
I tested this on FreeBSD 8.1 - it outputs 'hello world'.
I think this should be closed - i think the os.exec* functions should mirror
the operating system exec* functions. If the platform has a limitation then so
be it.
And it seems like the lates
Ross Lagerwall added the comment:
A slightly updated patch. Targeting for 3.3.
--
versions: +Python 3.3 -Python 3.2
Added file: http://bugs.python.org/file20253/9344_v2.patch
___
Python tracker
<http://bugs.python.org/issue9
Ross Lagerwall added the comment:
Does this mean that it's better to call the close() syscall 1000 or 1000
times rather than listing the open fds & closing say a handful?
On Linux, the listdir function results in an open() syscall, 2 or so getdents()
calls and a close() cal
Ross Lagerwall added the comment:
This patch:
Fixes test_lutimes(),
Ignores a posix_fallocate() failure on Solaris due to ZFS,
Changes readv() & writev() signatures such that they take sequences instead of
tuples,
Changes readv() so that it takes a number of writable buffers, fills them
Ross Lagerwall added the comment:
Here is a draft patch.
It uses the *at functions and fdlistdir consequently it only makes it safe if
those functions are available. It works using a recursive implementation and an
open file descriptor pointing to a directory, instead of maintaining state by
Ross Lagerwall added the comment:
Updated patch removes the race condition. Since an open follows symlinks, you
can't just fstat the fd to see if it is a link. I followed the following to
overcome this:
https://www.securecoding.cert.org/confluence/display/seccode/POS35-C.+Avoid
Ross Lagerwall added the comment:
I think I misread the original implementation. Here is an updated version with
that code just taken out.
--
Added file: http://bugs.python.org/file20279/i4489_v3.patch
___
Python tracker
<http://bugs.python.
Ross Lagerwall added the comment:
This new patch reuses iov allocation code between readv & writev.
It reuses code between exec, execve & fexecve.
It reuses code for parsing off_t types.
I've tried where possible to reuse code but I think though that the code seems
pretty sta
Ross Lagerwall added the comment:
> it's a bit asymmetric that gethostname is in the socket
> module and supports Windows, and sethostname is in the POSIX
> module. It would be useful to have a gethostname in the POSIX
> module also which is a) POSIX only and b) support
Ross Lagerwall added the comment:
Thanks for the comments.
I implemented sethostid() - its not actually in the posix spec, but linux/*bsd
have it although the signature for FreeBSD is a bit different.
I implemented gethostname(). Both get/sethostname() now use FSDefault encoding.
gethostname
Ross Lagerwall added the comment:
This patch takes out sethostname() and gethostname(). I'll open up a new issue
to add sethostname() to the socket module.
--
Added file: http://bugs.python.org/file20311/10812_v5.patch
___
Python tracker
New submission from Ross Lagerwall :
This patch adds sethostname to the socket module (since socket has
gethostname()).
--
components: Library (Lib)
files: sethostname.patch
keywords: patch
messages: 125761
nosy: giampaolo.rodola, loewis, rosslagerwall
priority: normal
severity: normal
Changes by Ross Lagerwall :
--
nosy: +rosslagerwall
___
Python tracker
<http://bugs.python.org/issue10822>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Ross Lagerwall :
Attached is a patch which implements os.sendfile for unix systems (linux,
freebsd, apple, solaris, dragonfly).
It takes the iov initialization code and off_t parsing from i10812.
It encapsulates all the functionality from the various sendfiles which means
Ross Lagerwall added the comment:
Ok, I figured it out to link with sendfile on solaris. Here is the updated
patch.
--
Added file: http://bugs.python.org/file20352/sendfile_v2.patch
___
Python tracker
<http://bugs.python.org/issue10
Ross Lagerwall added the comment:
It seems to work fine on OpenIndiana (running normally or as root).
According to the posix specification, "It is implementation-defined whether
getgroups() also returns the effective group ID in the grouplist array."
But, id -G prints all group ID
Ross Lagerwall added the comment:
This issue has been fixed on 3.2.
--
nosy: +rosslagerwall
versions: -Python 3.2
___
Python tracker
<http://bugs.python.org/issue4
New submission from Ross Lagerwall :
I think there is a small docs bug: it says that multiprocessing.Semaphore is "a
bounded semaphore". Shouldn't it says that it is just "a semaphore".
Attached is a patch to fix this.
--
components: Library (Lib)
files:
Ross Lagerwall added the comment:
Just to be clear:
There are 3 different interfaces.
The basic one with the offset included & no headers/trailers is supported by
all the platforms, including Linux.
The one with offset as None is only supported by Linux.
The one with headers/trailers/flag
Ross Lagerwall added the comment:
I've just tried it against r87935 and it applies cleanly.
Perhaps you didn't apply the patch correctly (it requires "-p1" since it was a
Mercurial diff), try:
patch -p1 < sendfile_v2.patch
With regards to the different arguments,
Changes by Ross Lagerwall :
--
assignee: -> d...@python
components: +Documentation
nosy: +d...@python
___
Python tracker
<http://bugs.python.org/issu
Ross Lagerwall added the comment:
Oh sorry, that was because it changed configure.in so "autoreconf" needs to be
run to regenerate configure & pyconfig.h.in.
I thought that patches weren't meant to include the regenerated files.
Especially since differences in the versio
Ross Lagerwall added the comment:
How about this?
Instead of just losing the data that's been read so far in readline(), this
patch adds the data as a new field to the exception that is thrown - this way
the semantics remain exactly the same but the data is not discarded when a
ti
Ross Lagerwall added the comment:
> That complicates things quite a bit,
> especially given that it has to be grafted on at least two layers of the
> IO stack (the raw IO layer, and the buffered IO layer).
Also the TextIO layer I think.
> That's my opinion too. So, instead, o
Ross Lagerwall added the comment:
Attached patch disallows further reads after a timeout.
--
Added file: http://bugs.python.org/file20398/i7322.patch
___
Python tracker
<http://bugs.python.org/issue7
Ross Lagerwall added the comment:
Shouldn't this be closed? CGIHTTPServer *has* been updated to use subprocess on
windows and the dependency has been closed as wont fix.
--
nosy: +rosslagerwall
___
Python tracker
<http://bugs.py
Ross Lagerwall added the comment:
I think all that is needed is a documentation patch. Attached is a doc patch
which changes the doc to explicitly describe what happens on unix & windows (as
described by Peter).
--
components: +Documentation
keywords: +patch
nosy: +rosslager
Ross Lagerwall added the comment:
After trying to reproduce this bug in 2.7.1 & 3.2b2 and failing, I think this
should be closed (even the OP couldn't reproduce it in anything other than 2.4).
--
nosy: +rosslagerwall
___
Python track
New submission from Ross Lagerwall :
If a mmap length 0 is used and an offset is used as well, the size to mmap() is
calculated as the size of the file instead of the size of the file minus
offset. This means that trying to access a certain part does not result in an
index error but a
Ross Lagerwall added the comment:
I think this can be closed.
msync() is only called in mmap.flush() and it is checked for an error.
--
nosy: +rosslagerwall
___
Python tracker
<http://bugs.python.org/issue2
Ross Lagerwall added the comment:
Attached is a fix to make offset use off_t. This means that mmap will work with
offset > 2GB on 32bit systems.
It also fixes that mmap.size() returns the correct value for files > 2GB on
32bit systems.
The first issue of msg78055 was fixed in issu
Ross Lagerwall added the comment:
>From what I can see, this issue is in memoryview and allows memoryview to
>export a readonly buffer as writable (because memoryview.getbuffer() removes
>the writable flag from flags before calling the underlying buffer).
This causes segfaults w
Ross Lagerwall added the comment:
Attached is an updated patch with a simpler test.
--
Added file: http://bugs.python.org/file20440/i10451_v2.patch
___
Python tracker
<http://bugs.python.org/issue10
Ross Lagerwall added the comment:
And a simple fix for the test_getargs2 test - it wraps the memoryview around a
bytearray.
--
Added file: http://bugs.python.org/file20441/testfix.patch
___
Python tracker
<http://bugs.python.org/issue10
Ross Lagerwall added the comment:
I tried to reproduce the bug on 2.7 & 3.2 using libuuid version 2.17.2 and up
to 100 threads but couldn't.
Perhaps there was an issue with the uuid library function that he was using and
threading?
--
nosy: +ross
Ross Lagerwall added the comment:
Fixed small #ifdef error with fstatat.
--
Added file: http://bugs.python.org/file20460/i4761_v6.patch
___
Python tracker
<http://bugs.python.org/issue4
Ross Lagerwall added the comment:
A few small fixes for OS X:
It has no return value for sethostid() and sets different errno if permission
denied,
waitid() is broken - so its disabled,
the timeval struct used in futimes and lutimes is defined slightly differently.
--
Added file: http
New submission from Ross Lagerwall :
The fix for issue10916 commited in r88022 introduces this line:
map_size = st.st_size - offset;
If offset > st.st_size, map_size is negative. This should cause the mmap system
call to return -1 and set errno.
However, given a certain size of offset, si
Ross Lagerwall added the comment:
Yes I think subprocess is working correctly.
Since this feature request is 2 years old now without any interest, I think it
should be closed. If the functionality is needed, it can always be programmed
by the user when needed.
--
nosy
Ross Lagerwall added the comment:
Attached is a patch based on the original patch, meant to have better
performance.
On my PC, this:
import sys, time, uuid
def uu(n):
t = time.time()
for x in range(n):
uuid.uuid1()
print('%.3f microseconds' % ((time.
Ross Lagerwall added the comment:
Attached is a new sendfile patch which fixes the issue with FreeBSD (and Mac OS
X & DragonFly BSD from what I can see).
With regards to anacrolix's request, I think what Martin said in msg126049.
i.e. if we want to provide a unifying layer on top of
Ross Lagerwall added the comment:
Attached is an updated patch that uses keyword arguments.
Using an offset with Linux was always supported although I have cleaned up the
documentation a bit to make that clearer.
E.g. the following script sends part of a file over a socket (shows using an
Ross Lagerwall added the comment:
OK, updated documentation and tests.
> Why special case these? Why can't Mac OS X and FreeBSD write those manually
> into the output file descriptor.
These can be a crucial part of certain protocols such as HTTP to ensure that a
minimal am
Ross Lagerwall added the comment:
This has been fixed in 2.7 and 3.2 so I think that this issue can be closed.
--
nosy: +rosslagerwall
___
Python tracker
<http://bugs.python.org/issue9
Ross Lagerwall added the comment:
The docs should be updated. This has been noted in msg54949 and
http://www.enricozini.org/2009/debian/python-pipes/
Perhaps this example will make it clear:
import subprocess
p1 = subprocess.Popen(["yes"], stdout=subprocess.PIPE)
p2 = subprocess.Po
Ross Lagerwall added the comment:
For trailers to work, I think the line:
self.assertEqual(data, "abcde12345")
should be:
self.assertEqual(data, b"abcde12345")
Also not that tests like this:
if not sys.platform.startswith('linux'):
perhaps should also in
Ross Lagerwall added the comment:
With no changes, I get:
==
FAIL: test_trailers (test.test_os.TestSendfile)
--
Traceback (most recent call last):
File "
Ross Lagerwall added the comment:
OK, this new patch applies cleanly, uses support.unlink and hexadecimal
constants.
I left the off_t handling as is (it seems to work on *nix testing). Perhaps
someone can handle the Windows side?
--
Added file: http://bugs.python.org/file20722
Ross Lagerwall added the comment:
OK, I'm happy to not return the file offset. However, I still think that
headers and trailers should remain as is since this matches the native
interface very closely.
--
___
Python tracker
Ross Lagerwall added the comment:
> will this patch support off_t for "mmap.resize" as well?
> ftruncate uses off_t for the length of a file as well.
No, it doesn't because resize() resizes the amount mmapped in memory which
can't be more than ssize_t anyway. Howeve
Ross Lagerwall added the comment:
32-bit computers can address up to 4GiB of memory and 64-bit computers can
address much more than this. mmap() allows a file to be mapped to a location in
memory - the actual amount of memory that exists doesn't matter. This is the
reason why a 5GiB fil
Changes by Ross Burton <[EMAIL PROTECTED]>:
--
title: os.path.ismount doesn't work for NTFS mounts -> os.path.ismount doesn't
work for mounts the user doesn't have permission to see
versions: +Python 2.5 -Python 2.4
__
New submission from Ross Cohen :
This is a backport of the newgil work to the 2.7 branch (otherwise known as
trunk.) Patch is against r77678.
Created by diffing r76193 (last in the newgil branch)
against r76189 and applying the result. Generally applied cleanly and it looked
as though only 1
Ross Cohen added the comment:
Thanks Neil for fixing up the patch.
As for Marc-Andre's comments, I'm happy to backport any further
changes which happen on the py3k branch. I'd like to keep this as a
strict backport, only changing things as necessary to get it to work
with the
Ross Cohen added the comment:
On Fri, 22 Jan 2010 09:32:36 +
Marc-Andre Lemburg wrote:
> * Please add the fallback solutions from the time module in case
> gettimeofday() is not available. You cannot assume that "all modern POSIX
> systems" implement that API - i
Ross Cohen added the comment:
On Sat, 23 Jan 2010 18:23:10 +
Antoine Pitrou wrote:
> By the way, the new GIL only works with POSIX and Windows NT threading APIs.
> Perhaps it can't be backported at all to 2.x, given that 2.x supports more
> threading APIs than py3k does?
Ross Cohen added the comment:
I am confused by this line of reasoning. Is it ok to ignore the
deprecation process in py3k but not in 2.x? Is it only ok if a core
developer does it?
If the point of 2.7 is to make it easier for apps and packages to be
ported to py3k, then what would be the point
Ross Cohen added the comment:
On Fri, 29 Jan 2010 21:15:14 +
Marc-Andre Lemburg wrote:
> Breaking existing applications and ports of Python for 2.7
> certainly won't make anything easier for anyone.
>
> For 2.7 we will certainly not allow the above to happen,
> sinc
New submission from Ross Burton <[EMAIL PROTECTED]>:
I'm not sure why this is, but ismount doesn't always work for me. It
appears to fail on NTFS mounts.
$ mount
...
/dev/sda1 on /media/windows type ntfs (ro,noexec,nosuid,nodev,user=ross)
redbeard.local:/home on /media/home t
Ross Burton <[EMAIL PROTECTED]> added the comment:
Aha. The contents of the mount point are only accessible by root:
$ stat /media/windows/..
stat: cannot stat `/media/windows/..': Permission denied
This falls into the except block, so false is returned.
If ismount() used os.p
Ross Light added the comment:
Hello, my name is Ross Light. I've written a patch for this, but this
is my first patch, so someone please review.
This does pass all regression tests, but I did have to modify the
test_sys case to not check for sys.version_info being a
Ross Light added the comment:
Oh yes, you're right. Sorry!
Added file: http://bugs.python.org/file12857/patch-4285b.diff
___
Python tracker
<http://bugs.python.org/i
Ross Light added the comment:
Okay, here's a patch with the requested changes. You're right in saying
that flag is usually boolean, I was just going along with several other
files where there's float and int flags (i.e. floatobject.c).
Added file: http://bugs.python.org/
Ross Light added the comment:
Tests added and new patch uploaded. Anything else, anyone?
Added file: http://bugs.python.org/file12870/patch-4285d.diff
___
Python tracker
<http://bugs.python.org/issue4
Ross Rhodes added the comment:
PR already open to support DICOM based on the first 132 characters. Marked
“stale” since I haven’t had any feedback on GitHub, yet.
--
___
Python tracker
<https://bugs.python.org/issue42
Ross Rhodes added the comment:
PR now “stale” since I have not received any feedback, yet.
--
___
Python tracker
<https://bugs.python.org/issue43123>
___
___
Ross Martin added the comment:
I would like to fix this, if it hasnt been assigned already.
--
nosy: +MrRBM97
___
Python tracker
<https://bugs.python.org/issue45
New submission from Ross Burton :
If my openssl is built with no-scrypt then the Python build of hashlib fails
(as EVP_PBE_scrypt isn't present), but the overall compile succeeds.
--
components: Build
messages: 405954
nosy: rossburton2
priority: normal
severity: normal
status:
Change by Ross Burton :
--
versions: +Python 3.10
___
Python tracker
<https://bugs.python.org/issue45749>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ross Burton added the comment:
Cool, glad to see the additional checks.
--
___
Python tracker
<https://bugs.python.org/issue45749>
___
___
Python-bugs-list m
Ross Boylan added the comment:
As someone who finds the current behavior surprising, and having lost
significant time because of it, I have a couple of comments.
1) If the venv created a python3 (or 2, as appropriate) file, would the
expected behavior with !#/usr/bin/env python3 be restored
New submission from Ross Rhodes :
http library missing HTTP status code 418 "I'm a teapot".
--
messages: 361106
nosy: trrhodes
priority: normal
severity: normal
status: open
title: http library missing HTTP status code 418 "I'm a teapot"
Change by Ross Rhodes :
--
keywords: +patch
pull_requests: +17665
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18291
___
Python tracker
<https://bugs.python.org/issu
New submission from Ross Rhodes :
Hello,
Thoughts on a new function in the math module to find prime factors for
non-negative integer, n? After a brief search, I haven't found previous
enhancement tickets raised for this proposal, and I am not aware of any
built-in method within e
Ross Rhodes added the comment:
Hi Tim,
Are there any open discussions or threads following the proposed “imath”
module? I’m a relatively new entrant to the Python community, so if there’s any
ongoing discussion on that front I’d be happy to read further.
I think as a first step it would be
Ross Rhodes added the comment:
Hi Serhiy,
Thanks for sharing your thread. I support this proposal, and would be happy to
help where time permits if we can gather sufficient support.
I inadvertently posted my support twice on your thread with no obvious means of
deleting the duplicate post
Ross Rhodes added the comment:
Hi Serhiy,
> Provide a pull request.
Apologies, by "this idea" I should clarify I meant the "imath" module proposal.
On this particular enhancement, yes, I'm happy to work on and l
Ross Rhodes added the comment:
Hi Steven,
I agree, your set of proposed methods seem sensible to me. I'm happy to start
with an implementation of at least some of those methods and open for review,
taking this one step at a time for easier review and regular feedback.
> Another
Ross Rhodes added the comment:
Unable to dedicate time to this issue under the change of circumstances. Happy
for someone else to re-open this if they take an interest in picking up this
work.
--
resolution: -> postponed
stage: needs patch -> resolved
status: open -&g
Change by Ross Rhodes :
--
keywords: +patch
nosy: +trrhodes
nosy_count: 1.0 -> 2.0
pull_requests: +22804
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23957
___
Python tracker
<https://bugs.python.org/i
Ross Rhodes added the comment:
Hello Patrick,
Thanks for opening this issue. I'm creating a PR to resolve the typo in
"_allow_reckless_class_cheks", but I'm unable to find "instnance". Presumably
the latter
Change by Ross Rhodes :
--
keywords: +patch
nosy: +trrhodes
nosy_count: 1.0 -> 2.0
pull_requests: +22814
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23969
___
Python tracker
<https://bugs.python.org/i
Ross Rhodes added the comment:
Hello Wüstengecko,
Thanks for raising this issue. I've opened a PR which I believe will resolve
the problem, but it's difficult to verify this against the mock socket setup.
Feel free to leav
Change by Ross Rhodes :
--
keywords: +patch
nosy: +trrhodes
nosy_count: 1.0 -> 2.0
pull_requests: +22839
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23996
___
Python tracker
<https://bugs.python.org/i
Ross Rhodes added the comment:
Hi Tom,
Thanks for raising this issue. I've opened a PR to permit us to set
`follow_symlinks` in both os.path and pathlib. Feel free to leave feedback.
--
___
Python tracker
<https://bugs.python.org/is
Ross Rhodes added the comment:
Hi Konstantin,
Thanks for raising this issue. It appears the field provided in your example
does not conform to RFC 2822 followed by this email library. Square brackets
are treated as special characters in [section
3.2.1](https://tools.ietf.org/html/rfc2822
Ross Rhodes added the comment:
Hi Sumagna,
test_pdb appears to be working as expected on my machine. I realise this was
posted a few months ago so would you mind trying again and seeing if the issue
persists? If so, which OS are you running your tests on?
--
nosy: +trrhodes
Ross Rhodes added the comment:
Server is returning '215 Newsgroup descriptions in form "group description"',
but an empty list of lines, so it's reaching the 'nothing' case in
_getdescriptions:
https://github.com/python/cpython/blob/master/Lib/nntplib.
Change by Ross Rhodes :
--
pull_requests: +22886
pull_request: https://github.com/python/cpython/pull/24050
___
Python tracker
<https://bugs.python.org/issue42
Change by Ross Rhodes :
--
keywords: +patch
nosy: +trrhodes
nosy_count: 2.0 -> 3.0
pull_requests: +23050
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/24227
___
Python tracker
<https://bugs.p
Ross Rhodes added the comment:
Hello Charles,
Following the format provided, I've opened a PR to implement your proposal.
Feedback welcome.
--
___
Python tracker
<https://bugs.python.org/is
Change by Ross Rhodes :
--
keywords: +patch
nosy: +trrhodes
nosy_count: 3.0 -> 4.0
pull_requests: +23267
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24475
___
Python tracker
<https://bugs.python.org/i
Ross Rhodes added the comment:
Hi Martin,
Looking into this further, it appears we already catch CR-LF characters in
header values, but your test case shows that we do not run the same checks on
header names.
I've opened a PR to rectify this - feel free to leave feedback.
Ross Rhodes added the comment:
Looking for input from other contributors here. Naturally with a PR already
open I’m inclined to keep these changes, but if the majority agree that it is
too specific a format then I’m happy to hear alternative suggestions?
Ross
Ross Rhodes added the comment:
Thanks for sharing the alternative approach, Serhiy. Sounds like the proposed
changes aren’t necessary if the combined use of samestat and lstat achieve the
desired behaviour.
Any objections if I close the open PR
Gordon Ross added the comment:
I can understand the frustrations around dealing with minority platforms, but
please remember that the illumos project (www.illumos.org) is basically the
inheritor of problems around "Build on Solaris" for 3rd party software like
Python. There are
New submission from Ross Barnowski :
It would be nice if there were a way to get a string representation of a slice
object in extended indexing syntax, e.g.
```
>>> myslice = slice(None, None, 2)
>>> print(myslice)
'::2'
```
One motivating use-case is in des
Changes by Ross Lagerwall :
--
nosy: +rosslagerwall
___
Python tracker
<http://bugs.python.org/issue13779>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ross Lagerwall added the comment:
Thanks for the patch.
However, this cannot as far as I understand be used for the subprocess
implementation due to the limitation of what can be called after a fork() and
before an exec().
Take a look at #8052 for some more discussion of this
201 - 300 of 408 matches
Mail list logo