Repository: kivy/kivy

Issue:
kivy.properties
<!--
The issue tracker is a tool to address bugs.
Please use the #support Discord channel at https://chat.kivy.org/ or Stack Overflow for
support questions, more information at https://git.io/vM1yQ.

Before opening a new issue, make sure you do the following:
    * check that your issue isn't already filed: https://git.io/vM1iE
    * prepare a short, runnable example that reproduces the issue
    * reproduce the problem with the latest development version of Kivy
    * double-check that the issue is indeed a bug and not a support request
-->

### Versions

* Python: 3.7.0 & 3.7.1
* OS: Windows 7 32bit & Windows 8.1 64bit
* Kivy: 1.10.1
* Kivy installation method: pip

### Description

I use "Visual Studio Code" to write my code, but when I run any code containing "from kivy.properties import NumericProperty", it shows an Error describing "No name 'NumericProperty' in module 'kivy.properties'" and the result is correct and it work properly.  I tested the code using original IDLE for python but there is no error was shown. by the way this error appears with any other Property from kivy.properties module (I tested the other codes) exp. 'ObjectProperty', 'ListProperty', 'StringPropertyetc', etc.
### Code and Logs

```python
from kivy.app import App

from kivy.core.window import Window

from kivy.config import Config

from kivy.uix.gridlayout import GridLayout
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.textinput import TextInput
from kivy.uix.label import Label
from kivy.uix.button import Button 
from kivy.uix.popup import Popup
from kivy.uix.scrollview import ScrollView

from kivy.properties import NumericProperty

class CalculatorWidget(GridLayout):
    int_button_width = 120
    int_button_height = 100
    int_button_font_size = 40

    button_width = NumericProperty(int_button_width)
    button_height = NumericProperty(int_button_height)
    button_font_size = NumericProperty(int_button_font_size)

    Window.size = (int_button_width * 2, 
        int_button_height * 3)

    def calc_error(self, error, calc_entry):
        content = BoxLayout(orientation='vertical')
        scrollview = ScrollView()

        close_popup = Button(text='Close this popup')
        error_message = Label(text=str(error))

        scrollview.add_widget(error_message)
        content.add_widget(scrollview)
        content.add_widget(close_popup)

        popup = Popup(title='An error occured',
            content=content, size_hint=(.8, .8))

        close_popup.bind(on_release=popup.dismiss)
        popup.open()

    def calculate(self, *args):
        calc_entry = self.ids.calc_input.text 
        if calc_entry != '':
            if calc_entry[0] in '1234567890-+':
                try:
                    ans = str(eval(calc_entry))
                    self.ids.calc_input.text = ans
                except Exception as error:
                    self.calc_error(error, calc_entry)
                    pass

    def delete(self, *args):
        self.ids.calc_input.text = self.ids.calc_input.text[:-1]

    def clear(self, *args):
        self.ids.calc_input.text = ''

    def switch(self, *args):
        calc_entry = self.ids.calc_input.text
        if calc_entry != '':
            if calc_entry[0] in '+1234567890':
                self.ids.calc_input.text = '-' + calc_entry
            if calc_entry[0] == '-':
                self.ids.calc_input.text = calc_entry[1:]

class CalculatorApp(App):
    def build(self):
        Config.set('graphics', 'resizable', '0')
        Config.write()
        return CalculatorWidget()

if __name__ == '__main__':
    CalculatorApp().run()

```



Discussion:
Hello I run into the same error with Python 3.6 and ListProperty. I cannot find any answers. I'll still try and keep everybody updated.

Best regards,
I can ensure you that ListProperty and NumericProperty are in kivy.properties.
Your issue has nothing to do with us, but rather how Visual Code Studio is trying to see if this exists.

Make sure that VSCode using the same python as you, Kivy is compiled etc. In anycase, we won't be able to do anything directly with VSCode.
👋 We use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please use our [support channels](https://github.com/kivy/kivy/blob/master/README.md#support) to get help with the project.

If you're having trouble installing Kivy, make sure to check out the installation docs for [Windows](https://kivy.org/docs/installation/installation-windows.html), [Linux](https://kivy.org/docs/installation/installation-linux.html) and [macOS](https://kivy.org/docs/installation/installation-osx.html).

Let us know if this comment was made in error, and we'll be happy to reopen the issue.
Hello,
Excuse me for the late answer, I am quite busy theses days. I use Kivy with VS Code and I am starting to do real good. Do not hesitate to get back in touch. Fisrt I use the latest VS Code version and install Kivy extensions. I use Conda and a virtual environment to run Kivy and it works well.

Best regards
"I use 'Visual Studio Code' to write my code, but when I run any code containing 'from kivy.properties import NumericProperty', it shows an Error describing 'No name "NumericProperty" in module "kivy.properties"' and the result is correct and it work properly."

I also got this error message after I installed Kivy and ran the Pong Demo example and I get this syntax error within VS Code for Windows. The Pong code compiles and runs, but I'm struggling to get anything else working (for different reasons).

The Kivy download was for Python 3.6 whereas Anaconda installed 3.7.0 for me, not sure what VS Code is defaulting to with its recommended Python extensions.

Edit: seems like it's an old issue also affecting previous version of Kivy and different IDE (PyCharm):
https://groups.google.com/forum/#!topic/kivy-users/DPF1XWwFFXw
Same error on Windows 10 (64-bit) with Python 3.7.3

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -199,6 +199,9 @@ def pkgconfig(*packages, **kw):
         print('Environ change {0} -> {1}'.format(key, value))
         c_options[key] = value
 
+use_embed_signature = environ.get('USE_EMBEDSIGNATURE', '0') == '1'
+use_embed_signature = use_embed_signature or bool(
+    platform not in ('ios', 'android'))
 
 # -----------------------------------------------------------------------------
 # Cython check
@@ -579,7 +582,7 @@ def __init__(self, *args, **kwargs):
         self.cython_directives = {
             'c_string_encoding': 'utf-8',
             'profile': 'USE_PROFILE' in environ,
-            'embedsignature': 'USE_EMBEDSIGNATURE' in environ}
+            'embedsignature': use_embed_signature}
         # XXX with pip, setuptools is imported before distutils, and change
         # our pyx to c, then, cythonize doesn't happen. So force again our
         # sources


Test patch: