Re: [pygettext] --package-name and --package-version unknown

2023-05-08 Thread aapost

On 5/5/23 04:39, c.bu...@posteo.jp wrote:


That being said, the git repo linked earlier has accepted commits to 
that file earlier this year. So read in to that what you will *shrugs*

--
https://mail.python.org/mailman/listinfo/python-list


Re: [pygettext] --package-name and --package-version unknown

2023-05-08 Thread aapost

On 5/5/23 04:39, c.bu...@posteo.jp wrote:

Thanks for the answer.

Am 05.05.2023 03:24 schrieb aapost:

pygettext is deprecated since xgettext supports python now, so using
xgettext is recommended.


If this is the official case then it should be mentioned in the python 
docs. The 3.11 docs still tell about pygettext and xgettext and don't 
recommend one of it.


Yep, no disagreement. A lot of things 'should' be though, and 
technically it is (which docs being the key, lol):


$man pygettext

PYGETTEXT(1)   General Commands 
Manual  PYGETTEXT(1)


NAME
   pygettext - Python equivalent of xgettext(1)

SYNOPSIS
   pygettext [OPTIONS] INPUTFILE ...

DESCRIPTION
   pygettext is deprecated. The current version of xgettext 
supports many languages, including Python.


   pygettext  uses Python's standard tokenize module to scan Python 
source code, generating .pot files identical to what
   GNU xgettext generates for C and C++ code.  From there, the 
standard GNU tools can be used.


   pygettext searches only for _() by default, even though GNU 
xgettext  recognizes  the  following  keywords:  gettext,
   dgettext, dcgettext, and gettext_noop. See the -k/--keyword flag 
below for how to augment this.



(I have never used either, I just spent a few minutes trying to be 
helpful =P)

--
https://mail.python.org/mailman/listinfo/python-list


Re: [pygettext] --package-name and --package-version unknown

2023-05-05 Thread c . buhtz

Thanks for the answer.

Am 05.05.2023 03:24 schrieb aapost:

pygettext is deprecated since xgettext supports python now, so using
xgettext is recommended.


If this is the official case then it should be mentioned in the python 
docs. The 3.11 docs still tell about pygettext and xgettext and don't 
recommend one of it.

--
https://mail.python.org/mailman/listinfo/python-list


Re: [pygettext] --package-name and --package-version unknown

2023-05-04 Thread aapost

On 5/4/23 17:38, c.bu...@posteo.jp wrote:
am I right to assume that "pygettext" is part of the official Python3 
"package"? So it is OK to aks here?


How can I set the "Project-Id-Version"? With "xgettext" I would use the 
arguments "--package-name" and "--package-version" for this but they are 
unknown for "pygettext".


pygettext is deprecated since xgettext supports python now, so using 
xgettext is recommended.


That being said, pygettext does not support the options, but it could be 
modified pretty easily.
Untested but if you wanted to add that functionality in just create a 
modified pygettext.py with something like:



link PACKAGE and VERSION to variables:

pot_header = _('''\
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR ORGANIZATION
# FIRST AUTHOR , YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: %(packagename)s %(packageversion)s\\n"
"POT-Creation-Date: %(time)s\\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n"
"Last-Translator: FULL NAME \\n"
"Language-Team: LANGUAGE \\n"
"MIME-Version: 1.0\\n"
"Content-Type: text/plain; charset=%(charset)s\\n"
"Content-Transfer-Encoding: %(encoding)s\\n"
"Generated-By: pygettext.py %(version)s\\n"
''')

add attributes to Options class:

class Options:
# constants
GNU = 1
SOLARIS = 2
# defaults
extractall = 0 # FIXME: currently this option has no effect at all.
escape = 0
keywords = []
outpath = ''
outfile = 'messages.pot'
writelocations = 1
locationstyle = GNU
verbose = 0
width = 78
excludefilename = ''
docstrings = 0
nodocstrings = {}
packagename = "PACKAGE"
packageversion = "VERSION"

modify option parsing for loop to look for new options:
for opt, arg in opts:

elif opt in ('--package-name',):
options.packagename = arg
elif opt in ('--package-version',):
options.packageversion = arg

grab those options when generating file output:

def write(self, fp):
options = self.__options
packagename = options.packagename
packageversion = options.packageversion
timestamp = time.strftime('%Y-%m-%d %H:%M%z')
encoding = fp.encoding if fp.encoding else 'UTF-8'
print(pot_header % {'packagename': packagename,
'packageversion': packageversion,
'time': timestamp, 'version': __version__,
'charset': encoding,
'encoding': '8bit'}, file=fp)

(did not test, so might be a bug or two)

--
https://mail.python.org/mailman/listinfo/python-list


Re: [pygettext] --package-name and --package-version unknown

2023-05-04 Thread Alan Gauld
On 04/05/2023 22:38, c.bu...@posteo.jp wrote:
> Hello,
> 
> am I right to assume that "pygettext" is part of the official Python3 
> "package"? So it is OK to aks here?
> 

No it doesn't appear to be. It is not listed in the standard library.
It is mentioned in the documentation for gettext which is part of the
standard library.

It does seem to be part of the Python i18n toolkit however.
There are extensive comments in the .py file.

https://github.com/python/cpython/tree/main/Tools/i18n/pygettext.py

> I would like to modify the header that pygettext does create in each 
> po-file.

Sorry, I've never used pygettext so can't help there.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


-- 
https://mail.python.org/mailman/listinfo/python-list


[pygettext] --package-name and --package-version unknown

2023-05-04 Thread c . buhtz

Hello,

am I right to assume that "pygettext" is part of the official Python3 
"package"? So it is OK to aks here?


I do use pygettext to handle po and pot files. In the manpage I'm not 
able to find help about this.
I would like to modify the header that pygettext does create in each 
po-file.


