UTF-8 mode.
Please address UTF-8 mode explicitly in open() or elsewhere. The locale
module is about the state of the lib C, not what Python enforces via
options in its own I/O layers.
As mentioned, both should ideally be synchronized, though, so
UTF-8 mode in Python should trigger setting a UTF-8 enc
gs :-) So this is unnecessary as well.
>
> The problem is that there are two different "locale encodings", what I call:
>
> * "current locale encoding": nl_langinfo(CODESET) in short
> * "Python locale encoding": "UTF-8" in some cases, nl_langi
dows
or gives wrong results. Is that incorrect ?
If it does work, getencoding() could just be a shim over
nl_langinfo(CODESET) on all platforms.
--
Marc-Andre Lemburg
eGenix.com
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
ogic and not add encoding details which are
specific to Python's view on I/O (sys or io) or the file system (os).
Hopefully, in a few years, we can get rid of all this and standardize
on UTF-8 everywhere.
--
Marc-Andre Lemburg
eGenix.com
___
On 19.03.2021 12:05, STINNER Victor wrote:
> I'm not sure what to do with locale.getdefaultlocale(). Should we deprecate
> it? I never used this function. How is it used? For which purpose?
>
> I undertand that in 2000, locale.getdefaultlocale() was interesting to avoid
> calling setlocale(LC_CTY
eeds to return what the lib C currently
>> knows and uses as encoding.
>
> This is locale.get_current_locale_encoding(). I would like to put "current"
> in the name, because there is a lot of confusion between
> get_current_locale_encoding() encoding and locale.getp
cale settings.
I had added locale.getdefaultlocale() to give applications a chance
to determine the locale setting defined by the process environment
*without* calling setlocale(LC_ALL, '') and causing problems
in other threads. I used the X11 database for locale encodings,
which was the cl
On 17.02.2021 15:02, Anders Munch wrote:
>> BTW: What is wxWidgets doing with the returned values ?
>
> wxWidgets doesn't call getlocale, it's a C++ library (wrapped by wxPython)
> that uses C setlocale.
>
> What does use getlocale is time.strptime and datetim
On 17.02.2021 10:55, Anders Munch wrote:
import locale
locale.setlocale(locale.LC_ALL, 'en_DE')
> 'en_DE'
locale.getlocale()
> Traceback (most recent call last):
> File "", line 1, in
> File "C:\flonidan\env\Python38-64\lib\locale.py", line 591, in getlocale
> return _parse_
On 20.01.2021 12:07, STINNER Victor wrote:
> Maybe we should even go further in Python 3.10 and only split at "&" by
> default, but let the caller to opt-in for ";" separator as well.
+1.
Personally, I've never seen URLs encoded with ";" as query parameter
separator in practice on the server sid
Barry A. Warsaw added the comment:
Thanks for the report and fix!
--
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.org/i
Change by Barry A. Warsaw :
--
nosy: +barry, jaraco
___
Python tracker
<https://bugs.python.org/issue42728>
___
___
Python-bugs-list mailing list
Unsubscribe:
Christopher A. Chavez added the comment:
This was already reported to Tcl/Tk:
https://core.tcl-lang.org/tk/info/855049e799 . They determined it was caused by
a bug in macOS 10.15.1. There are workarounds implemented for this in Tcl/Tk
8.6.10 and the upcoming 8.6.11 releases
Barry A. Warsaw added the comment:
This issue was brought to the Python Steering Council, and we deliberated it at
today's SC meeting. With a vote of 4 approvals and one abstention, we have
approved the addition of this API.
--
nosy: +
On 25.11.2020 11:13, STINNER Victor wrote:
> Platform was always a thin wrapper to OS functions. For example, there is no
> unified API to retrieve OS name and version on Windows, macOS or Linux. You
> need to pick the proper function. For me, freedesktop_os_release() just
> follow
Change by Barry A. Warsaw :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: -Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.or
Change by Barry A. Warsaw :
--
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue42155>
___
___
Python-bugs-list
Barry A. Warsaw added the comment:
Hi Serhiy. I believe this is a duplicate of bpo-30681 which is active and has
a good PR IMHO. The only hold up is whether to backport that PR to 3.9 and
3.8. See the bug and PR for details.
--
resolution: -> duplicate
superse
Barry A. Warsaw added the comment:
Aside: I noticed that on _parseaddr.py:68, there's a bare `return`. That
should really be `return None` (EIBTI). Can you fix that in your PR?
I think it's confusing to raise both TypeError and ValueError. I suggest we
check the `None` r
Change by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<https://bugs.python.org/issue42129>
___
___
Python-bugs-list mailing list
Unsubscribe:
Barry A. Warsaw added the comment:
Thanks for the PR @ZackerySpytz - this has landed in git head and is currently
being backported to 3.9 and 3.8 (3.7 is in security-fix only mode).
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: -P
Change by Barry A. Warsaw :
--
versions: +Python 3.10
___
Python tracker
<https://bugs.python.org/issue38486>
___
___
Python-bugs-list mailing list
Unsubscribe:
Barry A. Warsaw added the comment:
@sim0n - I added a comment to your open PR.
My main question for the rest of the group is whether we can and should
backport this. Given the new defect class being introduced, it seems like this
should only land in 3.10. Thoughts
Barry A. Warsaw added the comment:
Actually, it looks to me like the PR *does* include unittests, and I see them
in the repo, so I'm closing this bug.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
Change by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<https://bugs.python.org/issue42115>
___
___
Python-bugs-list mailing list
Unsubscribe:
Barry A. Warsaw added the comment:
@maggyero - I haven't merged PR 10016, but I left some additional comments.
Are you still interested in shepherding this PR?
--
___
Python tracker
<https://bugs.python.org/is
Barry A. Warsaw added the comment:
Apologies for the long delay in reviewing this bug. I'm looking at it now,
however since Python 3.7 is in security-only mode, this will only apply to
3.10, 3.9, and 3.8.
--
versions: +Python 3.10, Python 3.9 -Pytho
Barry A. Warsaw added the comment:
Actually, I think I am going to close this as won't fix, for two reasons.
First, this only potentially affects the legacy API, and second, in Python 3,
the error you get when you do it like the original repro example seems obvious
to me.
```
&
Barry A. Warsaw added the comment:
The other question is what to do about `EmailMessage` objects, which don't have
a `set_charset()` method. For now, I'll ignore that.
--
___
Python tracker
<https://bugs.python.
Barry A. Warsaw added the comment:
I am seeing this in Brave (a Chrome derivative). Many examples in
https://docs.python.org/3/library/email.html
See the words "in\nterface" and "ob\nject' in the attached screenshot.
--
nosy: +barry
Added file: https://bugs.
Change by Barry A. Warsaw :
--
assignee: -> barry
___
Python tracker
<https://bugs.python.org/issue1823>
___
___
Python-bugs-list mailing list
Unsubscrib
Barry A. Warsaw added the comment:
Updating the Python versions to the only active ones on which this bug could
conceivably be fixed. I haven't validated that it's still a problem, and I
haven't decided whether it's appropriate to backport to 3.9 and 3.8.
I'll wo
Barry A. Warsaw added the comment:
Thanks for the PR @iritkatriel but I'm inclined to close this as won't fix.
There are plenty of other changes someone would need to migrate to Python 3 for
the email package, so I think this is of limited benefit.
--
resolution: -> w
Change by Barry A. Warsaw :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.9 -Python 3.7
___
Python tracker
<https://bugs.python.or
Barry A. Warsaw added the comment:
Thank you all for the fix. Closing.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Barry A. Warsaw added the comment:
Thanks everyone for the fixes; I think this bug is now resolved. Closing.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Barry A. Warsaw added the comment:
My understanding is that this is specifically a problem with the Objective-C
runtime that _scproxy.c accesses. The runtime is not thread safe and whereas
in earlier versions of macOS, it silently failed, now macOS is explicitly
aborting the process
New submission from Barry A. Warsaw :
This is very likely caused by something janky my ISP (AT&T) is doing with IPv6,
but the above named test fails for me because IPv6 addresses like `::1q` do not
fail to resolve as the test expects.
I'm not sure what can or should be done about i
Change by Barry A. Warsaw :
--
keywords: +patch
nosy: +barry
nosy_count: 1.0 -> 2.0
pull_requests: +21740
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22775
___
Python tracker
<https://bugs.python.org/i
Change by Barry A. Warsaw :
--
versions: +Python 3.10
___
Python tracker
<https://bugs.python.org/issue37741>
___
___
Python-bugs-list mailing list
Unsubscribe:
Barry A. Warsaw added the comment:
I agree that we should close this issue, possibly with a documentation fix. I
wrote a blog posting about my investigations:
https://wefearchange.org/2018/11/forkmacos.rst.html
I don't think there's really much Python itself can do, and devel
Just found an internal API which already takes care of
unregistering a search function: _PyCodec_Forget().
All that needs to be done is to expose this as codecs.unregister()
and add the clearing of the lookup cache.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from
On 23.09.2020 14:56, STINNER Victor wrote:
> Marc-Andre Lemburg explained:
>
> "There is no API to unregister a codec search function, since deregistration
> would break the codec cache used by the registry to speedup codec
> lookup."
>
> One simple solut
D. A. Pellegrino added the comment:
Leveraging GNU Parallel (https://www.gnu.org/software/parallel/) might help
simplify implementation. Perhaps that could be used as a subprocess call?
--
___
Python tracker
<https://bugs.python.org/issue37
New submission from D. A. Pellegrino :
The activate scripts created by the venv module do not pass checks by
ShellCheck (https://www.shellcheck.net/). ShellCheck generally has a point for
each warning and note generated against the venv activate scripts. Addressing
the ShellCheck reports
Howard A. Landman added the comment:
As far as we can tell, this is a known Py_DECREF problem with spidev==3.4.
Testing on spidev==3.5 has not triggered the bug so far, so it appears to be
already fixed.
Under 3.4, changing the list to a tuple did not affect the behavior
Howard A. Landman added the comment:
OK, this has been filed against the spidev library:
https://github.com/doceme/py-spidev/issues/107
Do you want it closed, or left open until that gets resolved?
--
resolution: -> third party
___
Python trac
Howard A. Landman added the comment:
It appears to be in the spidev library xfer method, when used for reading.
Calling that 107.4M times (using the same code as inside my read_regs24()
method) causes the free() error.
Breakpoint 1, malloc_printerr (str=0x76e028f8 "free(): invalid po
Howard A. Landman added the comment:
Getting closer to isolating this. A small program that does nothing but call
read_regs24() over and over dies with the same error after about 107.4M
iterations. So it seems to be definitely in that method. But that only takes a
few hours, not half a day
Howard A. Landman added the comment:
Made some progress. By running it under gdb and breaking in malloc_printerr(),
I got a better stack trace:
Breakpoint 1, malloc_printerr (str=0x76e028f8 "free(): invalid pointer")
at malloc.c:5341
5341malloc.c: No such file or directory
Howard A. Landman added the comment:
I'm running under 32-bit Raspbian, so let's assume the magic number is 13.
There are only two places in my own code where the number 13 appears:
(1) My result_list is 14 items long, i.e. 0 to 13. Relevant code from qtd.py:
cum_results = [0, 0,
Howard A. Landman added the comment:
After a quick glance at the source code for the spidev library, I think it is
unlikely but not impossible to be the home for the bug. It does do malloc() and
free(), but only for data that is greater than 256 bytes. Short tx and rx data
is kept in static
Howard A. Landman added the comment:
I don't think changing the documentation makes this not be a bug. My situation:
I have a Python 3.7.3 program that reliably dies (after about 13 hours, having
called its measure() method between 118.6M and 118.7M times) with free():
invalid po
Howard A. Landman added the comment:
This is not a memory leak problem. "Top" reports VIRT 21768 RES 13516 for the
whole run, and Python internal resource reporting says 13564 kb for the whole
run. So that's less than 1 kb leaked in 118.6M measurement cycles; mo
Change by Howard A. Landman :
--
hgrepos: -389
___
Python tracker
<https://bugs.python.org/issue41335>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Howard A. Landman :
I have a program qtd.py that reliably dies with free(): invalid pointer after
about 13 hours of runtime (on a RPi3B+). This is hard to debug because (1)
try:except: will not catch SIGABRT
(2) signal.signal(signal.SIGABRT, sigabrt_handler) also fails to
Change by Felipe A. Hernandez :
--
components: +Library (Lib)
type: -> behavior
versions: +Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.org/issu
Felipe A. Hernandez added the comment:
import traceback
import multiprocessing.managers
class MyManager(multiprocessing.managers.SyncManager):
pass
class DictList(multiprocessing.managers.BaseProxy):
_method_to_typeid_ = {'__getitem__': 'dict'}
def _
Barry A. Warsaw added the comment:
Thanks for keeping the first 'F' in FLUFL! :D
--
___
Python tracker
<https://bugs.python.org/issue41251>
___
___
Change by Gustavo J. A. M. Carneiro :
--
nosy: +gustavo
___
Python tracker
<https://bugs.python.org/issue4>
___
___
Python-bugs-list mailing list
Unsub
Barry A. Warsaw added the comment:
I don't think there's really anything more to do here. I'm closing the issue.
Let's open a new one if needed at some future point.
--
resolution: -> fixed
stage: patch review -> resol
A. Jesse Jiryu Davis added the comment:
If the patch requires a rewrite and its value is uncertain then I'll excuse
myself from this issue.
--
___
Python tracker
<https://bugs.python.org/is
New submission from Muthu A :
Tamil locale (TA_IN, TA_SL, TA_SG, TA_MY) is using outdated encoding of TSCII.
Tamil community is widely using UTF-8 encoding.
Further, the 'locale' standard library package in Python3 should be updated
with these strings.
Should the maintain
Change by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<https://bugs.python.org/issue40453>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Patrick A. :
This URL doesn't exist anymore. If you click on this URL you have a 404 not
found.
https://www.dcl.hpi.uni-potsdam.de/home/loewis/table-3131.html
The website was changed and Dr. Martin v. Löwis is not hosted on the new site.
Regards
--
assignee:
Change by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<https://bugs.python.org/issue39791>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ananthakrishnan A S added the comment:
Yes,I want to put together a PR.
--
___
Python tracker
<https://bugs.python.org/issue39479>
___
___
Python-bugs-list m
Ananthakrishnan A S added the comment:
I agree with Vedran Čačić.As the modules are not made for one person but it is
for the ease of coding.There are so many functions which i don't use but used
by other people.We are using functions to make coding easy and if lcm function
is added
Ananthakrishnan A S added the comment:
some problems that needs lcm function:
1:find the least number which when divided by 'a','b','c','d' leaves remainder
'e' in each case.
2:person A exercises every 'n' days and person B every
Ananthakrishnan A S added the comment:
Should i proceed with adding a pull request for adding a 'lcm' function in
python's math module.
--
___
Python tracker
<https://bugs.pyt
Ananthakrishnan A S added the comment:
I created this issue as i came across the following question:
There are n students in class A,and m students in class B.each class divides
into teams for a competition.What is the biggest possible team size that can be
divided,such that each team has
New submission from Ananthakrishnan A S :
can we add an lcm and gcd function that can work as:
lcm(4,6) # returns 12
gcd(4,6) # returns 2
--
components: Library (Lib)
messages: 360875
nosy: Ananthakrishnan A S
priority: normal
severity: normal
status: open
title: can we add a lcm and
New submission from Ananthakrishnan A S :
add a function called 'median' that we can use like:
list=[1,2,3,4,5,6,7,8,9] # declaring list
median(list) #returns 5
--
components: Library (Lib)
messages: 360873
nosy: Ananthakrishnan A S
priority: normal
severity: nor
Felipe A. Hernandez added the comment:
After some tests, due the accumulating nature of fwalk, I've just realised it's
not very safe for big directories, so I'll be closing this issue.
Alternatively, using py37+ fd based scandir, and dir_fd unlink and rmdir calls
would re
New submission from Felipe A. Hernandez :
os.rmtree has fd-based symlink replacement protection when iterating with
scandir (after bpo-28564).
This logic could be greatly simplified simply by os.fwalk in supported
platforms, which already implements a similar (maybe safer) protection
Anj-A <2017...@gmail.com> added the comment:
Hey, if there is no bug here, could we get this issue closed?
Alternatively, I'd be interested in doing the required change in
documentation/error type if that's seen to be the right solution.
Personally, I think returning False in
Barry A. Warsaw added the comment:
One simple restriction would be to disallow relative paths outside of the
resource anchor location.
--
___
Python tracker
<https://bugs.python.org/issue36
Change by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<https://bugs.python.org/issue38743>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Anj-A <2017...@gmail.com>:
--
keywords: +patch
pull_requests: +16563
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17047
___
Python tracker
<https://bugs.python.or
Anj-A <2017...@gmail.com> added the comment:
Hey, I've done the change and opened a pull request for it (I'm working with
Ben and I've let him know)
--
nosy: +Anj-A
___
Python tracker
<https://bu
Change by Anj-A <2017...@gmail.com>:
--
keywords: +patch
pull_requests: +16560
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/17047
___
Python tracker
<https://bugs.python.or
Anj-A <2017...@gmail.com> added the comment:
Hey, I'm not exactly clear what the required fix is here and would appreciate
some guidance, is it in the documentation or in the way the error is handled?
--
___
Python tracker
<https://b
Anj-A <2017...@gmail.com> added the comment:
Hi all, I'm a newcomer interested in doing a small fix. Wondering if anyone's
working on this at the moment?
------
nosy: +Anj-A
___
Python tracker
<https://bugs.py
Change by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<https://bugs.python.org/issue38605>
___
___
Python-bugs-list mailing list
Unsubscribe:
Barry A. Warsaw added the comment:
+1 Serhiy.
--
___
Python tracker
<https://bugs.python.org/issue38249>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Barry A. Warsaw :
test_py_compile fails on macOS Catalina beta (19A573a)
==
ERROR: test_relative_path (test.test_py_compile.PyCompileTestsWithSourceEpoch
Change by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<https://bugs.python.org/issue38289>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<https://bugs.python.org/issue38208>
___
___
Python-bugs-list mailing list
Unsubscribe:
Barry A. Warsaw added the comment:
See also this ticket:
https://gitlab.com/python-devs/importlib_resources/issues/58
We've basically agreed that you should be able to load resources from
subdirectories that aren't packages. It turns out to be not a simple change in
importlib
Change by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<https://bugs.python.org/issue38014>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<https://bugs.python.org/issue38010>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Barry A. Warsaw :
--
nosy: +barry
___
Python tracker
<https://bugs.python.org/issue34690>
___
___
Python-bugs-list mailing list
Unsubscribe:
A. Skrobov added the comment:
Joannah, I see that under #25314, the docs were updated to match the
implementation:
https://github.com/python/cpython/commit/b4912b8ed367e540ee060fe912f841cc764fd293
On the other hand, the discussion here (from 2015) and on #25314 (from 2016)
includes
New submission from D. A. Pellegrino :
The unittest documentation makes reference to a potential parallelization
feature:
"Note that shared fixtures do not play well with [potential] features like test
parallelization and they break test isolation. They should be used with care.&quo
Barry A. Warsaw added the comment:
I personally don't think we need to change this. C and Python are different,
and the PEP 7 rules have been in place for ages.
+Guido
--
nosy: +gvanrossum
___
Python tracker
<https://bugs.python.org/is
Barry A. Warsaw added the comment:
@jaraco will be able to answer that better than me. I actually thought those
did return concrete lists.
I also thought that the APIs accepted either a module or a package name, but
maybe I'm thinking about importlib.resources. Again, @jaraco can cl
Barry A. Warsaw added the comment:
> OTOH This would require a PEP change, formal review, etc.
It would be trivial though. There are only two references to TargetScopeError
in the PEP. One talks about adding the exception and the other just mentions
it almost in passing as a subclass
Change by Barry A. Warsaw :
--
keywords: +patch
pull_requests: +14887
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/15153
___
Python tracker
<https://bugs.python.org/issu
Barry A. Warsaw added the comment:
I’ll do a PR for that too.
> On Aug 6, 2019, at 14:07, Brett Cannon wrote:
>
>
> Brett Cannon added the comment:
>
> If there's no porting benefit then let's move it to a single mo
Barry A. Warsaw added the comment:
@jaraco - Why is the code in `Lib/importlib/metadata/__init__.py` instead of
`Lib/importlib/metadata.py`? Is that to make it easier to port between CPython
stdlib and the standalone version?
--
___
Python
101 - 200 of 2582 matches
Mail list logo