New submission from Alexander Kamyanskiy:
I found that some points in Python Library reference documentation are not
accessible, I got 503 http error.
The problem starts from this link and some points below the 29.14 point of doc
list:
https://docs.python.org/3/library/fpectl.html
Also now
Alexander Belopolsky added the comment:
I agree. The documentation can be improved here. The note about x - y not
being quite the same as x + (-y) belongs to the timedelta - timedelta
operation. It should be removed from both date - timedelta and
datetime-timedelta footnotes
Alexander Belopolsky added the comment:
This issue is waiting for the final decision on #5288. If sub-minute offsets
support is accepted, I still don't think we need %::z because %:z can simply
add non-zero :seconds as needed. There are also some review comments on the
latest patch
Changes by Alexander Belopolsky :
--
nosy: +gvanrossum
___
Python tracker
<http://bugs.python.org/issue5288>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Alexander Belopolsky :
--
priority: low ->
versions: +Python 3.7 -Python 3.5
___
Python tracker
<http://bugs.python.org/issue5288>
___
___
Python-
Changes by Alexander Belopolsky :
--
pull_requests: +2949
___
Python tracker
<http://bugs.python.org/issue5288>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
Most of the code supporting arbitrary offsets has already been committed. The
only part left was to remove the checks and implement printing.
--
___
Python tracker
<http://bugs.python.org/issue5
Changes by Alexander Belopolsky :
--
assignee: -> belopolsky
___
Python tracker
<http://bugs.python.org/issue5288>
___
___
Python-bugs-list mailing list
Un
Alexander Belopolsky added the comment:
In PR 2896, I've modified %z formatting code to output sub-minute data if
present. I think %z parsing should be also modified to accept sub-minute data,
but I would like to do it in the context of issue 24954. Tho
Alexander Belopolsky added the comment:
John,
An RFC3339 parser is beyond the scope of this issue which is limited to adding
str[fp]time code(s) to produce and consume RFC3339-formatted timezones.
We can still have fromisoformat() constructor implemented in 3.7, but someone
needs to address
New submission from Alexander Mohr:
I have a project in a prod environment which heavily uses asyncio and a
threadpool. It uses the threadpool to run CPU heavy tasks (in this case
populating a defaultdict) to avoid blocking the main thread (no async code in
thread). For some time now my
Alexander Mohr added the comment:
btw I've seen this issue in 3.5.2 + 3.6.2 on debian jessie + stretch
--
___
Python tracker
<http://bugs.python.org/is
Alexander Belopolsky added the comment:
Victor,
Tim called for removal of all restrictions on the offsets. See msg248468. I
left the range restriction intact because we have some algorithms that rely on
that, but in general I agree with Tim. There is nothing to be gained from
restricting
Alexander Belopolsky added the comment:
> My concern is that it makes timestamp parsing more complex
To the contrary. The timezone field can now be parsed the same way as the time
field plus the sign.
--
___
Python tracker
<http://bugs.pyth
Alexander Mohr added the comment:
so looks like disabling the _asyncio module just caused the crash to happen
less often, closing and will continue investigating after a get a core file
--
stage: -> resolved
status: open -> closed
___
Alexander Mohr added the comment:
the problem with this crash is that it only happens periodically in our prod
environment :( If I try running the exact same docker container with the same
inputs locally it doesn't reproduce, so frustrating. I've created a whole
workflow now for
Alexander Mohr added the comment:
ok got a full debug core file, let me know what other information I can provide.
--
status: closed -> open
Added file: http://bugs.python.org/file47049/python crash.txt
___
Python tracker
<http://bugs.pyth
Alexander Mohr added the comment:
this is the comment on the assert:
/* Python's cyclic gc should never see an incoming refcount
* of 0: if something decref'ed to 0, it should have been
* deallocated immediately at that time.
* Possible cause (if the assert triggers): a
Alexander Mohr added the comment:
hmm, how would I do that? btw I'm not 100% sure this is due to asyncio.
--
___
Python tracker
<http://bugs.python.org/is
Alexander Mohr added the comment:
btw got slightly difference stacktrace on second core file
--
Added file: http://bugs.python.org/file47051/python crash2.txt
___
Python tracker
<http://bugs.python.org/issue31
Alexander Mohr added the comment:
I'm tracking something very similar issue to this in bug:
http://bugs.python.org/issue31061 Given its similarities, anyone have any
ideas? Based on the second callstack I'm starting to think this is an issue
with defaultdict
--
nosy:
Alexander Belopolsky added the comment:
New changeset 018d353c1c8c87767d2335cd884017c2ce12e045 by Alexander Belopolsky
in branch 'master':
Closes issue bpo-5288: Allow tzinfo objects with sub-minute offsets. (#2896)
https://github.com/python/cpyt
Changes by Alexander Belopolsky :
--
resolution: -> fixed
stage: test needed -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.o
Alexander Mohr added the comment:
oh, so this is looking like an asyncio issue, the "gc" that is causing the
crash is:
(gdb) print *FROM_GC(gc)->ob_type
$8 = {ob_base = {ob_base = {_ob_next = 0x7f80c8aafc88, _ob_prev =
0x7f80c8aafd00, ob_refcnt = 7, ob_type = 0x7f80cd8c86e0 },
Alexander Mohr added the comment:
so I just discovered that the object that has the zero refcount has the same
tp_dealloc:
(gdb) print *FROM_GC(gc)->ob_type
$8 = {ob_base = {ob_base = {_ob_next = 0x7f80c8aafc88, _ob_prev =
0x7f80c8aafd00, ob_refcnt = 7, ob_type = 0x7f80cd8c86e0 }, ob_s
Alexander Mohr added the comment:
another core had a different gc object:
$1 = {ob_base = {ob_base = {_ob_next = 0x7f801eac3158, _ob_prev =
0x7f801eab95a0, ob_refcnt = 41, ob_type = 0x7f80238e76e0 },
ob_size = 0}, tp_name = 0x7f801e8967af "_asyncio.Task", tp_basicsize = 128,
tp_it
Alexander Mohr added the comment:
I'm hoping this is the fix:
--- Modules/_asynciomodule.c.orig 2017-07-31 12:16:16.0 -0700
+++ Modules/_asynciomodule.c2017-07-31 13:08:52.0 -0700
@@ -953,15 +953,18 @@
FutureObj_dealloc(PyObject *self)
{
FutureObj
Alexander Mohr added the comment:
ok, created: https://github.com/python/cpython/pull/2966
there are some other deallocs in there, mind verifying the rest?
--
pull_requests: +3014
___
Python tracker
<http://bugs.python.org/issue31
Alexander Mohr added the comment:
should the base method which calls tp_dealloc do this? Maybe can kill all
birds with one stone.
--
nosy: +thehesiod
___
Python tracker
<http://bugs.python.org/issue31
Alexander Mohr added the comment:
I suggest any places that don't need the calls should have comments so that
future reviewers know why.
--
___
Python tracker
<http://bugs.python.org/is
Alexander Mohr added the comment:
actually another idea: could the PR for this also update
https://docs.python.org/2/c-api/typeobj.html#c.PyTypeObject.tp_dealloc to
mention about these macros and when they should be used? That, along with all
the other locations correctly calling these
Alexander Mohr added the comment:
omg I just realized I need the default dict one too, great investigation work!
--
___
Python tracker
<http://bugs.python.org/issue31
Alexander Mohr added the comment:
I've verified that this along with the changes in 31095 resolve the crashes
I've been seeing in our production environment
--
___
Python tracker
<http://bugs.python.o
Alexander Mohr added the comment:
bad news, I just got a crash in the same place (updating defaultdict) after
running for a week with the fixes from this and inada naoki's patches. I think
the threadpool may be leaking threads too as I had > 40 threads after running
for a week when
Alexander Mohr added the comment:
hmm, may be my fault due to docker image tagging issue. Will redeploy and
update if the issue persists. If I don't reply again sorry for the noise.
--
___
Python tracker
<http://bugs.python.org/is
Alexander Belopolsky added the comment:
The question is whether -62135658000.0 is the "correct" or even meaningful
value:
>>> datetime.utcfromtimestamp(-62135658000.0)
Traceback (most recent call last):
File "", line 1, in
ValueError: year is out of range
(I r
Alexander Belopolsky added the comment:
On the second thought, a reasonable design can use datetime.min/max as
placeholders for unknown times far in the past/future compensating for the lack
datetime ±inf. In this use case, it may be annoying to see errors from
timestamp() instead of some
Alexander Belopolsky added the comment:
It your use case, the input "0001-01-01T00:00:00" was in what timezone?
I suspect what you want is
>>> datetime.min.replace(tzinfo=timezone.utc).timestamp()
-62135596800.0
And not -62135658000.0. If you work with naive datetim
Alexander Belopolsky added the comment:
BTW, I was originally against introducing .timestamp() method and this issue
illustrates why it is problematic: people use it without understanding what it
does. If you want the distance between datetime.min and datetime(1970,1,1) in
seconds - compute
Alexander Belopolsky added the comment:
> It still seems like this shouldn't give an error (especially when the
> timezone of the local machine is UTC)
This is the part where I agree with you. I suspect the error in the UTC case
is an artifact of PEP 495 fold calculations t
Alexander Mohr added the comment:
my vote is yes due to the defaultdict issue. We were hitting this in our prod
env
--
___
Python tracker
<http://bugs.python.org/issue31
Alexander Mohr added the comment:
let me know if I need to do anything
--
___
Python tracker
<http://bugs.python.org/issue29302>
___
___
Python-bugs-list mailin
Changes by Alexander Mohr :
--
nosy: +thehesiod
versions: +Python 3.6, Python 3.7
___
Python tracker
<http://bugs.python.org/issue1025395>
___
___
Python-bug
Alexander Mohr added the comment:
from 3.6:
>>> AddrlistClass('John Smith ').getcomment()
''
>>> AddrlistClass('John Smith ').getdomain()
'JohnSmith'
totally messed up :)
--
__
Alexander Mohr added the comment:
looks like these were meant to be internal methods, retracting new issues
--
___
Python tracker
<http://bugs.python.org/issue1025
Change by Alexander Belopolsky :
--
pull_requests: +10105
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issue9004>
___
___
Py
Alexander Belopolsky added the comment:
I submitted Gaurav's patch as PR 10870. Please review.
--
___
Python tracker
<https://bugs.python.org/i
Alexander Belopolsky added the comment:
> On Dec 4, 2018, at 10:27 AM, Şahin wrote:
>
> Is there anything similar to this for "public API functions"?
Yes - read the reference manual. If the function is not there it is not public.
--
___
Change by Alexander Belopolsky :
--
resolution: -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder: -> datetime.py implementation of .replace inconsistent with C
implementation
___
Python tra
Change by Alexander Mohr :
--
versions: +Python 3.6
___
Python tracker
<https://bugs.python.org/issue34745>
___
___
Python-bugs-list mailing list
Unsubscribe:
Alexander Belopolsky added the comment:
Here is an implementation that I've used for years. It is somewhat shorter than
the one in PR 11583:
class CycleError(LogicalError, ValueError):
"""dependencies cycle detected
"""
def tsort(pairs):
&quo
Alexander Belopolsky added the comment:
New changeset 89427cd0feae25bbc8693abdccfa6a8c81a2689c by Alexander Belopolsky
(Paul Ganssle) in branch 'master':
bpo-32417: Make timedelta arithmetic respect subclasses (#10902)
https://github.com/python/cpyt
Alexander Belopolsky added the comment:
New changeset 89427cd0feae25bbc8693abdccfa6a8c81a2689c by Alexander Belopolsky
(Paul Ganssle) in branch 'master':
bpo-32417: Make timedelta arithmetic respect subclasses (#10902)
https://github.com/python/cpyt
New submission from Alexander Mohr :
For valid types which encapsulate other types, like typing.List or
typing.Tuple, you can declare what's contained in them like so:
foo: typing.List[int] = []
Unfortunately weakref.ReferenceType does not allow you to do this. You get the
error:
&g
Alexander Mohr added the comment:
I'm not a typing expert, but from what I understand you could do:
class Bar: pass
foo: Callable[[], Bar] = weakref.ref(Bar())
but you lose the typing weakref.ref.
OTOH if you simply do:
foo: weakref.ref = weakref.ref(Bar())
you lose the info o
Alexander Mohr added the comment:
doing the __future__ doesn't help anything as it is an invalid type
--
___
Python tracker
<https://bugs.python.org/is
New submission from Alexander Kapshuna :
FileCookieJar and it's subclasses don't accept Paths and DirEntrys.
Minimal code to reproduce:
===
import pathlib
from http.cookiejar import FileCookieJar
saved_cookies = pathlib.Path('my_cookies.txt')
jar = FileCookieJar(saved_co
Alexander Kapshuna added the comment:
Oh sorry, I just thought that everybody has forgotten about this part of
library. Nevermind my patch then, your work is certainly better, matrixise.
--
___
Python tracker
<https://bugs.python.org/issue36
Changes by Alexander Belopolsky :
--
resolution: -> rejected
stage: patch review -> resolved
status: pending -> closed
___
Python tracker
<http://bugs.python.o
New submission from Alexander Todorov:
When using list.count() I get the following results
>>> [1, 2, 3].count(1)
1
>>> [1, 2, 3, True].count(2)
1
>>> [1, 2, 3, True].count(True)
2
>>> [1, 2, 3, True].count(1)
2
as you can
Alexander Todorov added the comment:
Hi folks,
I have another very similar issue, it could be the same root cause. Let me know
if it is.
assert 3 == 3.0 will pass
self.assertEqual(3, 3.0) - will pass
this had the nasty side effect of my test suite not catching a problem with
SUT. I have
Alexander Belopolsky added the comment:
@xiang.zhang - I am the OP for this issue, so naturally I expect this to be
fixed. I have a work-around in place for my own code, so I have no opinion on
the particular versions. I guess the normal policy on bug fixes should apply
New submission from Alexander Mohr:
When upgrading to 3.5.3 we noticed that the requests module was leaking memory
rather quickly. This led to me logging the issue:
https://github.com/kennethreitz/requests/issues/3933. After more investigation
I've found that the leak is caused by th
Alexander Mohr added the comment:
validated 3.6 in fedora is affected as well, see github bug for charts. So it
seems all 3.5.3+ versions are affected. I'm guessing it was introduced in one
of the SSL changes in 3.5.3:
https://docs.python.org/3.5/whatsnew/changelog.html#python-
Alexander Mohr added the comment:
adding valgrind log of 3.5.3 on debian: jessie
--
Added file: http://bugs.python.org/file46750/valgrind.log.gz
___
Python tracker
<http://bugs.python.org/issue29
Alexander Mohr added the comment:
interestingly the valgrind run doesn't show a leak in the profile
--
___
Python tracker
<http://bugs.python.org/is
Alexander Belopolsky added the comment:
New changeset 661ca8843fed1183e38db06e52d59ac300bf1c2a by Lev Abalkin in branch
'master':
Fixes bpo-29680: Older gdb does not have gdb.error. (#363)
https://github.com/python/cpython/commit/661ca8843fed1183e38db06e52d59a
Alexander Mohr added the comment:
ok I've updated the gist with a base class and sync + async sub-classes. The
way it worked out I think is nice because we can have the same method names
across both sync+async. Let me know what you guys think! btw, it seem
New submission from Alexander Belopolsky:
The math.exp(x) function is documented to "Return e**x"
<https://docs.python.org/3/library/math.html#math.exp>. This is misleading
because even in the simplest case, math.exp(x) is not the same as math.e ** x:
>>> import math
Alexander Belopolsky added the comment:
> This is because math.e is not the same as e.
Right. That's why I think it would be nice to distinguish math.e and the base
of the natural logarithm typographically in the docs. Can we use sphinx math
mode? If not, I would use italic
Alexander Belopolsky added the comment:
The time and math modules are probably the oldest Python modules, but math have
seen more development recently, so it should serve as a good model for how
things should be organized. Yes, I believe re-listing module functions and
constants in the
Alexander Belopolsky added the comment:
A question for Victor: Should we split the "Constants" section into "Clock ID
constants" and "Timezone constants"? (See PR 928.)
--
___
Python tracker
<
Alexander Belopolsky added the comment:
Cheryl,
There is no need to apologize. I assigned this issue to myself when I created
it because I had a few ideas about refactoring the time module documentation
and thought I would get to it soon. As often happens other priorities
interfered
Alexander Belopolsky added the comment:
> The datetime module ..
Yes, the datetime module documentation can be improved, but let's keep this
issue focused on the time module. Please open a new issue for the datetime
module impr
Changes by Alexander Belopolsky :
--
keywords: -3.2regression
___
Python tracker
<http://bugs.python.org/issue28157>
___
___
Python-bugs-list mailing list
Unsub
Alexander Mohr added the comment:
@pitrou: sys.getallocatedblocks does not seem to increase
--
___
Python tracker
<http://bugs.python.org/issue29870>
___
___
Pytho
Alexander Mohr added the comment:
yes, in the gist I created you can switch between the various clients, by
default right now it uses raw sockets.
--
___
Python tracker
<http://bugs.python.org/issue29
Alexander Mohr added the comment:
the interesting part is it doesn't leak with a local https server, it appears
to need to be a remove server.
--
___
Python tracker
<http://bugs.python.org/is
Alexander Mohr added the comment:
ya, my sample script hits google.com <http://google.com/>, it's pretty fast.
It just does a "HEAD".
> On Apr 11, 2017, at 9:14 AM, Antoine Pitrou wrote:
>
>
> Antoine Pitrou added the comment:
>
> Is there a fast e
Alexander Mohr added the comment:
see graphs here: https://github.com/kennethreitz/requests/issues/3933, x-axis
is number of requests not what it says (seconds).
--
___
Python tracker
<http://bugs.python.org/issue29
Alexander Mohr added the comment:
awesome! Thanks for finding a proposing fix pitrou! btw I found an example of
freeing this structure here:
http://www.zedwood.com/article/c-openssl-parse-x509-certificate-pem
--
___
Python tracker
<h
New submission from Alexander Gosselin:
array.array has all of the methods required by collections.MutableSequence, but:
>>> import array
>>> import collections
>>> isinstance(array.array, collections.MutableSequence)
False
------
messages: 292053
nosy: Alexande
Alexander Gosselin added the comment:
Thanks for taking a look at this. I think array is little used, so registering
it as a member of some of the abstract base classes in collections could easily
have been overlooked.
One of the prerequisites for membership in MutableSequence is a .clear
Changes by Alexander Belopolsky :
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Alexander Belopolsky added the comment:
The current behavior is intentional. Please see PEP 495 for details.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Geoff Alexander added the comment:
I've recently hit this problem (or one that has the same symptoms):
```
Traceback (most recent call last):
File "migration.py", line 169, in
migrate()
File "migration.py", line 80, in migrate
rtc.a
Geoff Alexander added the comment:
Here's the trace back I get from Python 3.7.2:
Traceback (most recent call last):
File "migration.py", line 169, in
migrate()
File "migration.py", line 80, in migrate
rtc.acceptchangesintoworkspace(rtc.getchangeentr
New submission from Alexander Lopatin :
I see this problem only on my iMac (macOS Mojave, Version 10.14.3). My Windows
and Linux (CentOS) computers have no such problem.
I asked the question on Stack Overflow today, investigated, and reported here:
https://stackoverflow.com/questions
New submission from Geoff Alexander :
I've found that subprocess.check_output() fails on Windows with OSError:
[WinError 87] when the current directory's name is too long:
```
Traceback (most recent call last):
File "migration.py", line 169, in
migrate()
File &qu
Geoff Alexander added the comment:
The [WinError 87] does seems to be caused by the current directory's name being
too long. The value of len(os.getcwd())is 260 when the exception occurs. The
failing call was subprocess.check_output("git ls-files", shell=True). I've
New submission from Geoff Alexander :
I have the following code:
```
def handle_empty_directories(dir):
if os.path.exists(dir):
shouter.shout("%s exists" % dir)
else:
shouter.shout("%s doesn't exists" % dir)
Geoff Alexander added the comment:
Using the "\\?\" prefix does not work. Here's a small example:
```
import os
import subprocess
os.chdir(r"\\?\C:\Users")
output = subprocess.check_output("dir", shell=True)
```
Using Python 3.7.2 64-bit on
Change by Geoff Alexander :
--
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue36243>
___
___
Python-bugs-list mailing list
Unsubscrib
Geoff Alexander added the comment:
This problem does not appear to be a race condition ("Time Of Check To Time Of
Use" bug) in my case as the directory in question exists both before and after
the os.listdir call.
I got a workaround saying to wrap the os.listdir call in try/ex
Change by Geoff Alexander :
--
status: open -> pending
___
Python tracker
<https://bugs.python.org/issue36243>
___
___
Python-bugs-list mailing list
Unsubscrib
Alexander Belopolsky added the comment:
How about replacing "formerly known as Greenwich Mean Time, or GMT" with "which
superseded Greenwich Mean Time or GMT as the basis of international
timekeeping"?
I don't think Python reference manual is the right place t
Alexander Mohr added the comment:
going to close, I've verified that it fixes my original issue, ty!!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.pyth
Alexander Mohr added the comment:
I hit this as well in debian:jessie, and if I enabled -std=c99 I hit this
issue: https://github.com/dvarrazzo/py-setproctitle/issues/62
--
nosy: +thehesiod
___
Python tracker
<https://bugs.python.org/issue36
Alexander Riccio added the comment:
I decided to come back to this after a python meetup last night. By messing
with this a bit, building in VS2019 with /W4, I see that fully 2/3rds of the
total warnings are from two specific warnings:
C4100 (unreferenced formal parameter)
C4127
Alexander Riccio added the comment:
One more thing, after I ran code analysis:
This is obviously a potential memory leak:
Warning C6308 'realloc' might return null pointer: assigning null pointer to
'arr->items', which is passed as an argument to 'realloc'
1801 - 1900 of 4095 matches
Mail list logo