How can I set the "Project-Id-Version"? With "xgettext" I would use the 
arguments "--package-name" and "--package-version" for this but they are 
unknown for "pygettext".


Kind
Christian
--
https://mail.python.org/mailman/listinfo/python-list


[issue471270] SystemError: unknown opcode

2022-04-10 Thread admin


Change by admin :


--
github: None -> 35328

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46915] Build with Py_LIMITED_API fails unknown type name ‘PyModuleDef_Slot’

2022-03-11 Thread STINNER Victor


STINNER Victor  added the comment:

> Fixed by 
> https://github.com/python/cpython/commit/0b63215bb152c06404cecbd5303b1a50969a9f9f

This change is now part of Python 3.11 alpha6 released a few days ago. Python 
3.11a6 news entries were merged into the Misc/NEWS.d/3.11.0a6.rst file.

> Please add a blurb entry.

I consider that the changelog is for changes which impacts users when they 
update. The regression was introduced after 3.11 alpha5 but fixed before Python 
3.11 alpha6. Only projects using contiguous integration were impacted. Only the 
cryptography project was impacted in practice.

> https://github.com/pyca/cryptography/issues/6929

This issue was closed as with the comment:

"Going to close this as it's an upstream python bug that's now been fixed."

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46915] Build with Py_LIMITED_API fails unknown type name ‘PyModuleDef_Slot’

2022-03-03 Thread Christian Heimes


Christian Heimes  added the comment:

Please add a blurb entry.

--
assignee: christian.heimes -> vstinner
priority:  -> normal
resolution: fixed -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46915] Build with Py_LIMITED_API fails unknown type name ‘PyModuleDef_Slot’

2022-03-03 Thread STINNER Victor


STINNER Victor  added the comment:

Fixed by 
https://github.com/python/cpython/commit/0b63215bb152c06404cecbd5303b1a50969a9f9f

--
priority: release blocker -> 
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46915] Build with Py_LIMITED_API fails unknown type name ‘PyModuleDef_Slot’

2022-03-03 Thread STINNER Victor


STINNER Victor  added the comment:

I proposed a fix: https://github.com/python/cpython/pull/31668

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46915] Build with Py_LIMITED_API fails unknown type name ‘PyModuleDef_Slot’

2022-03-03 Thread Christian Heimes

Christian Heimes  added the comment:

With fix:

$ /tmp/python311/bin/pip3 install --no-binary :all: cryptography
Collecting cryptography
  Using cached cryptography-36.0.1.tar.gz (572 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: cffi>=1.12 in 
/tmp/python311/lib/python3.11/site-packages (from cryptography) (1.15.0)
Requirement already satisfied: pycparser in 
/tmp/python311/lib/python3.11/site-packages (from cffi>=1.12->cryptography) 
(2.21)
Building wheels for collected packages: cryptography
  Building wheel for cryptography (PEP 517) ... done
  Created wheel for cryptography: 
filename=cryptography-36.0.1-cp311-cp311-linux_x86_64.whl size=2628351 
sha256=fb3cc21f8eaa546cd2c0123ea01a98bf92a9824fcdca36cfcf765b2c044bd186
  Stored in directory: 
/home/heimes/.cache/pip/wheels/6c/77/a9/3c4762d4e65bef5f742a304c507f9723ca3563a38d108618ad
Successfully built cryptography
Installing collected packages: cryptography
Successfully installed cryptography-36.0.1


Without fix:

  gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC 
-I/tmp/python311/include/python3.11 -c build/temp.linux-x86_64-3.11/_openssl.c 
-o build/temp.linux-x86_64-3.11/build/temp.linux-x86_64-3.11/_openssl.o 
-Wconversion -Wno-error=sign-conversion
  In file included from /tmp/python311/include/python3.11/Python.h:66,
   from build/temp.linux-x86_64-3.11/_openssl.c:57:
  /tmp/python311/include/python3.11/moduleobject.h:82:3: error: unknown type 
name ‘PyModuleDef_Slot’
 82 |   PyModuleDef_Slot *m_slots;
|   ^~~~

--
keywords:  -patch
stage: patch review -> 

___
Python tracker 
<https://bugs.python.org/issue46915>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46915] Build with Py_LIMITED_API fails unknown type name ‘PyModuleDef_Slot’

2022-03-03 Thread Christian Heimes


Change by Christian Heimes :


--
keywords: +patch
pull_requests: +29786
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/31667

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46915] Build with Py_LIMITED_API fails unknown type name ‘PyModuleDef_Slot’

2022-03-03 Thread Christian Heimes


Christian Heimes  added the comment:

The problem was first reported to PyCA cryptography project in bug 
https://github.com/pyca/cryptography/issues/6929

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46915] Build with Py_LIMITED_API fails unknown type name ‘PyModuleDef_Slot’

2022-03-03 Thread Christian Heimes

New submission from Christian Heimes :

Extension modules with bare "#define Py_LIMITED_API" without version fail to 
build with error:

   moduleobject.h:82:3: error: unknown type name ‘PyModuleDef_Slot’

The issue was introduced in PR GH-31528 and bpo-45459. The type 
PyModuleDef_Slot is only defined when Py_LIMITED_API is set to Python 3.5.0 or 
higher.

--
assignee: christian.heimes
components: Build, Interpreter Core
keywords: 3.11regression
messages: 414473
nosy: christian.heimes, pablogsal, vstinner
priority: release blocker
severity: normal
status: open
title: Build with Py_LIMITED_API fails unknown type name ‘PyModuleDef_Slot’
type: compile error
versions: Python 3.11

___
Python tracker 
<https://bugs.python.org/issue46915>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15082] [httplib] httplib.BadStatusLine on any HTTPS connection in certain unknown cases.

2021-12-09 Thread Irit Katriel


Change by Irit Katriel :


--
stage: test needed -> resolved
status: pending -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17179] Misleading error from type() when passing unknown keyword argument

