Change by s-ball :
--
pull_requests: +10113
stage: test needed -> patch review
___
Python tracker
<https://bugs.python.org/issue9741>
___
___
Python-bugs-lis
Change by s-ball :
--
keywords: +patch
pull_requests: +10112
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35335>
___
___
Python-
s-ball added the comment:
Currently my main use case is to be able to compile one or more po file(s) from
a Python script, so I just need to be able to repeatedly call make from that
script - which was broken per issue 9741
To be honest, I must acknowledge that I initially thought that
New submission from s-ball :
When working on i18n, I realized that msgfmt.py did not generate any hash
table. One step further, I realized that the gettext.py would not have used it
because it unconditionnaly loads the whole translation files and contains the
following TODO message:
TODO
New submission from Petter S :
The ``ANY`` object in ``unittest.mock`` is also pretty useful when verifying
dicts in tests:
self.assertEqual(result, {
"message": "Hi!",
"code": 0,
"id": mock.ANY
})
Then it does
Petter S added the comment:
Yes, something like this:
class APPROXIMATE:
"""Takes a floating point number and implements approximate equality."""
def __init__(self, value):
self.value = value
def __eq__(self, other):
Petter S added the comment:
Agreed! The code above was a quick example. There are also functions in the
standard library for approximate float matching that the "real" code would use.
--
___
Python tracker
<https://bugs.python.o
Petter S added the comment:
I am of the opposite opinion. :-)
> if I know roughly what the float should be why would I not want to test it
> for exactness?
When testing algorithms, it is often the case that the answer should be
mathematically exactly 2, but due to floating
New submission from sam-s:
`resource.getrusage(resource.RUSAGE_SELF).ru_maxrss` returns the peak memory
usage, in *bytes* on BSD (including Mac OS X) and in *kilobytes* on Linux.
This means that to get a cross-platform value, the user has to check
`sys.platform`, which is fairly inconvenient
sam-s added the comment:
Experiment shows that the Linux multiplier is 1024 (not 1000).
--
___
Python tracker
<http://bugs.python.org/issue30513>
___
___
Pytho
New submission from sam-s:
I get this `unittest` failure:
```
Traceback (most recent call last):
File "zzz.py", line 348, in test_opposite
self.assertAlmostEqual(a, b, places=2)
AssertionError: 1.1036640046288428 != 1.0986122886681098 within 2 places
```
This seems
sam-s added the comment:
you are right, sorry.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<http://bugs.python.or
Petter S added the comment:
The pull request solves this problem, but the discussion over there is really
slow.
--
___
Python tracker
<https://bugs.python.org/issue27
Change by Petter S :
--
keywords: +patch
pull_requests: +5770
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32992>
___
___
Python-
Petter S added the comment:
It's good to see others with the same idea as me. I just wrote
https://github.com/python/cpython/pull/6005/commits/4d7e1837f235687c875e985e97701609fc1ac458
.
In my opinion, there is no need for another test class. I completely agree with
Zachary Ware tha
Petter S added the comment:
> Also, I personally subclassed TestCase in many of my projects specifically to
> add async support. To do that you have to use a metaclass to scan class'
> namespace for 'async def' functions.
Doesn't that break when, for example, te
Petter S added the comment:
> No, it shouldn't break them if you wrap async methods carefully.
> Here's a metaclass that I wrote recently doing just that
That code does not seem to work for me:
https://gist.github.com/PetterS/f684095a09fd1d8164a4d8b28ce3932d
I get "Runt
Petter S added the comment:
> 1. Do we need support for async versions of setUp, setUpClass, etc? In my
> opinion: yes.
I completely agree. I would imagine many or most real-world tests requiring
async setUp. There is also the question on how a custom loop etc. can be used
in the uni
Change by Petter S :
--
keywords: +patch
pull_requests: +5812
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue32972>
___
___
Python-
Petter S added the comment:
John: inspect.iscoroutinefunction(meth) does not work if the method is
decorated with e.g. unittest.mock.patch.
--
___
Python tracker
<https://bugs.python.org/issue32
Petter S added the comment:
Personally, I think John's PR is fine. (but the test class could arguably live
in asyncio) I like that setUp, tearDown and test methods all can be async.
But if setUp and tearDown should never be async as Yury commented above, they
don't need runners. Th
New submission from brent s. :
Currently, a parsed urlparse() object looks (roughly) like this:
urlparse('http://example.com/foo;key1=value1?key2=value2#key3=value3#key4=value4')
returns:
ParseResult(scheme='http', netloc='example.com', path='/foo',
New submission from Mickaël S. :
As stated by https://bugs.python.org/issue24960, the bug should be fixed in
3.6.5 (if it is the same, not sure).
Simple reproduction steps are:
1) Download and unzip python-3.6.5-embed-win32.zip.
2) Install pip (OK):
C:\Users\TestW764\python-3.6.5-embed-win32
Mickaël S. added the comment:
In my case, on the computer doing releases, I cannot use the full Python
installer (even with a minimal unattend.xml file) because any software
installation is prohibited. This is an issue in my side but it is for the
context.
I was expecting to be able to
Petter S added the comment:
For Python 3:
$ python3 --version
Python 3.7.0b3
$ python3
Fatal Python error: _Py_InitializeMainInterpreter: can't initialize time
OverflowError: timestamp too large to convert to C _PyTime_t
Current thread 0x7f0232c21080 (most recent call first):
Ab
Petter S added the comment:
I get this error when starting the interpreter in Windows subsystem for Linux
(WSL).
I am using Python 2.7.15rc1
$ python --version
Python 2.7.15rc1
$ python
Fatal Python error: _Py_InitializeMainInterpreter: can't initialize
Petter S added the comment:
I also compiled Python myself on WSL.
The bug seemed to appear after computer had been running for a while. Before
that, the interpreters were working normally. And after rebooting the problem
disappeared
Petter S added the comment:
Makes sense. I fail to reproduce it myself. :-(
--
___
Python tracker
<https://bugs.python.org/issue33965>
___
___
Python-bugs-list m
Mickaël S. added the comment:
Little word to say I am working on at EuroPython 2018.
--
nosy: +Tiger-222
___
Python tracker
<https://bugs.python.org/issue34
Change by Mickaël S. :
--
keywords: +patch
pull_requests: +8045
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issue34035>
___
_
Change by Mickaël S. :
--
title: zipfile: AttributeError in "seek" method of "_SharedFile" class ->
Several AttributeError in zipfile seek() methods
___
Python tracker
<https://
Change by Mickaël S. :
--
keywords: +patch
pull_requests: +8069
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue26440>
___
___
Python-
Petter S added the comment:
I am updating this bug since someone may find it.
The problem lies with WSL. After having my computer running for many days, this
is the result of the uptime command:
$ uptime
11:23:19 up -24855 days, -3:-14, 0 users, load average: 0.52, 0.58, 0.59
Restarting
New submission from Petter S :
The server in the wsgiref module is actually used a lot. For example, it is the
server Django uses for development.
A very common thing that happens during Django development is that the web
browser closes the connection for some reason. Then very long stack
Change by Petter S :
--
type: -> enhancement
___
Python tracker
<https://bugs.python.org/issue34547>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Amos S :
When doing "sudo python-script.py", the output of "getpass.getuser()" is pretty
much useless for what it's used (I assume mainly logging and tracking purposes,
that's what we use it for ourselves).
I worked around this limitation b
Change by Amos S :
--
keywords: +patch
pull_requests: +8903
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34709>
___
___
Python-
Amos S added the comment:
The use of environment variables like USER and LOGNAME instead of getuid() etc
is done in order to try to get "who really initiated this process?" rather than
"who this process belongs to?". This is hidden today when SUDO_USER is ignored
Change by Petter S :
--
keywords: +patch
pull_requests: +9096
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34547>
___
___
Python-
Petter S added the comment:
The Github pull request https://github.com/python/cpython/pull/9713 addresses
this.
--
nosy: +Petter S
___
Python tracker
<https://bugs.python.org/issue27
New submission from Petter S :
When developing unit tests with `unittest.mock`, it is common to see error
messages like this:
AssertionError: Expected 'info' to not have been called. Called 3 times.
It would be really helpful if those 3 calls were listed in the assertion er
Petter S added the comment:
Sure, consider the following code:
from unittest import mock
m = mock.Mock()
m(1, 3)
m("Test", data=[42])
When I call
m.assert_not_called()
I get the following error message:
AssertionError: Expected 'mock' to not have been called. Call
Petter S added the comment:
(The example above should have been "m.assert_has_calls([mock.call(3)])" but it
does not affect my point.)
--
___
Python tracker
<https://bugs.python.o
Change by Petter S :
--
pull_requests: +9419
___
Python tracker
<https://bugs.python.org/issue34547>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Petter S :
--
keywords: +patch
pull_requests: +9420
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35047>
___
___
Python-
Change by Petter S :
--
pull_requests: -9419
___
Python tracker
<https://bugs.python.org/issue34547>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Petter S :
--
pull_requests: +9437, 9438
___
Python tracker
<https://bugs.python.org/issue34547>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Petter S :
--
pull_requests: +9437
___
Python tracker
<https://bugs.python.org/issue34547>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Petter S :
--
pull_requests: -9437
___
Python tracker
<https://bugs.python.org/issue34547>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Petter S :
--
pull_requests: -9438
___
Python tracker
<https://bugs.python.org/issue34547>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Petter S :
--
pull_requests: +9475
___
Python tracker
<https://bugs.python.org/issue34547>
___
___
Python-bugs-list mailing list
Unsubscribe:
Petter S added the comment:
As far as I am concerned, the discussion can continue in this issue.
I still think a reasonable first step is to add a run hook to the regular
TestCase class, like in PR 6051. But building consensus is a bit tricky
Change by Petter S :
--
keywords: +patch
pull_requests: +9624
stage: test needed -> patch review
___
Python tracker
<https://bugs.python.org/issue27682>
___
_
Petter S added the comment:
> I think this is what Petter is trying to do in
> <https://github.com/python/cpython/pull/9713>.
That's right.
--
___
Python tracker
<https://bugs.p
Brigitta S added the comment:
I would like to reference the list methods in a documentation using
intersphinx-ing e.g ":meth:`list.append`" etc. However there are no links
generated for these.
I may underestimate issues raised in this thread, but it naively seems that
removing th
Changes by Bartosz S :
--
nosy: +toszter
___
Python tracker
<http://bugs.python.org/issue14037>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from S Arrowsmith:
Compare this with the script in #14252:
p = Popen(['/bin/sleep', '1'])
time.sleep(1)
p.terminate()
print p.poll()
p.terminate()
Output is:
0
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/pyth
Changes by S Arrowsmith :
--
nosy: +siona
___
Python tracker
<http://bugs.python.org/issue6925>
___
___
Python-bugs-list mailing list
Unsubscribe:
S Arrowsmith added the comment:
Sorry, still there:
Python 2.7rc2 (r27rc2:82137, Jun 26 2010, 11:27:59)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mimetypes
>>> mimetyp
S Arrowsmith added the comment:
>>> import mimetypes
>>> mimetypes.guess_extension('image/jpeg')
/etc/mime.types
'.jpe'
>>> mimetypes.init()
/etc/mime.types
>>> mimetypes.guess_extension('imag
S Arrowsmith added the comment:
I've dug into it -- again -- and my original analysis still holds. Getting
consistent guess_extension() results across an explicit init() call depends on
dict.items() returning keys in the same order on two different dictionaries
(the original, hard-
S Arrowsmith added the comment:
That solution looks sound to me, in particular documenting the semantics of
repeated init() calls!
As for the underlying problem, it seems to me that an alternative to copying
the existing structures rather than rebuilding them would be to use
OrderedDicts
New submission from Vitold S:
I have MIME message and parse content. Later I walk on message headers by call
for and receive follow traceback:
Traceback (most recent call last):
...
for m in msg: (msg is email.message.Message instance)
File "C:\Python27\lib\email\message.py"
S Safihre added the comment:
>From the changelog I interpreted this to mean that Python would now use
>OpenSSL 1.0.2j on macOS for it's ssl module.
But this is not the case?
On a fresh macOS Sierra VM I get:
Python 2.7.13rc1 (v2.7.13rc1:4d6fd49eeb14, Dec 3 2016, 13:01:23)
[GCC 4
New submission from d s:
Searching for this issue turned up a bunch of results claiming it's fixed, but
it isn't, at least not on my windows 10 machine. I tried replacing 'hit' with
'itdunwork' in colorizer.py, searchbase.py, replace.py, searchengine.py,
config.
Johannes S. added the comment:
Maybe my last comment was not clear enogth. I used the tarballs from 3.5 and
3.6 which are linked in my last comment. I extracted them and run the the
following commands on Arch (64 Bit) and Linux SuSE 13.1 (64 Bit):
mkdir build
cd build
../configure
Maxime S added the comment:
I've signed the CLA.
--
___
Python tracker
<http://bugs.python.org/issue27546>
___
___
Python-bugs-list mailing list
Unsubscr
j s added the comment:
I had this issue too, I realised that I had installed the 32bit version on a
machine running 64bit. So I uninstalled and installed the 64bit and it's fine
now.
--
nosy: +evilpandas
___
Python tracker
<http://bugs.py
New submission from John S:
I created a simple CGI script that outputs the query string passed to it:
```
#!/usr/bin/env python
import os
print 'Content-Type: text/html\n\n'
print os.environ['QUERY_STRING']
```
I saved it as cgi-bin/test.cgi and made it executable. I
John S added the comment:
Image you had the following URL.
http://localhost:8000/cgi-bin/test.cgi?q=Dolce%26Gabbana&p=1
os.environ['QUERY_STRING'] would hold the value
q=Dolce&Gabbana&p=1
If you ran the following code, you would be unable to get the value of th
New submission from Eric S:
Documentation states:
Element.findall() finds only elements with a tag which are direct children of
the current element.
More accurate to say "direct descendents" as "direct children" implies only one
generation below whereas function goes down
Eric S added the comment:
Pointing to XPath and clarifying the example reference are good ideas.
For me though, the phrase "direct children" would still lead me to believe that
findall() would only give me the first generation right below the element (e.g.
only the countries in t
Eric S added the comment:
To my preference, the drop-in is verbose and I got a little confused on first
read. The current documentation and example seem mostly OK to me.
If we leave "children" as in "all children of *root*", it doesn't
illuminate the fact that
Eric S added the comment:
Code was intended as example, not request for help to correct, but rushed so
example was flawed, but still, I tested and you both are right. Must've had
other error in code to cause the xml to dict to have every element map to under
every node. Debugger also s
New submission from s-wakaba:
I've found some parts there are illegal message formatting in int object unit
test script "Lib/test/test_long.py" when hacking the interpreter.
because they were an easy problem, I already fixed them to promote my work.
Therefore, the patch ha
New submission from s-wakaba:
When compiling cpython with specifying NSMALLPOSINTS and NSMALLNEGINTS macros
as zero to skip making small_ints[] array, like following command, process
couldn't finish.
$ ./configure CPPFLAGS='-DNSMALLPOSINTS=0 -DNSMALLNEGINTS=0'
$ make
The
New submission from s-wakaba:
When writing bash shellscripts, I always set options "set -ueC" for strict
error checking. However, loading pyvenv's activate and deactivate scripts from
bash with "-u" option, they are failure because they may refer undefined shell
va
New submission from Ismail s:
The table of browser types in
https://docs.python.org/2.7/library/webbrowser.html?highlight=webbrowser#webbrowser.register
does not say that Google Chrome/Chromium is available on python2.7, even
though it is (https://hg.python.org/cpython/file/2.7/Lib
New submission from Ismail s:
'incrementall' has been changed to 'incrementally' (and text reflowed).
'keywword' has been changed to 'keyword'.
--
assignee: docs@python
components: Documentation
files: work.patch
keywords: patch
messages: 260
Johannes S. added the comment:
I tried it again and I also tried 3.6.0a1 now. 3.6.0a1 has the issue as well. I
have downloaded the tarballs from
https://www.python.org/downloads/release/python-351/ and
https://www.python.org/downloads/release/python-360a1/.
I have run it on my Laptop (Arch
New submission from Maxime S:
Observed Behavior:
$python3
Python 3.5.0a1+ (default, Mar 2 2015, 14:30:05)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> f = open("test", "w+"
Johannes S. added the comment:
Sorry that I haven't answered for a long time. I would like to get an email
notification but I don't know whether/how I can enable it.
On "my instance of Linux SuSE", the lines are locking like this:
CONFIG_ARGS=' '\
New submission from Matthieu S:
Python build fails on AIX when using the _LINUX_SOURCE_COMPAT flag.
When using this flag, the gethostbyname_r subroutine has 6 parameters instead
of 3, like on Linux, but Modules/socketmodule.c always expects a
gethostbyname_r subroutine with only 3 parameters
New submission from Matthieu S:
==
FAIL: testAbles (test.test_fileio.COtherFileTests)
--
Traceback (most recent call last):
File
"/opt/freeware/src/pac
Matthieu S added the comment:
Sorry for the very late reply...
Using _LINUX_SOURCE_COMPAT is sometimes preferable, as it greatly improves
compatibility with code intended for Linux and improves XPG specs compliance.
But I am not sure it should always be enabled.
In our case, we use it as
Matthieu S added the comment:
Sorry for the late reply.
I did some additional testing, and I can confirm that this assertion should
also be skipped in Python 2.7 on AIX.
And the test does not fail when run without a tty, so we can assume that this
is what happens on the builbots
Changes by Matthieu S :
--
versions: +Python 3.7
___
Python tracker
<http://bugs.python.org/issue28000>
___
___
Python-bugs-list mailing list
Unsubscribe:
Matthieu S added the comment:
Thanks !
--
resolution: fixed ->
status: closed -> open
versions: -Python 3.7
___
Python tracker
<http://bugs.python.org/i
Changes by Matthieu S :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue28000>
___
___
Python-bugs-list
New submission from Venkata Raman S S V :
In Ubuntu 20.04.3 LTS - OS Type: 64-bit.
$ cal sep 1752
September 1752
Su Mo Tu We Th Fr Sa
1 2 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
$ python3
Python 3.8.10 (default, Sep 28
John S. Gruber added the comment:
The patch worked--it eliminated the redundant copy caused by this issue.
Thank you very much, Éric.
On Fri, Jun 3, 2011 at 12:39 PM, Éric Araujo wrote:
>
> Éric Araujo added the comment:
>
> Can you tes
New submission from Christian S. Perone :
Pydoc is failing when running the ModuleScanner().run() when you execute:
help("modules keyword")
... if some module throws an exception at the import time.
See this example:
>>> help("modules convolve")
Here is a list of
New submission from John S. Gruber :
In researching a bug I was surprised that a newly created file was being
replaced when being processed a second time (it shouldn't have been processed a
second time).
I tracked the surprise to diff Lib/distutils/dep_util.py @ 57642:9211a5d7d0b4
wh
John S. Gruber added the comment:
Thanks for considering my report so quickly. Attached is a simple test to
reproduce the bug, as you suggested.
Please note that I am not suggesting the code base use stat.st_mtime.
Running the attached with ext4, which keeps sub-second file timestamps
John S. Gruber added the comment:
The original bug report is at:
https://bugs.launchpad.net/ubuntu/+source/python-distutils-extra/+bug/770566
As you can see it had to do with a symbolic link created by distutils-extra
before distutils was called upon to copy anything. Since this was done
John S. Gruber added the comment:
I can understand what you are saying about side effects.
I was trying to suggest that the move to stat.st_mtime in dep_util.py in the hg
commit I mentioned be reverted back to use stat[ST_MTIME], thereby matching the
other python releases and the old
John S. Gruber added the comment:
As I thought about it, I suppose I should demonstrate the problem with
stat.st_mtime. Here's an example and its output on an ext4 file system:
gruber@gruber-Satellite-L355D:~$ ./mtime.py
(1303933305.5525582, 1303933305.5525582) (1303933305.5
New submission from John S. Gruber :
This report is meant to prompt discussion, if desired, on the advisability of
distinguishing new files from old using subsecond data. (It isn't clear to me
that it is important to do this.)
Some file systems keep sub-second modification times, bu
John S. Gruber added the comment:
Thanks for writing so quickly.
This topic arose as part of issue 11933 (similar number). Éric Araujo asked
that I bring this up in either mail to the fellowship of the packaging or as a
separate bug report, so I chose to file this. Please see msg 134634
John S. Gruber added the comment:
As Éric suggested I opened issue 11993 a couple of days ago.
--
___
Python tracker
<http://bugs.python.org/issue11933>
___
___
101 - 200 of 290 matches
Mail list logo