Change by Sam Roberts :
--
resolution: -> not a bug
___
Python tracker
<https://bugs.python.org/issue46660>
___
___
Python-bugs-list mailing list
Unsubscrib
Sam Roberts added the comment:
this seems like an expected discrepancy because of a difference in the
mechanism used for aware datatimes vs. naive datetimes, although I'm not sure I
understand why the computation with naive datetimes uses the mktime() function
rather than invoking
Sam Roberts added the comment:
the first sentence should have read:
datetime.timestamp() fails for naive-datetime values prior to the start of the
epoch, but for some reason works properly for aware-datetime values prior to
the start of the epoch.
--
title: datetime.fromtimestamp
Change by Sam Roberts :
--
title: datetime.datetime.fromtimestamp -> datetime.fromtimestamp() fails for
naive-datetime values prior to the start of the epoch
___
Python tracker
<https://bugs.python.org/issu
New submission from Sam Roberts :
Python 3.9.2 (tags/v3.9.2:1a79785, Feb 19 2021, 13:44:55) [MSC v.1928 64 bit
(AMD64)] on win32
datetime.fromtimestamp() fails for naive-datetime values prior to the start of
the epoch, but for some reason works properly for aware-datetime values prior
Change by Chris Roberts :
--
nosy: +nasageek
___
Python tracker
<https://bugs.python.org/issue36225>
___
___
Python-bugs-list mailing list
Unsubscribe:
###
CODE:
elif line1.rstrip(‘\n’) in line2.strip(‘\n’):
for line3 in myips:
print “###”
print “line1 is %s” % line1.rstrip(‘\n’)
print “line2 is %s” % line2.strip(‘\n’)
###
OUTPUT:
line1 is 10.10.168.2
line2 is
Tony Roberts added the comment:
Sure, that's reasonable :)
For my case I have a usable workaround so not back porting it to < 3.8 is fine
for me. My workaround will just leak the thread state if another thread is in
__import__, which happens so rarely that it's not really a prob
Tony Roberts added the comment:
GetProcAddress and GetModuleHandle do block in the same way as LoadLibrary and
FreeLibrary - they acquire the loader lock too.
Yes, ideally the application would terminate its threads cleanly, however when
Python is embedded in another application it may
Change by Tony Roberts :
--
keywords: +patch
pull_requests: +7393
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Tony Roberts added the comment:
Sure, I'll get that done in the next couple of days.
--
___
Python tracker
<https://bugs.python.org/issue33895>
___
___
Pytho
New submission from Tony Roberts :
In dynload_win.c LoadLibraryExW is called with the GIL held.
This can cause a deadlock in an uncommon case where the GIL also needs to be
acquired when another thread is being detached.
Both LoadLibrary and FreeLibrary acquire the Windows loader-lock
On Saturday, September 2, 2017 at 6:34:59 PM UTC-4, Chris Roberts wrote:
> Perhaps someone here could help me to get this into perspective.
> Somehow when we start to feed an instance as the argument in a new instance.
> my head explodes..
> in this case...
> a = Foo()
&g
Perhaps someone here could help me to get this into perspective.
Somehow when we start to feed an instance as the argument in a new instance. my
head explodes..
in this case...
a = Foo()
b = Bar(a)
So...
a is a 'Foo instance' with properties and methods.
b is a 'Bar instance'
Since b is using
Will Roberts added the comment:
Github PR adds simple test, as well as an entry in Misc/NEWS.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Will Roberts added the comment:
Thanks for feedback, Serhiy and Raymond! Github PR now has reverted changes
except to the calls in islice_new; I am happy to squash if you would like.
Serhiy, this is my first time poking around in CPython code. What are the
potential consequences of making
Will Roberts added the comment:
Note that this issue also seems to affect other methods in the itertools
package, such as permutations.
--
nosy: +Will Roberts
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
New submission from Adam Roberts:
This was fixed for Python 3 in https://bugs.python.org/issue8844 but needs to
be backported.
--
components: Library (Lib)
messages: 277639
nosy: Adam Roberts
priority: normal
severity: normal
status: open
title: Condition.wait() doesn't raise
It will not allow my to run python 3.5.1
--
https://mail.python.org/mailman/listinfo/python-list
PM, Laura Creighton <l...@openend.se> wrote:
> In a message of Tue, 22 Sep 2015 14:43:55 -0700, Chris Roberts writes:
> >
> >
> >(How do I make it into an index? )
> >Preferably something fairly easy to understand as I am new at this.
> >
> >re
(How do I make it into an index? )
Preferably something fairly easy to understand as I am new at this.
results = 134523 #(Integer)
Desired:
results = [1, 2, 3, 4, 5, 2, 3] #(INDEX)
Somehow I see ways to convert index to list to int, but not back again.
Thanks,
crzzy1
--
is single-quoted or triple-quoted is irrelevant. That is, these two things
are equivalent:
def func(a):
This is a function
return a*2
def func(a):
This is a function
return a*2
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https
easy to move over just because merely most of the top 20
libraries have been moved over. :-/
-Mark
On Thu, Dec 11, 2014 at 12:14 PM, Dan Stromberg drsali...@gmail.com wrote:
On Thu, Dec 11, 2014 at 11:35 AM, Mark Roberts wiz...@gmail.com wrote:
I disagree. I know there's a huge focus on The Big
New submission from E Roberts:
New to the world of Python. The picture attached is an error that a teacher at
my school is receiving when he tries to run anything in IDLE.
I know nothing about coding/python/idle or anything of that nature.
Sorry I am of little help.
Please can someone help
I disagree. I know there's a huge focus on The Big Libraries (and wholesale
migration is all but impossible without them), but the long tail of
libraries is still incredibly important. It's like saying that migrating
the top 10 Perl libraries to Perl 6 would allow people to completely ignore
all
Changes by Ben Roberts bjr.robe...@gmail.com:
--
nosy: +roippi
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22687
___
___
Python-bugs-list
-bit app is pretty
impressive.
Actually, Microsoft made it pretty easy to call 32-bit DLLs in a 16-bit
process and vice versa. That's why many of us were surprised when they did
not provide the same capability in the 32/64 transition.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc
Ben Roberts added the comment:
Any thoughts/reviews on the patch?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19119
___
___
Python-bugs-list
Ben Roberts added the comment:
That is one approach, of course, but imo pretty incomplete. A test that is
named test_get_only presumably would be expected to test __getitem__, not
__cmp__. Confusingly there is still a GetOnly item declared in the module, but
it is not used. Compare
adds significant
functionality on the top of that.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
Ben Roberts added the comment:
' '.join(shlex.quote(x) for x in split_command)
--
nosy: +roippi
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22454
Ben Roberts added the comment:
For the record I am on board with a shlex.join. Even though the implementation
is simple:
- It is not obvious to many users if there are any gotchas by doing a '
'.join yourself, /even if/ you know that strings with spaces in them need to
pass through
Ben Roberts added the comment:
The major issue (there are other issues as well but not so difficult) is
whether nlargest and nsmallest should support iterator that could be endless
iterator or reject it (by checking __len__ attribute) straight away.
Well, failing with an exception isn't
Ben Roberts added the comment:
Attached patch fixes the tests.
--
Added file: http://bugs.python.org/file36683/fix_heapq_tests.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19119
Rustom Mody rustompm...@gmail.com wrote:
On Tuesday, September 2, 2014 6:05:19 AM UTC+5:30, Tim Roberts wrote:
Rustom Mody wrote:
On Tuesday, August 26, 2014 6:58:42 AM UTC+5:30, Tim Roberts wrote:
To the equivalent code with struct:
import struct
dscrp = H?fs5B
f = open
Ben Roberts added the comment:
Going to close this down - implementing rich comparisons for values() does feel
like the correct solution... but I don't think it's possible to implement
__eq__ in better than nlogn time (and possibly space).
So nothing can realistically be done, yeah
Rustom Mody rustompm...@gmail.com wrote:
On Tuesday, August 26, 2014 6:58:42 AM UTC+5:30, Tim Roberts wrote:
To the equivalent code with struct:
import struct
dscrp = H?fs5B
f = open('file.dat')
stuff = struct.unpack( dscrp, f.read() )
print stuff
In both cases, you have
a read_short where you happen to have written a float, disaster ensues.
I don't really see that you've added very much.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
Ben Roberts added the comment:
Thanks Antoine. Cheers :-)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2527
___
___
Python-bugs-list mailing
Seymore4Head Seymore4Head@Hotmail.invalid wrote:
I want to give the computer 100 tries to guess a random number between
1 and 100 picked by the computer.
If it takes more than 7, you're doing it wrong...
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org
Ben Roberts added the comment:
I did sign one right after I submitted the patch. Takes a few days for the
asterisks to propagate I guess :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2527
Ben Roberts added the comment:
Ah yes.
New patch improves the docs.
--
Added file: http://bugs.python.org/file36432/timeit_global_arg_v2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2527
Ben Roberts added the comment:
Attached is a patch that adds a 'global' kwarg to the Timeit constructor, which
does pretty much what it says on the tin: specifies a global namespace that
exec() will use.
I originally had a 'locals' arg as well (to mirror the signature of eval/exec
Ben Roberts added the comment:
Correction, the name of the argument is 'globals', not 'global'.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2527
Changes by Ben Roberts bjr.robe...@gmail.com:
--
nosy: +roippi
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2527
___
___
Python-bugs-list mailing
Ben Roberts added the comment:
I have a patch with tests for this (running the test suite now) but I am
increasingly unsure if python isn't doing the right thing already.
Intuitively, it feels wrong (to me) to allow a dict_values view to be
hashable since the mapping onto which it provides
New submission from Ben Roberts:
In python 3.4 these result in a TypeError:
hash({}.keys())
hash({}.items())
But this succeeds:
hash({}.values())
The 2.7 backports of these - viewkeys, viewitems, and viewvalues respectively -
behave equivalently.
See more discussion on StackOverflow
that helped turn the tide in what otherwise
would have been an ugly war of attrition, much like WWI.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
!
Please note that iPhones come configured from the factory to say that. Some
users probably don't even know it is happening.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
)
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
)
or do this:
conn=psycopg2.connect(database='busard_test', user='laurent',
host='localhost', password='cactus')
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
of the record for the session after each
transaction, and make sure the contents match what you expect.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
executable program:
xxx
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
Ryan Smith-Roberts added the comment:
I notified secur...@python.org and waited for the go-ahead (from Guido I think)
before opening this bug. If today is the first that the PSRT is hearing about
this, then the issue is broader than just the bugtracker
Ryan Smith-Roberts added the comment:
The send part of the test doesn't matter, since what's being tested happens
before any reads. The MSG multiplier should be removed completely, since none
of the other tests do that.
Patch attached.
--
Added file:
http://bugs.python.org/file33573
to BE Python code, then you have little alternative except to
use the suggestions offered. But if you simply want your scripts to be
interpreted by a Python program, then you can do whatever you want.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo
the and operator.
--
Tim Roberts, t...@probo.com
Providenza Boekelheide, Inc.
--
https://mail.python.org/mailman/listinfo/python-list
Ryan Smith-Roberts added the comment:
I believe the feature you starred resolves this enhancement issue, in which
case my patches are obsolete. And yes, the 'as' syntax makes a lot more sense.
Here's how I hope it works (the arg parsing wrapper remains unchanged):
foo: int
...
_impl
Ryan Smith-Roberts added the comment:
Yes, that makes more sense. The specific syntax is nearly irrelevant compared
to the feature existing at all. You still haven't indicated whether your
starred feature matches the *result* that I outlined. Does
Ryan Smith-Roberts added the comment:
I saw the fix for this in the commit stream. Closing.
--
resolution: - fixed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20252
Changes by Ryan Smith-Roberts r...@lab.net:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20252
___
___
Python-bugs-list
Ryan Smith-Roberts added the comment:
Perhaps the test is sending an infeasibly large message. If you remove the
'*2048' does it pass? (I set up a FreeBSD 9.2 amd64 VM but all tests are
passing here).
--
___
Python tracker rep...@bugs.python.org
New submission from Ryan Smith-Roberts:
The docs indicate that you can do:
class foo_converter(CConverter):
...
c_default = 'bar()'
py_default = 'Bar'
except that CConverter.__init__() unconditionally overwrites these values.
Patch attached.
--
components: Build
files
New submission from Ryan Smith-Roberts:
If a custom converter declares both default and converter class attributes, you
get this exception (test file attached):
Exception raised during parsing:
Traceback (most recent call last):
File Tools/clinic/clinic.py, line 1445, in parse
Changes by Ryan Smith-Roberts r...@lab.net:
--
components: +Build
type: - crash
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20300
Changes by Ryan Smith-Roberts r...@lab.net:
--
nosy: +Nikratio
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20299
___
___
Python-bugs-list
Ryan Smith-Roberts added the comment:
No, I'm happy. It isn't really news anyway, since the patch just brings reality
inline with the docs :).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20299
Ryan Smith-Roberts added the comment:
I have reviewed this as best I am able. I'll be honest that a lot of clinic.py
makes my eyes cross; I'm used to webdev templating, which is inverted from AC
(flow control inside the template). Not complaining, it's a complicated
subject. I do like
Ryan Smith-Roberts added the comment:
socketmodule has three builtins which use PyLong_AsUnsignedLong on their
arguments and would benefit from these converters, but only if they raise
OverflowError. So I vote for #2.
I don't think it's unreasonable to continue to have locally-defined
New submission from Ryan Smith-Roberts:
Find test file attached. The exception:
Exception raised during parsing:
Traceback (most recent call last):
...
File proj/python/trunk.hg/Tools/clinic/clinic.py, line 1535, in render
self.parse_argument(data.parse_arguments)
File proj/python
Ryan Smith-Roberts added the comment:
The use case is primarily to minimize code churn for the derby, but since
you're the one (heroically) doing the code review it's really your call. I
whipped up a quick patch for this feature, and even if you remove c_name from
__init__ I think it's still
Changes by Ryan Smith-Roberts r...@lab.net:
Added file:
http://bugs.python.org/file33494/argument_clinic_ensure_legal_cleanup.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20227
Ryan Smith-Roberts added the comment:
Here's sendmsg with only nested bracket optional args. If Rietveld doesn't like
this patch I may cry.
--
Added file:
http://bugs.python.org/file33496/argument_clinic_socketmodule_v4.patch
___
Python tracker rep
Ryan Smith-Roberts added the comment:
After all our discussions I'm closing this with resolution don't do that then.
--
resolution: - wont fix
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20232
Ryan Smith-Roberts added the comment:
Forgot to linewrap a paragraph.
--
Added file:
http://bugs.python.org/file33489/argument_clinic_socketmodule_v2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20174
Ryan Smith-Roberts added the comment:
I've realized this is basically insoluble without PEP 457, because any other
solution involves changing behavior (None being silently accepted where it
would previously raise an exception). If that's OK, then per-function defensive
programming is probably
Ryan Smith-Roberts added the comment:
sha1 is Vajrasky's module. I have a much more complicated example (and Vajrasky
and I just both posted on python-dev separately about this issue):
sockobj.sendmsg(buffers[, ancdata[, flags[, address]]])
-
sockobj.sendmsg(buffers, ancdata=None, flags=0
Ryan Smith-Roberts added the comment:
No, that still leaves address broken since neither None nor an empty tuple are
acceptable.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20232
Ryan Smith-Roberts added the comment:
Tweaked the argument list for functions using a NULL default. Kludgy but
doesn't lie to the user.
--
Added file:
http://bugs.python.org/file33490/argument_clinic_socketmodule_v3.patch
___
Python tracker rep
Ryan Smith-Roberts added the comment:
Here's the socketmodule patch. I aggressively imported text from the docs for
the docstrings, along with matching parameter names, given how far the old
docstrings have drifted over time. The Windows-specific code is untested, but
otherwise the tests pass
Ryan Smith-Roberts added the comment:
Even more imperative than my version. Excellent!
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20202
Changes by Ryan Smith-Roberts r...@lab.net:
--
nosy: +rmsr
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20227
___
___
Python-bugs-list mailing
New submission from Ryan Smith-Roberts:
recvfrom_into fails to check that the supplied buffer object is big enough for
the requested read and so will happily write off the end.
I will attach patches for 3.4 and 2.7, I'm not familiar with the backporting
procedure to go further but all
Changes by Ryan Smith-Roberts r...@lab.net:
Added file:
http://bugs.python.org/file33453/recvfrom_into_buffer_overflow_2.7.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20246
Changes by Ryan Smith-Roberts r...@lab.net:
--
keywords: +patch
Added file:
http://bugs.python.org/file33452/recvfrom_into_buffer_overflow_3.4.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20246
Ryan Smith-Roberts added the comment:
Georg Brandl wrote:
Although now is a good time to ensure sensible argument names (I
usually look at the docs to find the documented ones), so that
switching the function to keyword arg support is basically just a
removal of '/'
I started doing
New submission from Ryan Smith-Roberts:
The docs indicate their arguments are positional-only. Trivial patch attached.
--
assignee: docs@python
components: Documentation
files: docs_socket_recvmsg_args.patch
keywords: patch
messages: 208067
nosy: docs@python, rmsr
priority: normal
Ryan Smith-Roberts added the comment:
Never mind, it's actually recvfrom{,_into}. Sigh.
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20248
New submission from Ryan Smith-Roberts:
type - types
--
assignee: docs@python
components: Documentation
files: argument_clinic_howto_y-hash.patch
keywords: patch
messages: 208076
nosy: docs@python, larry, rmsr
priority: normal
severity: normal
status: open
title: Argument Clinic howto
Ryan Smith-Roberts added the comment:
Thank you for including the doc change in your other patch. As the grammar was
off, instead of just fixing it I naturally rewrote it. Use this patch or just
remove the extraneous for you as you prefer.
--
keywords: +patch
Added file:
http
Ryan Smith-Roberts added the comment:
Just discovered that the bugtracker mail was all going into my spam filter,
yay. Didn't notice your reply until just now.
The functools patch was just a quickie to get it out of my mental queue, and
I'm still working on socketmodule. This is my first time
Changes by Ryan Smith-Roberts r...@lab.net:
--
type: - crash
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20231
___
___
Python-bugs-list mailing
New submission from Ryan Smith-Roberts:
A signature of the form
a: object = None
b: object
results in b being uninitialized in the generated C code prior to the
PyArgs_ParseTuple call. If ParseTuple does not set a value for b (as it is an
optional argument), b then contains a garbage pointer
New submission from Ryan Smith-Roberts:
When one specifies a default of NULL, the generated signature doc indicates a
default of None. However, if the user actually supplies None, perhaps as a
placeholder in a positional-only call, C code which only checks for NULL will
fail inappropriately
Ryan Smith-Roberts added the comment:
Accepts only a writable bytearray, when the function needs to mutate-in-place.
The rw_buffer support is for PyPy I guess.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20201
New submission from Ryan Smith-Roberts:
socket.sendto is apparently even weirder than addch or range: the optional
argument is in the *middle*. Attempting this configuration gets me:
Function sendto has an unsupported group configuration. (Unexpected state 5)
An expected unexpected
Ryan Smith-Roberts added the comment:
Taking a crack at this.
socketmodule.h: just a comment, skipping.
_functools.c: kind-of skipping, because the relevant functions are not normally
directly called (pickle protocol __reduce__ and __setstate__ on partial,
__call__ on cmp wrapper). Will add
New submission from Ryan Smith-Roberts:
The custom converter declaration is wrapped with [clinic input] when it should
be [python input].
Patch attached.
--
files: argument_clinic_docfix.patch
keywords: patch
messages: 207724
nosy: rmsr
priority: normal
severity: normal
status: open
Changes by Ryan Smith-Roberts r...@lab.net:
--
keywords: +patch
Added file: http://bugs.python.org/file33372/argument_clinic_functools.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20174
Ryan Smith-Roberts added the comment:
I'm such a goofball, how about some bug metadata
--
components: +Build
type: - compile error
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20201
1 - 100 of 1109 matches
Mail list logo