2021-12-05 Thread Irit Katriel


Change by Irit Katriel :


--
stage: needs patch -> resolved
status: pending -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27582] Mispositioned SyntaxError caret for unknown code points

2021-12-03 Thread Irit Katriel


Change by Irit Katriel :


--
stage: needs patch -> resolved
status: pending -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17179] Misleading error from type() when passing unknown keyword argument

2021-11-24 Thread Irit Katriel


Irit Katriel  added the comment:

This seems to have been fixed by now. I get this on 3.11:

>>> from types import new_class
>>> from datetime import datetime
>>> new_class('tdatetime', (datetime, ), kwds={'foo':'bar'})
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/iritkatriel/src/cpython-1/Lib/types.py", line 77, in new_class
return meta(name, resolved_bases, ns, **kwds)
   ^^
TypeError: tdatetime.__init_subclass__() takes no keyword arguments

--
nosy: +iritkatriel
resolution:  -> out of date
status: open -> pending

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27582] Mispositioned SyntaxError caret for unknown code points

2021-11-23 Thread Irit Katriel

Irit Katriel  added the comment:

This seems to have been fixed by now, I get this on 3.11:

>>> varname = “d“a”t”apoint
  File "", line 1
varname = “d“a”t”apoint
  ^
SyntaxError: invalid character '“' (U+201C)
>>> varname = “d“a”t”apoint.evidence
  File "", line 1
varname = “d“a”t”apoint.evidence
  ^
SyntaxError: invalid character '“' (U+201C)
>>> varname = “d“a”t”apoint[evidence]
  File "", line 1
varname = “d“a”t”apoint[evidence]
  ^
SyntaxError: invalid character '“' (U+201C)
>>> varname = “d“a”t”apoint(evidence)
  File "", line 1
varname = “d“a”t”apoint(evidence)
  ^
SyntaxError: invalid character '“' (U+201C)

--
nosy: +iritkatriel
resolution:  -> fixed
status: open -> pending

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37516] test_asyncio logs: Unknown child process

2021-10-20 Thread Irit Katriel


Irit Katriel  added the comment:

Closing as there isn't enough information and there was no reply to followup 
questions.  Also 3.8 is no longer maintained. 

Please create a new issue with more information if you are still seeing a 
problem in a current version of python (3.9+).

--
nosy: +iritkatriel
resolution:  -> works for me
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45424] ssl.SSLError: unknown error (_ssl.c:4034)

2021-10-11 Thread Rahul Lakshmanan


Rahul Lakshmanan  added the comment:

Thanks for the answer!

When I upgraded Python to 3.8.12, the issue went away.

Can be closed.

--
resolution:  -> works for me
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45424] ssl.SSLError: unknown error (_ssl.c:4034)

2021-10-11 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45424] ssl.SSLError: unknown error (_ssl.c:4034)

2021-10-10 Thread Christian Heimes


Christian Heimes  added the comment:

The error means that something went wrong while loading certificates, but 
OpenSSL didn't give us more information about what went wrong.

Can you reproduce the issue with more recent Python version? 3.7 and 3.8 are in 
security fix-only mode and no longer receive bug fixes.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45424] ssl.SSLError: unknown error (_ssl.c:4034)

2021-10-10 Thread Rahul Lakshmanan


New submission from Rahul Lakshmanan :

I face this error when trying to use a package called streamlit.

Streamlit calls Tornado which calls SSL.

 File "C:\Users\\.conda\envs\stockprediction\lib\ssl.py", line 589, 
in create_default_context
context.load_default_certs(purpose)
  File "C:\Users\\.conda\envs\stockprediction\lib\ssl.py", line 490, 
in load_default_certs
self._load_windows_store_certs(storename, purpose)
  File "C:\Users\\.conda\envs\stockprediction\lib\ssl.py", line 482, 
in _load_windows_store_certs
self.load_verify_locations(cadata=certs)
ssl.SSLError: unknown error (_ssl.c:4034)

This is using Python 3.7.10 (Anaconda) on Windows 10.

Would be really grateful if you could help resolve this issue. 

Note: I am unable to find this specific issue anywhere on Python.org or on 
OpenSSL github issues page.

--
assignee: christian.heimes
components: SSL
messages: 403595
nosy: christian.heimes, rahullak, vstinner
priority: normal
severity: normal
status: open
title: ssl.SSLError: unknown error (_ssl.c:4034)
type: crash
versions: Python 3.7

___
Python tracker 
<https://bugs.python.org/issue45424>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9811] strftime strips '%' from unknown format codes on OS X

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset b1873d1e24ed5ef39f37ca3090c2f0c2b34ce23f by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-9811: [doc] strftime handling of unsupported format specifiers is platform 
dependent (GH-28264) (GH-28277)
https://github.com/python/cpython/commit/b1873d1e24ed5ef39f37ca3090c2f0c2b34ce23f


--
nosy: +pablogsal

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17913] stat.filemode returns "-" for sockets and unknown types

2021-09-13 Thread Christian Heimes


Christian Heimes  added the comment:

Thanks for the ping. The issue has been fixed a long time ago.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9811] strftime strips '%' from unknown format codes on OS X

2021-09-10 Thread Irit Katriel


Irit Katriel  added the comment:

No, I think we're good. Thanks.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9811] strftime strips '%' from unknown format codes on OS X

2021-09-10 Thread Łukasz Langa

Łukasz Langa  added the comment:

Is there anything else you wanted to do here, Irit?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9811] strftime strips '%' from unknown format codes on OS X

2021-09-10 Thread Łukasz Langa

Change by Łukasz Langa :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9811] strftime strips '%' from unknown format codes on OS X

