classification
Title: 3.6 Seems to be ignoring the _sodium pyd file made with pip.
Type: Stage: resolved
Components: Windows Versions: Python 3.6
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: Decorater, brett.cannon, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2016-07-19 07:03 by Decorater, last changed 2016-07-19 22:38 by zach.ware. This issue is now closed.

Files
File name Uploaded Description Edit
_sodium.cp36-win_amd64.pyd Decorater, 2016-07-19 07:04
_sodium.cp36-win32.pyd Decorater, 2016-07-19 07:05
Messages (9)
msg270815 - (view) Author: Decorater (Decorater) * Date: 2016-07-19 07:03
in 3.5 the following would succed:
>>>import nacl._sodium
None

but in 3.6 (I even compiled it for 3.6 specifically) this happens:

>>>import nacl._sodium
Traceback (most recent call last):
    import nacl._sodium
ImportError: No module named 'nacl._sodium'
msg270816 - (view) Author: Decorater (Decorater) * Date: 2016-07-19 07:05
Attacked are the 2 versions of _sodium for PyNacl that it seems to not be able to find.
msg270817 - (view) Author: Decorater (Decorater) * Date: 2016-07-19 07:11
It dooes work foor _cffi_backend however on reading it so this issue is only on nacl._sodium then.
msg270833 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2016-07-19 16:03
If it's only affecting a single library then chances are it's not Python's fault.
msg270835 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2016-07-19 16:45
Any chance this is a regression in the "extension module within a package" issue we saw during 3.5?

There's a pretty relevant difference between:

>>> import nacl._sodium
>>> import _cffi_backend
msg270839 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2016-07-19 18:24
Anything is possible, but I'm not aware of any big changes in extension loading in 3.6. Would need a test case to verify.
msg270845 - (view) Author: Decorater (Decorater) * Date: 2016-07-19 21:34
hmm unless it has something to do with only my bot's debug command doing the following as it seems it could possible be only my bot's debug command however commenting out 1 thing in Discord.py also generates this Issue.

Debug Command Code:
https://bpaste.net/show/904eccf5bdc0 (what I was using when I found this issue)

Result of Uncommenting Import Error Catch in Discord.py:
Traceback (most recent call last):
  File "E:\Users\Elsword\Desktop\DecoraterBot\Async\DecoraterBot.py", line 10, i
n <module>
    import discord
  File "E:\Users\Elsword\Desktop\DecoraterBot\Async\resources\Dependencies\disco
rd\__init__.py", line 20, in <module>
    from .client import Client, AppInfo
  File "E:\Users\Elsword\Desktop\DecoraterBot\Async\resources\Dependencies\disco
rd\client.py", line 42, in <module>
    from .voice_client import VoiceClient
  File "E:\Users\Elsword\Desktop\DecoraterBot\Async\resources\Dependencies\disco
rd\voice_client.py", line 58, in <module>
    import nacl.secret
  File "nacl\secret.py", line 18, in <module>
  File "nacl\bindings\__init__.py", line 17, in <module>
  File "nacl\bindings\crypto_box.py", line 17, in <module>
ImportError: No module named 'nacl._sodium'

Yep this must be some Regression in 3.6 or something uncaught it does however work in 3.5.2 as expected.
msg270846 - (view) Author: Decorater (Decorater) * Date: 2016-07-19 21:42
Commenting*
msg270849 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2016-07-19 22:38
I have confirmed that this is not a Python issue.  PyNaCl takes some special coercion and a third-party library to build (see https://github.com/pyca/pynacl/issues/165), but I managed to get it to build with 3.5.1 and 3.6 and imported nacl._sodium in both with no problem.
History
Date User Action Args
2016-07-19 22:38:00zach.waresetmessages: + msg270849
stage: resolved
2016-07-19 21:42:28Decoratersetmessages: + msg270846
2016-07-19 21:34:57Decoratersetmessages: + msg270845
2016-07-19 18:24:46brett.cannonsetmessages: + msg270839
2016-07-19 16:45:20steve.dowersetmessages: + msg270835
2016-07-19 16:03:58brett.cannonsetstatus: open -> closed

nosy: + paul.moore, tim.golden, brett.cannon, zach.ware, steve.dower
messages: + msg270833

components: + Windows
resolution: third party
2016-07-19 07:11:01Decoratersetmessages: + msg270817
title: 3.6 Seems to be ignoring all pyd's installed and compiled by pip -> 3.6 Seems to be ignoring the _sodium pyd file made with pip.
2016-07-19 07:05:35Decoratersetfiles: + _sodium.cp36-win32.pyd

messages: + msg270816
2016-07-19 07:04:43Decoratersetfiles: + _sodium.cp36-win_amd64.pyd
2016-07-19 07:03:03Decoratercreate