deprecation-warning

What does DeprecationWarning mean when running Python

怎甘沉沦 提交于 2019-11-27 08:54:36
问题 I ran a Python program and got a DeprecationWarning , like: D:\programs\anaconda2\lib\site-packages\sklearn\utils\deprecation.py:70: DeprecationWarning: Function log_multivariate_normal_density is deprecated; The function log_multivariate_normal_density is deprecated in 0.18 and will be removed in 0.20. warnings.warn(msg, category=DeprecationWarning) I can't confirm what is wrong about it. What is a DeprecationWarning ? 回答1: In general developers are developing libraries and in developing

Gradle warning: variant.getOutputFile() and variant.setOutputFile() are deprecated

假如想象 提交于 2019-11-27 07:25:30
I am using the following simplified configuration in an Android application project. android { compileSdkVersion 20 buildToolsVersion "20.0.0" defaultConfig { minSdkVersion 8 targetSdkVersion 20 versionCode 1 versionName "1.0.0" applicationVariants.all { variant -> def file = variant.outputFile def fileName = file.name.replace(".apk", "-" + versionName + ".apk") variant.outputFile = new File(file.parent, fileName) } } } Now that I updated the Gradle plug-in to v.0.13.0 and Gradle to v.2.1. the following warnings appear: WARNING [Project: :MyApp] variant.getOutputFile() is deprecated. Call it

Django 1.9 deprecation warnings app_label

不打扰是莪最后的温柔 提交于 2019-11-27 07:10:34
I've just updated to Django v1.8, and testing my local setup before updating my project and I've had a deprecation warning that I've never seen before, nor does it make any sense to me. I may be just overlooking something or misunderstanding the documentation. /Users/neilhickman/Sites/guild/ankylosguild/apps/raiding/models.py:6: RemovedInDjango19Warning: Model class ankylosguild.apps.raiding.models.Difficulty doesn't declare an explicit app_label and either isn't in an application in INSTALLED_APPS or else was imported before its application was loaded. This will no longer be supported in

How to silence EllipticCurvePublicNumbers.encode_point CryptographyDeprecationWarning when using Paramiko in Python

女生的网名这么多〃 提交于 2019-11-27 06:51:07
问题 CryptographyDeprecationWarning: encode_point has been deprecated on EllipticCurvePublicNumbers and will be removed in a future version. Please use EllipticCurvePublicKey.public_bytes to obtain both compressed and uncompressed point encoding. 回答1: This has been fixed in Paramiko 2.5.0 already: https://www.paramiko.org/changelog.html#2.5.0 https://github.com/paramiko/paramiko/pull/1379 https://github.com/paramiko/paramiko/issues/1369 回答2: I've had better success with: import warnings warnings

Is `shouldOverrideUrlLoading` really deprecated? What can I use instead?

房东的猫 提交于 2019-11-27 00:10:42
Is "shouldOverrideUrlLoading" really deprecated? If so, what can I use instead? It seems like shouldOverrideUrlLoading is deprecated targeting Android N and I need to make an app work since API 19 until the latest right now which is Android N (beta), I use some features that are new in Android N (like Data Saver), so targeting Marshmallow will not help with the issue since I need to use those new features, here is the part of the code I use: public boolean shouldOverrideUrlLoading(WebView webview, String url) { if (url.startsWith("http:") || url.startsWith("https:")) { ... } else if (url

DEPRECATION WARNING: Dangerous query method: Random Record in ActiveRecord >= 5.2

∥☆過路亽.° 提交于 2019-11-26 23:26:32
问题 So far, the "common" way to get a random record from the Database has been: # Postgress Model.order("RANDOM()").first # MySQL Model.order("RAND()").first But, when doing this in Rails 5.2, it shows the following Deprecation Warning: DEPRECATION WARNING: Dangerous query method (method whose arguments are used as raw SQL) called with non-attribute argument(s): "RANDOM()". Non-attribute arguments will be disallowed in Rails 6.0. This method should not be called with user-provided values, such as

Preprocessing in scikit learn - single sample - Depreciation warning

流过昼夜 提交于 2019-11-26 22:12:54
On a fresh installation of Anaconda under Ubuntu... I am preprocessing my data in various ways prior to a classification task using Scikit-Learn. from sklearn import preprocessing scaler = preprocessing.MinMaxScaler().fit(train) train = scaler.transform(train) test = scaler.transform(test) This all works fine but if I have a new sample (temp below) that I want to classify (and thus I want to preprocess in the same way then I get temp = [1,2,3,4,5,5,6,....................,7] temp = scaler.transform(temp) Then I get a deprecation warning... DeprecationWarning: Passing 1d arrays as data is

setBackgroundDrawable() deprecated

爱⌒轻易说出口 提交于 2019-11-26 20:04:33
问题 So my sdk goes from 15 to 21 and when I call setBackgroundDrawable() , Android Studio tells me that it's deprecated. I thought of going around it using: int sdk = android.os.Build.VERSION.SDK_INT; if(sdk < android.os.Build.VERSION_CODES.JELLY_BEAN) { layout.setBackgroundDrawable(getResources().getDrawable(R.drawable.img_wstat_tstorm)); } else { layout.setBackground(getResources().getDrawable(R.drawable.img_wstat_tstorm)); } But then, I get an error at "setBackground()". So, how would you deal

Turn off deprecated errors in PHP 5.3

二次信任 提交于 2019-11-26 17:59:25
问题 My server is running PHP 5.3 and my WordPress install is spitting these errors out on me, causing my session_start() to break. Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 647 Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 662 Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php

Glut deprecation in Mac OSX 10.9, IDE: QT Creator

丶灬走出姿态 提交于 2019-11-26 17:47:52
问题 I was trying to build an opengl program on qt creator, installed on my mac, with osx 10.9. I got several warnings on glut functions about its deprecation in osx10.9, a sample error message is like: 'glutInit' is deprecated: first deprecated in OS X 10.9 [-Wdeprecated-declarations] glutInit(&argc, &argv); ^ I wonder if GLUT.h is not usable anymore in osx10.9? According to some other posts, it is said that as long as we change "OS X Deployment Target" back to OSX10.8, then it works. How to do