2021-09-10 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset baeaaecb8a97033bc2d07d51442cc8b1f89d410d by Miss Islington (bot) 
in branch '3.9':
bpo-9811: [doc] strftime handling of unsupported format specifiers is platform 
dependent (GH-28264) (GH-28278)
https://github.com/python/cpython/commit/baeaaecb8a97033bc2d07d51442cc8b1f89d410d


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9811] strftime strips '%' from unknown format codes on OS X

2021-09-10 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 897e5aae748180acf8d546d14aeacaf02600fff9 by Miss Islington (bot) 
in branch '3.10':
bpo-9811: [doc] strftime handling of unsupported format specifiers is platform 
dependent (GH-28264) (GH-28277)
https://github.com/python/cpython/commit/897e5aae748180acf8d546d14aeacaf02600fff9


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17913] stat.filemode returns "-" for sockets and unknown types

2021-09-10 Thread Irit Katriel


Irit Katriel  added the comment:

I think this is fixed now

>>> s = os.stat('/var/run/vpncontrol.sock')
>>> stat.filemode(s.st_mode)
'srw---'


iritkatriel@Irits-MBP cpython % ls -l /var/run/vpncontrol.sock 
srw---  1 root  daemon  0 19 Aug 11:15 /var/run/vpncontrol.sock

--
nosy: +iritkatriel

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9811] strftime strips '%' from unknown format codes on OS X

2021-09-10 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 10.0 -> 11.0
pull_requests: +26695
pull_request: https://github.com/python/cpython/pull/28277

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9811] strftime strips '%' from unknown format codes on OS X

2021-09-10 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset e86bcfa58080f152f242c756f625f4015671f168 by Irit Katriel in 
branch 'main':
bpo-9811: [doc] strftime handling of unsupported format specifiers is platform 
dependent (GH-28264)
https://github.com/python/cpython/commit/e86bcfa58080f152f242c756f625f4015671f168


--
nosy: +lukasz.langa

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9811] strftime strips '%' from unknown format codes on OS X

2021-09-10 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26696
pull_request: https://github.com/python/cpython/pull/28278

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9811] strftime strips '%' from unknown format codes on OS X

2021-09-09 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.1, Python 
3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9811] strftime strips '%' from unknown format codes on OS X

2021-09-09 Thread Irit Katriel


Irit Katriel  added the comment:

This issue was created 11 years ago today. Let's celebrate its anniversary by 
resolving it!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9811] strftime strips '%' from unknown format codes on OS X

2021-09-09 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +patch
nosy: +iritkatriel
nosy_count: 8.0 -> 9.0
pull_requests: +26684
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28264

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44974] Warning about "Unknown child process pid" in test_asyncio

2021-08-26 Thread Ryan Mast (nightlark)


Ryan Mast (nightlark)  added the comment:

I haven't gotten a chance to narrow it down much yet, it might be that it is 
occurs more often on systems with a low core count/higher load -- a bit hard to 
tell with it being intermittent though.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44974] Warning about "Unknown child process pid" in test_asyncio

2021-08-22 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

Ryan Mast reported about a warning about "Unknown child process pid" after 
finishing test_asyncio (see msg400018 and 
https://github.com/python/cpython/pull/27870#issuecomment-903072119 for 
details).

I cannot reproduce it locally. Ryan, could you help with locating the source of 
this warning? First suspect is test_close_dont_kill_finished. If it is not, it 
may be other test calling kill().

--
components: Tests, asyncio
messages: 400057
nosy: asvetlov, rmast, serhiy.storchaka, yselivanov
priority: normal
severity: normal
status: open
title: Warning about "Unknown child process pid" in test_asyncio
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue44974>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25251] Unknown MS Compiler version 1900

2021-06-17 Thread Roundup Robot


Change by Roundup Robot :


--
nosy: +python-dev
nosy_count: 14.0 -> 15.0
pull_requests: +25365
pull_request: https://github.com/python/cpython/pull/26780

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38569] Unknown distribution option: 'license_files'

2021-02-03 Thread Steve Dower


Steve Dower  added the comment:

Distutils is now deprecated (see PEP 632) and all tagged issues are being 
closed. From now until removal, only release blocking issues will be considered 
for distutils.

If this issue does not relate to distutils, please remove the component and 
reopen it. If you believe it still requires a fix, most likely the issue should 
be re-reported at https://github.com/pypa/setuptools

--
nosy: +steve.dower
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22433] Argparse considers unknown optional arguments with spaces as a known positional argument

2020-07-06 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions: +Python 3.10 -Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22433] Argparse considers unknown optional arguments with spaces as a known positional argument

2020-06-16 Thread daniel hahler


Change by daniel hahler :


--
nosy: +blueyed
nosy_count: 3.0 -> 4.0
pull_requests: +20102
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/20924

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13171] Bug in file.read(), can access unknown data.

2020-05-31 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40527] Multiple "unknown option" errors when passing unknown arguments to the interpreter

2020-05-06 Thread STINNER Victor


STINNER Victor  added the comment:

> That was an insanely fast fix - thanks everyone! :)

Sorry about that. We are working on this issue to ensure that next bugs will 
not fixed as quickly a this done ;-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40527] Multiple "unknown option" errors when passing unknown arguments to the interpreter

2020-05-06 Thread Florian Bruhin


Florian Bruhin  added the comment:

That was an insanely fast fix - thanks everyone! :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40527] Multiple "unknown option" errors when passing unknown arguments to the interpreter

2020-05-06 Thread Dong-hee Na


Dong-hee Na  added the comment:

Thanks for the bug report Florian and for work Victor!

I am now closing this issue :)

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40527] Multiple "unknown option" errors when passing unknown arguments to the interpreter

2020-05-06 Thread miss-islington


miss-islington  added the comment:


New changeset bce4ddafdd188cc6deb1584728b67b9e149ca6a4 by Miss Islington (bot) 
in branch '3.8':
bpo-40527: Fix command line argument parsing (GH-19955)
https://github.com/python/cpython/commit/bce4ddafdd188cc6deb1584728b67b9e149ca6a4


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40527] Multiple "unknown option" errors when passing unknown arguments to the interpreter

