[issue41564] Cannot access member "hex" for type "ByteString"

2020-08-23 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

hex.py works for me with CPython versions 3.5, 3.7, 3.8, and 3.9, and the 
master branch.

--

___
Python tracker 

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



[issue41564] Cannot access member "hex" for type "ByteString"

2020-08-23 Thread Matt Joiner


Matt Joiner  added the comment:

I do not think so. mypy has the same issue. The ByteString type does not 
include the methods shared by all its implementations. I already linked to this 
in https://bugs.python.org/msg375553. I also showed that mypy doesn't work in 
my last comment.

--

___
Python tracker 

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



[issue41564] Cannot access member "hex" for type "ByteString"

2020-08-23 Thread Eric V. Smith


Eric V. Smith  added the comment:

This looks like a problem in pyright, not in CPython.

--

___
Python tracker 

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



[issue41564] Cannot access member "hex" for type "ByteString"

2020-08-23 Thread Matt Joiner


Matt Joiner  added the comment:

$ pyright hex.py 
stubPath /Users/anacrolix/src/dht-scraper/typings is not a valid directory.
Assuming Python platform Darwin
Searching for source files
Found 1 source file
/Users/anacrolix/src/dht-scraper/hex.py
  3:9 - error: Cannot access member "hex" for type "ByteString"
  Member "hex" is unknown (reportGeneralTypeIssues)
1 error, 0 warnings 
Completed in 0.562sec
anacrolix@anacrolix-mbp-2018:~/src/dht-scraper$ mypy hex.py 
hex.py:3: error: "ByteString" has no attribute "hex"
Found 1 error in 1 file (checked 1 source file)
anacrolix@anacrolix-mbp-2018:~/src/dht-scraper$ python3 hex.py 
deadbeef

--

___
Python tracker 

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



[issue41564] Cannot access member "hex" for type "ByteString"

2020-08-23 Thread Matt Joiner


Change by Matt Joiner :


Added file: https://bugs.python.org/file49423/hex.py

___
Python tracker 

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



[issue41564] Cannot access member "hex" for type "ByteString"

2020-08-19 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
nosy: +Jeffrey.Kintscher
status: pending -> open

___
Python tracker 

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



[issue41564] Cannot access member "hex" for type "ByteString"

2020-08-18 Thread Eric V. Smith


Change by Eric V. Smith :


--
status: open -> pending

___
Python tracker 

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



[issue41564] Cannot access member "hex" for type "ByteString"

2020-08-17 Thread Eric V. Smith


Eric V. Smith  added the comment:

We need to know how to trigger the problem you're seeing. You need to provide 
code we can run that shows the error you're seeing.

--

___
Python tracker 

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



[issue41564] Cannot access member "hex" for type "ByteString"

2020-08-17 Thread Matt Joiner


Matt Joiner  added the comment:

https://github.com/python/cpython/blob/48b069a003ba6c684a9ba78493fbbec5e89f10b8/Lib/_collections_abc.py#L953

https://github.com/python/cpython/blob/0e95bbf08571e98f4b688524efc2dcf20d315d91/Lib/typing.py#L1612

--
status: pending -> open

___
Python tracker 

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



[issue41564] Cannot access member "hex" for type "ByteString"

2020-08-17 Thread Eric V. Smith


Eric V. Smith  added the comment:

Without some example code that shows the problem we can't help you. Have you 
considered that this is a bug with pyright, not a bug with python itself?

--
nosy: +eric.smith
status: open -> pending

___
Python tracker 

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



[issue41564] Cannot access member "hex" for type "ByteString"

2020-08-16 Thread Matt Joiner


New submission from Matt Joiner :

I get this error when running pyright for a type of typing.ByteString. All the 
implementations of ByteString (bytes, bytearray, memoryview) have the hex 
method, so this seems unexpected?

--
components: Library (Lib)
messages: 375523
nosy: anacrolix
priority: normal
severity: normal
status: open
title: Cannot access member "hex" for type "ByteString"
type: behavior
versions: Python 3.8

___
Python tracker 

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