2020-05-06 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +19272
pull_request: https://github.com/python/cpython/pull/19956

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40527] Multiple "unknown option" errors when passing unknown arguments to the interpreter

2020-05-06 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 2668a9a5aa506a048aef7b4881c8dcf6b81c6870 by Victor Stinner in 
branch 'master':
bpo-40527: Fix command line argument parsing (GH-19955)
https://github.com/python/cpython/commit/2668a9a5aa506a048aef7b4881c8dcf6b81c6870


--
nosy: +corona10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40527] Multiple "unknown option" errors when passing unknown arguments to the interpreter

2020-05-06 Thread STINNER Victor


STINNER Victor  added the comment:

> I was able to bisect this to the following commit: (...)

Oh, well done! Yeah, it's all my fault ;-) It's a regression of the PEP 587 
(PyConfig) implementation.

I chose to share code between Python/preconfig.c and Python/initconfig.c rather 
than duplicate code. The implementation of _PyPreConfig_Read() and 
PyConfig_Read() is quite complex.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40527] Multiple "unknown option" errors when passing unknown arguments to the interpreter

2020-05-06 Thread STINNER Victor


STINNER Victor  added the comment:

Oh right, that's because Python parses the command line at least 3 times :-) 
The first 2 times, it is not supposed to log errors. It's a bug: attached PR 
19955 fix it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40527] Multiple "unknown option" errors when passing unknown arguments to the interpreter

2020-05-06 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +19271
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19955

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40527] Multiple "unknown option" errors when passing unknown arguments to the interpreter

2020-05-06 Thread Florian Bruhin


New submission from Florian Bruhin :

A minor issue I just discovered today: When e.g. doing "python3 --foo", the 
output is:

  unknown option --foo
  unknown option --foo
  unknown option --foo
  usage: /usr/bin/python3 [option] ... [-c cmd | -m mod | file | -] [arg] ...

With more dashes in the options, it seems to get worse:

  unknown option --foo-bar-baz
  unknown option --foo-bar-baz
  unknown option --foo-bar-baz
  unknown option --foo-bar-baz
  unknown option --foo-bar-baz
  unknown option --foo-bar-baz
  unknown option --foo-bar-baz
  usage: /usr/bin/python3 [option] ... [-c cmd | -m mod | file | -] [arg] ...

This seems very similar to issue16306 (thus why I added people involved there 
to the nosy list), except that it happens with long rather than short arguments.

This only happens with Python 3.8/3.9, not 3.7 or older. I was able to bisect 
this to the following commit:

commit 6dcb54228e7520abd058897440c26e323f62afcd
Author: Victor Stinner 
Date:   Tue Mar 5 02:44:12 2019 +0100

bpo-36142: Add _PyPreConfig_ReadFromArgv() (GH-12173)

The new function is now responsible to parse -E and -I command line
arguments.

--
components: Interpreter Core
messages: 368231
nosy: The Compiler, hieu.nguyen, serhiy.storchaka, tweksteen, vstinner
priority: normal
severity: normal
status: open
title: Multiple "unknown option" errors when passing unknown arguments to the 
interpreter
type: behavior
versions: Python 3.8, Python 3.9

___
Python tracker 
<https://bugs.python.org/issue40527>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37388] unknown error handlers should be reported early

2020-04-07 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d8acf0d9aae71d1897e8f91989bd8bfb4a9ef9c6 by Victor Stinner in 
branch 'master':
bpo-37388: Don't check encoding/errors during finalization (GH-19409)
https://github.com/python/cpython/commit/d8acf0d9aae71d1897e8f91989bd8bfb4a9ef9c6


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37388] unknown error handlers should be reported early

2020-04-07 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +18770
pull_request: https://github.com/python/cpython/pull/19409

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38569] Unknown distribution option: 'license_files'

2019-11-27 Thread Brett Cannon


Change by Brett Cannon :


--
nosy:  -brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38569] Unknown distribution option: 'license_files'

2019-10-24 Thread Brett Cannon


Brett Cannon  added the comment:

Why do you think the warning can be removed? Is it documented as supported in 
distutils? If setuptools supports that argument but not distutils then that 
would be a bug against them.

--
nosy: +brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38569] Unknown distribution option: 'license_files'

2019-10-23 Thread Marco Sulla


New submission from Marco Sulla :

I tried to add to `setuptools.setup()` the argument license_files. It works, 
but I get this warning:

/usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution 
option: 'license_files'

I suppose the warning can be removed.

--
components: Distutils
messages: 355262
nosy: Marco Sulla, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: Unknown distribution option: 'license_files'
type: enhancement
versions: Python 3.9

___
Python tracker 
<https://bugs.python.org/issue38569>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37516] test_asyncio logs: Unknown child process

2019-10-21 Thread STINNER Victor


Change by STINNER Victor :


--
title: buid error - test_asyncio fails during make -> test_asyncio logs: 
Unknown child process

___
Python tracker 
<https://bugs.python.org/issue37516>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37388] unknown error handlers should be reported early

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:

I compared ref (commit e1a63c4f21011a3ae77dff624196561070c83446) to patch 
(commit ed076ed467264b43ed01a8223ca65b133b590919). I ran bench.py using:

# edit Makefile.pre.in to use:
PROFILE_TASK=-m test.regrtest --pgo test_unicode test_codecs

./configure --enable-optimizations && make
./python -m venv env && env/bin/python -m pip install -U pyperf
./env/bin/python bench.py -o .json

$ python3 -m pyperf compare_to ref_e1a63c4f2.json patch_ed076ed4.json 
0B: Mean +- std dev: [ref_e1a63c4f2] 76.7 ns +- 0.9 ns -> [patch_ed076ed4] 77.5 
ns +- 2.9 ns: 1.01x slower (+1%)
1B: Mean +- std dev: [ref_e1a63c4f2] 92.9 ns +- 0.8 ns -> [patch_ed076ed4] 94.0 
ns +- 2.4 ns: 1.01x slower (+1%)
5B: Mean +- std dev: [ref_e1a63c4f2] 106 ns +- 2 ns -> [patch_ed076ed4] 110 ns 
+- 2 ns: 1.04x slower (+4%)
10B: Mean +- std dev: [ref_e1a63c4f2] 105 ns +- 1 ns -> [patch_ed076ed4] 109 ns 
+- 1 ns: 1.03x slower (+3%)
25B: Mean +- std dev: [ref_e1a63c4f2] 108 ns +- 3 ns -> [patch_ed076ed4] 111 ns 
+- 3 ns: 1.03x slower (+3%)
100B: Mean +- std dev: [ref_e1a63c4f2] 114 ns +- 1 ns -> [patch_ed076ed4] 115 
ns +- 2 ns: 1.01x slower (+1%)
1000B: Mean +- std dev: [ref_e1a63c4f2] 267 ns +- 3 ns -> [patch_ed076ed4] 253 
ns +- 4 ns: 1.06x faster (-5%)

$ python3 -m pyperf compare_to ref_e1a63c4f2.json patch_ed076ed4.json  --table
+---+---+-+
| Benchmark | ref_e1a63c4f2 | patch_ed076ed4  |
+===+===+=+
| 0B| 76.7 ns   | 77.5 ns: 1.01x slower (+1%) |
+---+---+-+
| 1B| 92.9 ns   | 94.0 ns: 1.01x slower (+1%) |
+---+---+-+
| 5B| 106 ns| 110 ns: 1.04x slower (+4%)  |
+---+---+-+
| 10B   | 105 ns| 109 ns: 1.03x slower (+3%)  |
+---+---+-+
| 25B   | 108 ns| 111 ns: 1.03x slower (+3%)  |
+---+---+-+
| 100B  | 114 ns| 115 ns: 1.01x slower (+1%)  |
+---+---+-+
| 1000B | 267 ns| 253 ns: 1.06x faster (-5%)  |
+---+---+-+

The overhead of my change is around 1 ns, 4 ns (on 106 ns) in the worst case 
(5B).

The change "looks" faster on the 1000B case, but it's likely a glitch of PGO 
compilation which is not really deterministic.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37388] unknown error handlers should be reported early

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:

Ok, the encoding and errors are now checked in almost all cases if you enable 
the development mode using -X dev command line option.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37388] unknown error handlers should be reported early

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ed076ed467264b43ed01a8223ca65b133b590919 by Victor Stinner in 
branch 'master':
bpo-37388: Add PyUnicode_Decode(str, 0) fast-path (GH-14385)
https://github.com/python/cpython/commit/ed076ed467264b43ed01a8223ca65b133b590919


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37388] unknown error handlers should be reported early

2019-06-25 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +14199
pull_request: https://github.com/python/cpython/pull/14385

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37388] unknown error handlers should be reported early

2019-06-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 22eb689cf3de7972a2789db3ad01a86949508ab7 by Victor Stinner in 
branch 'master':
bpo-37388: Development mode check encoding and errors (GH-14341)
https://github.com/python/cpython/commit/22eb689cf3de7972a2789db3ad01a86949508ab7


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37388] unknown error handlers should be reported early

2019-06-24 Thread STINNER Victor


STINNER Victor  added the comment:

bench.py: microbenchmark to measure the overhead of PR 14341.

--
Added file: https://bugs.python.org/file48435/bench.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37388] unknown error handlers should be reported early

2019-06-24 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +14162
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14341

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37388] unknown error handlers should be reported early

2019-06-24 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +inada.naoki, serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37388] unknown error handlers should be reported early

2019-06-24 Thread STINNER Victor


STINNER Victor  added the comment:

Getting an error handler is expensive compared to the time to encode 
text/decode bytes. Python loads the error handler lazily to provide best 
performances. Text codecs are performance critical for Python.

If we add a check, it should only be enabled in development (python3 -X dev) 
and/or debug mode (./configure --with-pydebug).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37388] unknown error handlers should be reported early

2019-06-24 Thread Miro Hrončok

New submission from Miro Hrončok :

I was just bit by specifying an nonexisitng error handler for bytes.decode() 
without noticing.

Consider this code:

>>> 'a'.encode('cp1250').decode('utf-8', errors='Boom, Shaka Laka, Boom!')
'a'

Nobody notices that the error handler doesn't exist.

However:

>>> 'ž'.encode('cp1250').decode('utf-8', errors='Boom, Shaka Laka, Boom!')
Traceback (most recent call last):
  File "", line 1, in 
LookupError: unknown error handler name 'Boom, Shaka Laka, Boom!'


The error is only noticeable once there is an error in the data.

While nobody could possibly mistake 'Boom, Shaka Laka, Boom!' for a valid error 
handler, I was bit by this:

>>> b.decode('utf-8', errors='surrogate')

Which in fact should have been

>>> b.decode('utf-8', errors='surrogateescape')

Yet I wasn't notified, because the bytes in question were actually decodeable 
as valid utf-8.

I suggest that unknown error handler should rise an exception immediately like 
this:

>>> 'b'.encode('cp1250').decode('utf-8', errors='Boom, Shaka Laka, Boom!')
Traceback (most recent call last):
  File "", line 1, in 
LookupError: unknown error handler name 'Boom, Shaka Laka, Boom!'

--
components: Unicode
messages: 346407
nosy: ezio.melotti, hroncok, vstinner
priority: normal
severity: normal
status: open
title: unknown error handlers should be reported early
versions: Python 3.9

___
Python tracker 
<https://bugs.python.org/issue37388>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25251] Unknown MS Compiler version 1900

2019-05-06 Thread anthony shaw


anthony shaw  added the comment:

Closing as 3rd party feature for setuptools

--
nosy: +anthonypjshaw
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34088] [EASY] sndhdr.what() throws exceptions on unknown files

2019-05-01 Thread david awad


david awad  added the comment:

It's been a while since then but I really think we can get this fix merged in 
the next two weeks or so. 

Can someone give this another look? 

I had a quick question for Serhiy Here: 
https://github.com/python/cpython/pull/8319#discussion_r273539593

If we could get that resolved I think this can finally be done and I can try to 
help out on a different PR and do a better job in the future. 


Thanks!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25251] Unknown MS Compiler version 1900

2019-03-27 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Should this issue be closed as third-party or do we want to leave it open as 
reference?

--
nosy: +cheryl.sabella

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28450] Misleading/inaccurate documentation about unknown escape sequences in regular expressions

2019-02-25 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28450] Misleading/inaccurate documentation about unknown escape sequences in regular expressions

2019-02-25 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 95fc8e687c487ecf97f4b1b98dfc0c05e3c9cbff by Serhiy Storchaka in 
branch '3.7':
[3.7] bpo-28450: Fix and improve the documentation for unknown escapes in RE. 
(GH-11920). (GH-12029)
https://github.com/python/cpython/commit/95fc8e687c487ecf97f4b1b98dfc0c05e3c9cbff


--

___
Python tracker 
<https://bugs.python.org/issue28450>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28450] Misleading/inaccurate documentation about unknown escape sequences in regular expressions

2019-02-25 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +12060

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28450] Misleading/inaccurate documentation about unknown escape sequences in regular expressions

2019-02-25 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset a180b007d96fe68b32f11dec720fbd0cd5b6758a by Serhiy Storchaka in 
branch 'master':
bpo-28450: Fix and improve the documentation for unknown escapes in RE. 
(GH-11920)
https://github.com/python/cpython/commit/a180b007d96fe68b32f11dec720fbd0cd5b6758a


--

___
Python tracker 
<https://bugs.python.org/issue28450>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28450] Misleading/inaccurate documentation about unknown escape sequences in regular expressions

2019-02-18 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +11945
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32756] argparse: parse_known_args: raising exception on unknown arg following known one

2018-09-29 Thread paul j3


Change by paul j3 :


--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13081] Crash in Windows with unknown cause

2018-09-03 Thread Zachary Ware


Zachary Ware  added the comment:

As far as I can tell, this was an application bug in multiprocessing cleanup 7 
years ago.  I'm not sure there's really even anything to add to the docs for 
this, but if anyone disagrees or produces a patch, please reopen.

--
nosy: +davin, pitrou, zach.ware
resolution:  -> works for me
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34088] [EASY] sndhdr.what() throws exceptions on unknown files

2018-07-28 Thread Steve Dower


Change by Steve Dower :


--
keywords:  -easy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34088] [EASY] sndhdr.what() throws exceptions on unknown files

2018-07-17 Thread Ammar Askar


Ammar Askar  added the comment:

Hey David, thanks for your contribution, I've added some feedback in context of 
the code on Github.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34088] [EASY] sndhdr.what() throws exceptions on unknown files

2018-07-17 Thread david awad


david awad  added the comment:

Hey, I saw the issue and spent some time piecing together a PR for it. I've 
never contributed to Python before but this seemed like a good place to start!  

I posted these questions on the PR but I'll echo them here as well.

- Should we only handle the specific exceptions that are created in these two 
examples? or is there a cleaner, more pythonic way to handle it?

- It doesn't appear that test_sndhdr.py does any testing of bad inputs. Can I 
add test cases to the test_sndhdr.py file?

Thanks! I'm here to learn so if there's anything I missed please feel free to 
let me know.

--
nosy: +davidawad

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34088] [EASY] sndhdr.what() throws exceptions on unknown files

2018-07-17 Thread david awad


Change by david awad :


--
keywords: +patch
pull_requests: +7854
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34088] [EASY] sndhdr.what() throws exceptions on unknown files

2018-07-16 Thread Ammar Askar


Ammar Askar  added the comment:

Hey Lysandros.

Take a look at 
https://github.com/python/cpython/blob/master/Lib/wave.py#L126-L139

Notice how there's a Chunk made from the `file` argument but then another Chunk 
created using the previous chunk as a file.

While it might seem like self.size_read is magically changing between the 
steps, the thing to realize there is that self.file is another chunk and when 
you step, you're stepping into the seek of another Chunk instance, which has 
its own self.size_read

--
nosy: +ammar2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34088] [EASY] sndhdr.what() throws exceptions on unknown files

2018-07-12 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

Upon checking to see where the RuntimeError is coming from, I noticed that 
there is some notorious behaviour in chunk.py. If one runs python with the 
exact same parameters as Jussi Judin did in their first case and after stepping 
through the call stack until Chunk/skip is reached, there is a call to 
Chunk/seek. On the time of the call size_read has the value 16, whereas within 
the seek method it has the value 28. Is this intended? If so, where is that 
implemented? I cannot figure out why this is happening. 

The following is my pdb output.

> cpython/Lib/chunk.py(160)skip()
-> self.file.seek(n, 1)
(Pdb) p self.size_read
16
(Pdb) s
--Call--
> cpython/Lib/chunk.py(98)seek()
-> def seek(self, pos, whence=0):
(Pdb) p self.size_read
28

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33865] [EASY] Missing code page aliases: "unknown encoding: 874"

2018-07-12 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> third party
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34088] [EASY] sndhdr.what() throws exceptions on unknown files

2018-07-12 Thread STINNER Victor


STINNER Victor  added the comment:

If someone writes a PR, I can review it ;-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34088] [EASY] sndhdr.what() throws exceptions on unknown files

2018-07-12 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

Will you make a PR or shall I try to fix this?

--
nosy: +lys.nikolaou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34088] [EASY] sndhdr.what() throws exceptions on unknown files

2018-07-11 Thread STINNER Victor


STINNER Victor  added the comment:

I agree that sndhdr.what() should return None and not raise an exception if the 
file format is not supported or the file is invalid.

--
keywords: +easy
nosy: +vstinner
title: sndhdr.what() throws exceptions on unknown files -> [EASY] sndhdr.what() 
throws exceptions on unknown files

___
Python tracker 
<https://bugs.python.org/issue34088>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34088] sndhdr.what() throws exceptions on unknown files

2018-07-10 Thread Jussi Judin


New submission from Jussi Judin :

sndhdr.what() function throws several types of exceptions on unknown files 
instead of returning None (as documentation says).

Following code can replicate these crashes:

```
import sndhdr
import sys

sndhdr.what(sys.argv[1])
```

First crash is from wave or chunk module (input data is base64 encoded in the 
echo command):

```
$ echo UklGRjAwMDBXQVZFZm10IDAwMDABADAwMDAwMDAwMDAwMDAw | python3.7 -mbase64 -d 
> in.file
$ python3.7 sndhdr/test.py in.file
Traceback (most recent call last):
  File "sndhdr/test.py", line 4, in 
sndhdr.what(sys.argv[1])
  File "/tmp/python-3.7-bin/lib/python3.7/sndhdr.py", line 54, in what
res = whathdr(filename)
  File "/tmp/python-3.7-bin/lib/python3.7/sndhdr.py", line 63, in whathdr
res = tf(h, f)
  File "/tmp/python-3.7-bin/lib/python3.7/sndhdr.py", line 163, in test_wav
w = wave.open(f, 'r')
  File "/tmp/python-3.7-bin/lib/python3.7/wave.py", line 510, in open
return Wave_read(f)
  File "/tmp/python-3.7-bin/lib/python3.7/wave.py", line 164, in __init__
self.initfp(f)
  File "/tmp/python-3.7-bin/lib/python3.7/wave.py", line 153, in initfp
chunk.skip()
  File "/tmp/python-3.7-bin/lib/python3.7/chunk.py", line 160, in skip
self.file.seek(n, 1)
  File "/tmp/python-3.7-bin/lib/python3.7/chunk.py", line 113, in seek
raise RuntimeError
RuntimeError
```

Second crash comes from sndhdr module itself (again base64 encoded data is 
first decoded on command line):

```
$ echo AAA= | python3.7 -mbase64 -d > in.file
$ python3.7 sndhdr/test.py in.fileTraceback (most recent call last):
  File "sndhdr/test.py", line 4, in 
sndhdr.what(sys.argv[1])
  File "/tmp/python-3.7-bin/lib/python3.7/sndhdr.py", line 54, in what
res = whathdr(filename)
  File "/tmp/python-3.7-bin/lib/python3.7/sndhdr.py", line 63, in whathdr
res = tf(h, f)
  File "/tmp/python-3.7-bin/lib/python3.7/sndhdr.py", line 192, in test_sndr
rate = get_short_le(h[2:4])
  File "/tmp/python-3.7-bin/lib/python3.7/sndhdr.py", line 213, in get_short_le
return (b[1] << 8) | b[0]
IndexError: index out of range
```

------
components: Library (Lib)
messages: 321396
nosy: Barro
priority: normal
severity: normal
status: open
title: sndhdr.what() throws exceptions on unknown files
versions: Python 3.7

___
Python tracker 
<https://bugs.python.org/issue34088>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33865] [EASY] Missing code page aliases: "unknown encoding: 874"

2018-06-25 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Thank you Inada-san! Seems this issue can be closed as a third party issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33865] [EASY] Missing code page aliases: "unknown encoding: 874"

2018-06-25 Thread INADA Naoki


INADA Naoki  added the comment:

I found original pull request and issue report

https://github.com/conda/conda/pull/4558
https://github.com/ContinuumIO/anaconda-issues/issues/1410

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33865] [EASY] Missing code page aliases: "unknown encoding: 874"

2018-06-25 Thread INADA Naoki


INADA Naoki  added the comment:

I grepped PYTHONIOENCODING and found this line.
https://github.com/conda/conda/blob/082fe8fd7458ecd9dd7547749039f4b1f06d76db/conda/activate.py#L726

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33865] [EASY] Missing code page aliases: "unknown encoding: 874"

2018-06-25 Thread INADA Naoki


INADA Naoki  added the comment:

When I grepped "Unknown encoding 874", I see some people got trouble from 
anaconda installation.

I don't know about what anaconda setup does, but it will not happen on normal 
CPython.
We use UTF-8 by default on Windows, for fsencoding and console encoding, from 
Python 3.6.

--

___
Python tracker 
<https://bugs.python.org/issue33865>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33865] [EASY] Missing code page aliases: "unknown encoding: 874"

2018-06-25 Thread INADA Naoki


Change by INADA Naoki :


--
nosy: +inada.naoki

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33865] [EASY] Missing code page aliases: "unknown encoding: 874"

2018-06-19 Thread STINNER Victor


STINNER Victor  added the comment:

Prawin Phichitnitikorn: "But for me I'm resolve by adding (...)"

Ok, so can you please give the value of:

* sys.stdin.encoding
* sys.stdout.encoding
* sys.stderr.encoding
* os.device_encoding(0)
* os.device_encoding(1)
* os.device_encoding(2)
* locale.getpreferredencoding(False)

Maybe also the .errors attribute of sys.stdin, sys.stdout and sys.stderr.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33865] [EASY] Missing code page aliases: "unknown encoding: 874"

2018-06-19 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

@Serhiy: The screenshot suggests that this is regular python install.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   3   4   5   6   7   8   9   10   >